How do you solve speed, distance and time questions, including trains and relative speed?
Use distance = speed x time and convert km/h to m/s by multiplying by 5/18. A train crossing a pole covers its own length; crossing a platform or another train covers both lengths. Add speeds when objects move in opposite directions and subtract when they move in the same direction.
Explain it simply
You are standing on a platform at Howrah and a train passes you. The train is not done passing until its last coach has gone by. So the train has to cover its own length to pass you. If it has to pass the whole platform, the engine must travel the platform's length and then the train's length too.
Now think of two people running towards each other on a cricket ground. The gap between them closes at both speeds added together. If one chases the other in the same direction, the gap closes only at the difference of their speeds. That idea is relative speed.
Example
Question 1: A 240 m train runs at 72 km/h. How long does it take to cross a pole, and a 160 m platform?
- Convert speed: 72 x 5/18 = 20 m/s.
- Pole: distance = 240 m, time = 240 / 20 = 12 seconds.
- Platform: distance = 240 + 160 = 400 m, time = 400 / 20 = 20 seconds.
Question 2: Trains of 150 m and 100 m run at 54 km/h and 36 km/h. How long do they take to cross each other?
- Total length = 150 + 100 = 250 m.
- Opposite directions: relative speed = 54 + 36 = 90 km/h = 90 x 5/18 = 25 m/s. Time = 250 / 25 = 10 seconds.
- Same direction: relative speed = 54 - 36 = 18 km/h = 5 m/s. Time = 250 / 5 = 50 seconds.
const toMps = (kmph) => kmph * 5 / 18;
console.log(240 / toMps(72)); // Output: 12
console.log((240 + 160) / toMps(72)); // Output: 20
console.log((150 + 100) / toMps(54 + 36)); // Output: 10
console.log((150 + 100) / toMps(54 - 36)); // Output: 50How it works
- Distance = Speed x Time. Keep units consistent.
- km/h to m/s: multiply by 5/18 (1000 m / 3600 s). m/s to km/h: multiply by 18/5.
- Train crosses a pole, a man standing still or a signal: distance = train length.
- Train crosses a platform, bridge or tunnel: distance = train length + platform length.
- Two trains: distance = sum of both lengths, using relative speed.
- Average speed for equal distances at speeds a and b: 2ab / (a + b), not (a + b) / 2. Going at 60 km/h and returning at 40 km/h gives 2 x 60 x 40 / 100 = 48 km/h.
- Boats and streams: downstream speed = boat + stream, upstream speed = boat - stream.
Real-world use
Train questions are a favourite in TCS, Infosys, Cognizant and Railway (RRB) exams. The same reasoning tells you when a Rapido rider will catch up with you, or why an IRCTC train running 15 minutes late at 90 km/h is 22.5 km behind schedule.
Common mistakes
- Mixing km/h with metres and seconds. Convert first.
- Forgetting to add the platform length, or the second train's length.
- Adding speeds for trains going the same way.
- Taking the simple average of two speeds for a round trip.
- Treating a man walking beside the track as stationary. Use relative speed with his speed too.
What to say in the interview
"I start with distance equals speed times time and convert everything to metres and seconds, using 5/18 for km/h. For a train, the distance is its own length to pass a pole and its length plus the platform's length to pass a platform. When two things move, I use relative speed: add for opposite directions, subtract for the same direction. For equal-distance round trips I use 2ab over a plus b for the average speed."
Follow-up questions
- A train passes a man standing on a platform in 8 seconds and a 264 m platform in 20 seconds. Find the train's length and speed.
- A boat goes at 15 km/h in still water and the stream flows at 3 km/h. How long to go 36 km downstream and come back?
- A car goes from A to B at 40 km/h and returns at 60 km/h. What is the average speed?
Go deeper
Read these once the basics above feel easy.
Answers to the follow-ups:
- The extra 12 seconds is spent covering the platform, so speed = 264 / 12 = 22 m/s (22 x 18/5 = 79.2 km/h). Length = 22 x 8 = 176 m.
- Downstream speed = 18 km/h, so 36 / 18 = 2 hours. Upstream speed = 12 km/h, so 36 / 12 = 3 hours. Total = 5 hours.
- 2 x 40 x 60 / (40 + 60) = 4,800 / 100 = 48 km/h.
For "meeting point" problems where two trains start towards each other at the same time, time to meet = gap / (sum of speeds). If they start at different times, first move the earlier train forward by its head start, then apply the same formula to the remaining gap. After meeting, if the trains take t1 and t2 hours to reach the other ends, their speeds are in the ratio √t2 : √t1.
#aptitude#speed-distance-time#trains#relative-speed#quantitative