Beginner to intermediate

Aptitude and Reasoning for Campus Placements

Thirteen chapters of quantitative aptitude, data interpretation, logical reasoning and verbal ability with worked problems, shortcuts, common traps and answer-checked practice sets.

Chapter 6 of 13Quantitative aptitude · Speed, Distance, Time, Trains and Boats

Speed, Distance, Time, Trains, Boats and Races

The single relation powers a whole family of questions: relative motion, trains crossing poles and platforms, boats in streams, races, circular tracks and meeting points. The skill is choosing the right relative speed and keeping units consistent. Every worked answer below is checked by computation.

1. Basics and unit conversion

  • , so and .
  • km/h to m/s: multiply by . m/s to km/h: multiply by . So 72 km/h m/s and 10 m/s km/h.
  • For a fixed distance, speed and time are inversely proportional: if speed rises in the ratio , time falls in the ratio .
from fractions import Fraction

def kmh_to_ms(v):
    return Fraction(v) * Fraction(5, 18)

assert kmh_to_ms(72) == 20 and kmh_to_ms(54) == 15 and kmh_to_ms(36) == 10
assert Fraction(10) * Fraction(18, 5) == 36

Example 1. A man walks at 5 km/h and reaches 12 minutes late. At 6 km/h he is 8 minutes early. Find the distance. Let the distance be : hours (12 + 8 = 20 minutes). So and km.

Example 2. A car covers a journey in 6 hours at 50 km/h. At what speed must it travel to cover it in 5 hours? Distance 300 km; required speed km/h.

d = Fraction(10)
assert d / 5 - d / 6 == Fraction(20, 60)
assert 6 * 50 / 5 == 60

2. Average speed

  • Equal distances at speeds and : average (the harmonic mean).
  • Equal times at speeds and : average .
  • In general: total distance / total time.

Example 3. A trip is made at 30 km/h one way and 20 km/h on return. Average speed? km/h.

Example 4. A man travels 60 km at 20 km/h and the next 90 km at 30 km/h. Average speed? Total time hours; distance 150 km; average km/h. (The arithmetic mean 25 happens to coincide because the times are equal.)

assert 2 * 30 * 20 / (30 + 20) == 24
assert (60 + 90) / (60 / 20 + 90 / 30) == 25

3. Relative speed

  • Same direction: relative speed .
  • Opposite directions: relative speed .

Example 5. Two trains start from stations 450 km apart and travel towards each other at 60 km/h and 90 km/h. When do they meet? hours; they meet km from the first station.

Example 6. A thief is spotted 200 m ahead. He runs at 10 km/h and a policeman chases at 12 km/h. How far must the policeman run to catch him? Relative speed km/h m/s. Time to close 200 m: seconds. In 360 s the policeman covers m.

assert 450 / (60 + 90) == 3 and 60 * 3 == 180
rel = Fraction(2000, 3600)                     # metres per second
t = Fraction(200) / rel
assert t == 360 and Fraction(12000, 3600) * t == 1200

Meeting and catching up on a head start

