Leg by leg
Plan the errands route asks for a walk from Home through some stops in a fixed order and back Home. From the second level the walk must also be the shortest, and one road is closed.
Do not try to see the whole route at once. Split it into legs: Home to the first stop, the first stop to the next, and so on, then back Home. The order is fixed, so each leg can be planned on its own.
For each leg, first cross out the closed road. Then add up the minutes along each way that is left and keep the smallest. The shortest legs, added together, make the shortest route. At the third level, check the opening times as well.
1Split the walk into legs, in the stops' order.
2Cross out the closed road.
3Add the minutes of each way; keep the smallest.
Library, then Pharmacy
The stops are the Library, then the Pharmacy. Home to the Library: the way through the Bakery is closed, so go through the Cafe and the Market, 5 + 5 + 3 = 13 minutes.
Library to Pharmacy: the direct road, 6 minutes. Pharmacy to Home: through the Market and the Cafe, 4 + 5 + 5 = 14 minutes.
Added together: 13 + 6 + 14 = 33 minutes, the shortest walk the practice accepts.
A different closed road
The stops are the Pharmacy, then the Cafe. This time the road from the Market to the Pharmacy is closed. Plan the leg from the Pharmacy to the Cafe.
Try it
Which way from the Pharmacy to the Cafe is the shortest you can walk?
- Pharmacy, Market, Cafe
- Pharmacy, Library, Market, Cafe
Show the answer
Pharmacy, Library, Market, Cafe
Right. With that road closed, the Pharmacy, the Library, the Market and the Cafe take 6 + 3 + 5 = 14 minutes, the shortest open way.
Enable JavaScript to answer interactively and save your place.
Practice Plan the errands route