You are on page 1of 1

ynamic Programming 587 In the second stage, he can reach station 5 directly from 2 and 3, station 6

directly from 2 and 4 and station 4 from 4. The distance from 2 to 5 is previous distance covered +
present distance = 200 + 1000 = 1200, Similarly, from 3 to 5 is 500 + 500 = 1000 km. The distance from 2
to 6 = 200 + 1200 = 1400 km. The distance from 4 to 6 = 200 + 1500 = 1700 km. The distance from 4 to 7
is 200 + 1900 = 2100 km. The minimum of all these is 100 km. i.e. the manager travels from 1 to 3 and
from 3 to 5 covering 100 Km. (Remember, in maximization problem, we consider the maximum
distance.) In third stage, the manager may be at station 5 or at station 6 or at station 7. From there he
can directly go to station 8 or station 9. Let us workout the minimum distance from 5, 6 and 7 to 8 and 9.
From 5 to 8 the distance = 1000 + 700 = 1700 km. From 6 to 8 the distance is 1400 + 300 = 1700 km.
From 6 to 9 the distance is 1400 + 400 = 1800 km. From 7 to 9 the distance is 2100 + 400 = 2500 km. The
minimum of all these is 1700 km. i.e. the manager can go from 5 to 8 or 6 to 8 the distance is 1700 km
only. In the 4th stage he can reach station 10 from station 8 or 9. The minimum distance from 8 and 9 to
10 is: From 8 to 10 the distance is 1700 + 300 = 2000 km. From 9 to 10 the distance is 1800 + 400 = 2200
km. Hence the minimum distance from stations 1 to 10 on the path is 2000 km on routes 1 – 3 – 5 – 8 –
10 and 1 – 2 – 6 – 8 – 10. This is shown in figure 11.3

You might also like