If A starts hours before B on the same route at a lower speed, B catches A after hours (from B's start), where is A's speed and is B's.

Example 7. A leaves at 6:00 at 40 km/h. B leaves at 8:00 on the same road at 60 km/h. When does B catch A? A has a km lead. Closing speed km/h gives hours, so B catches A at 12:00, km from the start.

lead = 2 * 40
assert lead / (60 - 40) == 4 and 60 * 4 == 240

4. Trains

A train has length. The distance it must cover to cross something is:

CrossingDistance covered
a pole, signal or standing manthe train's own length
a platform or bridge of length
another train (opposite direction) at speed
another train (same direction) at speed $
a man walking (opposite or same direction) at relative speed

Example 8. A 150 m train crosses a pole in 10 seconds. Its speed? m/s km/h. How long to cross a 300 m platform? seconds.

Example 9. A 120 m train and a 180 m train run towards each other at 54 km/h and 36 km/h. How long to cross? Relative speed km/h m/s; distance m: 12 seconds.

Example 10. A 200 m train overtakes a 100 m train running the same way at 36 km/h. The faster train's speed is 54 km/h. Time to overtake? Relative speed km/h m/s; distance m: 60 seconds.

Example 11. A train running at 60 km/h passes a man walking at 6 km/h in the opposite direction in 6 seconds. Find the train's length, and the time it takes to cross a 270 m tunnel. Relative speed km/h m/s, so the length is m. At 60 km/h ( m/s) the tunnel needs seconds.

speed = Fraction(150, 10)
assert speed == 15 and speed * Fraction(18, 5) == 54 and Fraction(150 + 300) / speed == 30
rel = kmh_to_ms(54 + 36)
assert rel == 25 and Fraction(120 + 180) / rel == 12
rel = kmh_to_ms(54 - 36)
assert rel == 5 and Fraction(200 + 100) / rel == 60
length = kmh_to_ms(60 + 6) * 6
assert length == 110 and round(float((length + 270) / kmh_to_ms(60)), 1) == 22.8

A useful shortcut

If a train crosses a pole in seconds and a platform of length in seconds, its length is .

Example 12. A train takes 18 seconds to cross a pole and 30 seconds to cross a 240 m platform. Length? m; speed m/s.

assert Fraction(240 * 18, 30 - 18) == 360 and Fraction(360, 18) == 20

5. Boats and streams

Let the boat's speed in still water be and the stream's speed .

  • Downstream speed . Upstream speed .
  • and .
  • A round trip over distance takes .

Example 13. A boat goes 24 km downstream in 2 hours and 24 km upstream in 3 hours. Find the boat's still-water speed and the stream's speed. Down , up : , km/h.

Example 14. A man rows 12 km upstream and back in 5 hours. The stream flows at 1 km/h. Find his speed in still water. With boat speed : , which simplifies to , that is . The positive root is km/h.

down, up = Fraction(24, 2), Fraction(24, 3)
assert ((down + up) / 2, (down - up) / 2) == (10, 2)
b = Fraction(5)
assert Fraction(12) / (b - 1) + Fraction(12) / (b + 1) == 5 and 5 * b ** 2 - 24 * b - 5 == 0

6. Races and head starts

"A beats B by metres" means when A finishes, B is metres behind. "A beats B by seconds" means B finishes seconds after A.

Example 15. In a 1000 m race A beats B by 100 m. In a 1000 m race, B beats C by 50 m. By how much does A beat C? When A runs 1000, B runs 900. When B runs 1000, C runs 950, so when B runs 900, C runs . Thus A beats C by m.

Example 16. A runs 5 m/s and B runs 4 m/s. In a 400 m race, how much start must A give B so that they finish together? A needs 80 s, in which B runs 320 m. A gives a 80 m start.

c_after = 900 * Fraction(950, 1000)
assert c_after == 855 and 1000 - c_after == 145
assert 400 / 5 == 80 and 4 * 80 == 320 and 400 - 320 == 80

7. Circular tracks

Two runners on a circular track of length starting together:

  • Opposite directions: they meet every .
  • Same direction: the faster gains one lap on the slower every .
  • They meet again at the starting point after the LCM of the times each needs for a lap.

Example 17. Two runners at 6 m/s and 4 m/s start together from the same point on a 400 m track, in opposite directions. When do they first meet? seconds. Running the same direction, the first time the faster passes the slower is s.

Example 18. A takes 12 minutes per lap and B takes 18 minutes. When do they next meet at the start? minutes.

from math import lcm
assert 400 / (6 + 4) == 40 and 400 / (6 - 4) == 200
assert lcm(12, 18) == 36

8. Clocks (a common sub-topic)

  • The minute hand moves per minute; the hour hand per minute; so the minute hand gains per minute on the hour hand.
  • The angle between the hands at hours minutes (take the smaller of the result and minus it).
  • The hands coincide every minutes.
  • In 12 hours the hands overlap 11 times, and are at right angles 22 times.
def clock_angle(h, m):
    a = abs(30 * (h % 12) - 5.5 * m)
    return min(a, 360 - a)

assert clock_angle(3, 0) == 90 and clock_angle(6, 0) == 180 and clock_angle(12, 0) == 0
assert clock_angle(4, 20) == 10 and clock_angle(9, 15) == 172.5
assert round(720 / 11, 2) == 65.45
assert len([h for h in range(12) if 60 * h / 11 < 60]) == 11          # the hands coincide at m = 60h/11 past each hour h, which stays within the hour for h = 0 to 10

9. Common traps

  • Using the arithmetic mean for average speed over equal distances.
  • Forgetting to add the platform or the other train's length when crossing.
  • Unit mismatches: km/h with metres, minutes with hours.
  • Confusing "A beats B by 100 m" with "B starts 100 m ahead".
  • Relative speed direction: add for opposite directions, subtract for the same direction.
  • Round-trip questions: the average speed is not the average of the two speeds.

10. Practice set with answers

  1. A train 180 m long passes a pole in 12 seconds. Speed in km/h? Time to cross a 270 m bridge?
  2. A man covers half his journey at 20 km/h and the other half at 30 km/h. Average speed?
  3. Two cars start from places 360 km apart and move towards each other at 40 km/h and 50 km/h. After how many hours do they meet?
  4. A boat's speed in still water is 15 km/h and the stream flows at 3 km/h. How long to go 36 km downstream and return?
  5. A and B run a 200 m race. A runs 8 m/s and B 6 m/s. What start should A give B for a dead heat?
  6. Two trains 100 m and 150 m long travel in opposite directions at 60 km/h and 40 km/h. How long to cross each other completely?
  7. By how many seconds does A beat B in a 1000 m race, if A takes 125 s and B takes 150 s?
  8. At what time between 4 and 5 o'clock are the hands of a clock together?
assert kmh_to_ms(54) == 15                                   # 180 m in 12 s = 15 m/s = 54 km/h
assert Fraction(180, 12) * Fraction(18, 5) == 54 and Fraction(180 + 270, 15) == 30
assert 2 * 20 * 30 / (20 + 30) == 24
assert 360 / (40 + 50) == 4
assert Fraction(36, 15 + 3) + Fraction(36, 15 - 3) == 5                # 2 hours downstream and 3 hours upstream
assert 200 - 6 * (200 / 8) == 50
assert Fraction(100 + 150) / kmh_to_ms(60 + 40) == Fraction(9, 1)
assert 150 - 125 == 25
# the hands coincide when 30*4 + 0.5m = 6m, so m = 120 / 5.5 = 21.818... minutes after 4:00
assert round(120 / 5.5, 2) == 21.82

Answers: 1) 54 km/h and 30 seconds; 2) 24 km/h; 3) 4 hours; 4) 5 hours; 5) 50 m; 6) 9 seconds; 7) 25 seconds; 8) about 21.82 minutes past 4, that is 4:21:49.

Header Logo