Algorithm to find the train's location and velocity?

In summary, the conversation discusses a problem of determining the location and velocity of a train traveling along an infinite axis of integers. The only information given is that at each time unit, the train passes through a specific integer and a function can determine if the train is at a certain position at a given time. The solution is to use the implicit function theorem to determine the train's location as a function of time. However, the exact method would depend on the specific function used.
  • #1
Eleanor
2
0
:confused:
I'm a silent viewer of this forum, and I came across a question I don't seem to manage...:
A train is traveling along the Z axis (infinite on both sides). You have no information as of the train's direction or speed. At each time unit the train lends on a number. At each time unit you can look at a number and find whether the train lands on it.
What can be the algorithm to find the train's location and velocity?
 
Mathematics news on Phys.org
  • #2
"A number"? Unless the numbers are somehow related to position you can't. If you are talking about a "number line" in which the numbers are in order, then the postion is given by the number and the speed the difference between two numbers "landed on" in consecutive time units, divided by the length of one time unit.
 
  • #3
Eleanor, I'm not sure any of us follow what's happening here with these numbers. Would you like to try explaining once more, perhaps more descriptively ?
 
  • #4
I'll try and make myself clearer

Sorry...
By numbers I meant integers, or the Z group. Imagine that the train rail is the axis of integers, running to infinite on both sides.
You have no information as to were the train is, what is its velocity or direction.
You have a function that checks whether the train currently passes through a specific integer. The function returns yes or no only.
The only information you have is that the train must be on an integer at any such check, meaning the train can't be between two integers at the time of the check.
Hope I've managed to explain myself...
Naturally I'm familiar with the formula for velocity, but the problem here (my problem...) is to find the train. And then find it again.
 
  • #5
You seem to be saying that there exist a function, f(x,t), that, given a time t and postion x, returns "true" if the train is at position x at time t and no if it doesn't. What one would, theoretically do, is use the "implicit function" theorem to determine x as a function of t. How you would do that depends upon the function x.

Knowing that the train MUST be at an integer at some times t doesn't really help at all.
 

FAQ: Algorithm to find the train's location and velocity?

What is an algorithm?

An algorithm is a set of step-by-step instructions for solving a problem or completing a task. It is a fundamental concept in computer science and is used to design and analyze efficient solutions to various problems.

How does the algorithm for finding train location and velocity work?

The algorithm for finding the train's location and velocity uses a combination of data from sensors, such as speedometers and GPS, and mathematical calculations to determine the train's current location and speed. It takes into account factors such as acceleration, deceleration, and changes in direction to accurately track the train's movement.

What are the inputs and outputs of the algorithm?

The inputs of the algorithm include data from sensors, such as speed, time, and location. The outputs of the algorithm are the train's current location and velocity, which can be displayed on a screen or used for further analysis.

Can the algorithm account for external factors, such as traffic or weather?

Yes, the algorithm can be programmed to take into account external factors that may affect the train's movement, such as traffic or weather conditions. This can be done by adjusting the calculations and algorithms used to determine the train's location and velocity based on the specific external factors.

Is the algorithm always accurate?

The accuracy of the algorithm depends on the quality of the input data and the complexity of the train's movement. In ideal conditions, the algorithm can provide highly accurate results. However, in real-world scenarios, external factors and limitations of sensors may affect the accuracy of the algorithm.

Similar threads

Replies
21
Views
1K
Replies
2
Views
2K
Replies
1
Views
1K
Replies
60
Views
4K
Replies
11
Views
2K
Replies
2
Views
3K
Replies
5
Views
2K
Replies
58
Views
5K
Back
Top