D1 January 2009 Q6
6.

Figure 4 shows a network of roads through eight villages, A, B, C, D, E, F, G and H. The number on each arc is the length of that road in km.
(a) Use Dijkstra’s algorithm to find the shortest route from A to H. State your shortest route and its length. (5)
There is a fair in village C and you cannot drive through the village. A shortest route from A to H which avoids C needs to be found.
(b) State this new minimal route and its length. (2)
| Scheme | Marks |
|---|---|
![]() | M1 A1 A1ft |
| Shortest route: A B C E G H Length: 156 (km) | A1 A1ft |
| (5) |
Notes
(a) 1M1: Dijkstra’s algorithm, small replacing larger in at least one of the sets of working values at C, E, G or H
1A1: Values correct at vertices A to E.
2A1ft: Values correct at vertices F to H, penalise order only once.
3A1: cao
4A1ft: 156ft
| Scheme | Marks |
|---|---|
| New route: A B E G H | B1 |
| Length: 165 (km) | B1 |
| (2) | |
| (7 marks) |
Notes
(b) 1B1: cao ABEGH
2B1: 165 Special Case Accept 166 if ABDGH listed as the path.
