A road network connects several cities. City C can be reached only from city A…

2026

A road network connects several cities. City C can be reached only from city A or city B. The distance from A to C is 65 km, and the distance from B to C is 30 km. The shortest distance between city A and city B is 58 km. The shortest distance from city P to city A is 420 km, and the shortest distance from city P to city B is 345 km. What is the shortest distance from city P to city C, in km?

  1. A.

    153

  2. B.

    375

  3. C.

    403

  4. D.

    478

Attempted by 3 students.

Show answer & explanation

Correct answer: B

In a shortest-distance network problem, when a destination can be reached through more than one intermediate city, the shortest distance is the MINIMUM of the total distances over ALL routes that can actually be built from the GIVEN distances between the two points -- every such path must be enumerated and its distances summed before comparing.

Applying this to the given network:

  1. The given distances are: A to C = 65 km, B to C = 30 km, A to B = 58 km, P to A = 420 km, and P to B = 345 km -- each stated in one direction only, so only these five values are usable in a route.

  2. Since city C can only be reached via city A or city B, the routes from P to C that can be built from the given distances are: P-A-C, P-B-C, and P-A-B-C.

  3. Sum the distances along each route: P-A-C = 420 + 65 = 485 km; P-B-C = 345 + 30 = 375 km; P-A-B-C = 420 + 58 + 30 = 508 km.

  4. Compare all three totals and take the minimum: 375 km, 485 km, and 508 km -- the smallest is 375 km.

As a check, the route P-B-C uses both the shorter P-to-B leg (345 km, 75 km less than P-to-A) and the direct B-to-C leg (30 km, well below any combination through A), so it is consistent that this two-edge route beats the two three-edge/longer alternatives.

Hence, the shortest distance from city P to city C is 375 km.

Explore the full course: Tcs Live Preparation