A2 June 2023 Q1
1.

Figure 1 shows the graph G.

Direct roads between five villages, A, B, C, D and E, are represented in Figure 2. The weight on each arc is the time, in minutes, required to travel along the corresponding road. Floyd’s algorithm is to be used to find the complete network of shortest times between the five villages.
Initial time matrix (answer book)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | – | ||||
| B | – | ||||
| C | – | ||||
| D | – | ||||
| E | – |
The time matrix after four iterations of Floyd’s algorithm is shown in Table 1.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | – | 10 | 13 | 15 | 5 |
| B | 10 | – | 3 | 5 | 4 |
| C | 13 | 3 | – | 2 | 7 |
| D | 15 | 5 | 2 | – | 7 |
| E | 5 | 4 | 7 | 7 | – |
Table 1
| Scheme | Marks | AO |
|---|---|---|
| Graph G is neither as there are more than two vertices of odd degree | B1 | 2.4 |
| (1) |
Notes
B1: ‘Neither’ together with a correct reason (ignore irrelevant statements but do not isw incorrect statements)
Examples of B1:
- G contains more than 2 odd nodes
- G contains 4 odd nodes (or stating that A, C, D and E are odd)
- G contains (only) 1 even node
- The number of odd degree nodes in G is not 0 or 2
Examples of B0
- G contains odd nodes
- G contains at least 2 odd nodes
- G contains 4 nodes of degree 3 (not linking this to ‘odd’)
| Scheme | Marks | AO |
|---|---|---|
| e.g. A – B – C – D – E – A | B1 | 1.1b |
| (1) |
Notes
B1: CAO - must begin and end at the same node and include every other node in the graph exactly once. Accept if given in terms of arcs e.g. AC, CB, BD, DE, EA
| Scheme | Marks | AO |
|---|---|---|
| G is planar as it can be drawn with no arcs intersecting/crossing each other e.g. ![]() | B1 | 2.4 |
| (1) |
Notes
B1: Correct answer of planar + justification
Examples of correct justification:
- AC can be moved outside or EB, DB can be moved outside
- AC(O), BE(I), BD(I) (or vice-versa) accept just AC(O) or BE(O) and BD(O)
- A correct drawing of the graph as planar (condone nodes not being labelled)
Examples of insufficient justification:
- Move arc BE (or BD) outside (need to mention both)
- Move arcs outside so that no arcs cross each other (must give specific examples of which arc(s) are being moved outside)
- Comments about moving nodes
| Scheme | Marks | AO |
|---|---|---|
| 2 | B1 | 1.1b |
| (1) |
Notes
B1: CAO (2 only)
| Scheme | Marks | AO | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B1 | 1.1b | ||||||||||||||||||||||||||||||||||||
| (1) |
Notes
B1: CAO - no blanks entries (apart from the lead diagonal) and must include \(\infty\) in cells AD, CE, DA, EC)
| Scheme | Marks | AO | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| M1 A1 | 1.1b 1.1b | ||||||||||||||||||||||||||||||||||||
| (2) | ||||||||||||||||||||||||||||||||||||||
| (7 marks) |
Notes
M1: No change in the fifth row and fifth column with at least two values reduced correctly (no blank entries – apart from the lead diagonal)
A1: CAO for the final iteration
