1.
(5)
(Total for Question 1 is 5 marks)
2 specification points · notes, questions, answers and worked methods
Checked against Edexcel 9FM0 section D1-2. Review basis: the qualification registry sourced from the Pearson Edexcel Level 3 Advanced GCE in Further Mathematics (9FM0) specification; registry verification recorded 17 July 2026.
Explanation
Worked example
A network has vertices , , , and arcs , , , , , . Use Kruskal's algorithm to find the minimum spanning tree.
Answer: The minimum spanning tree uses , and and has weight .
Common mistakes
Exam tip
State the arcs in the order your algorithm selects them; examiners award marks for the correct selection order as well as the final weight.
1.
(5)
(Total for Question 1 is 5 marks)
2.
(3)
(Total for Question 2 is 3 marks)
1.
(6)
(Total for Question 1 is 6 marks)
2.
(6)
(Total for Question 2 is 6 marks)
3.
(6)
(Total for Question 3 is 6 marks)
1.
(7)
(Total for Question 1 is 7 marks)
2.
(5)
(Total for Question 2 is 5 marks)
3.
(7)
(Total for Question 3 is 7 marks)
4.
(6)
(Total for Question 4 is 6 marks)
5.
(7)
(Total for Question 5 is 7 marks)
Explanation
Worked example
In a network with vertices , , , and arcs , , , , , use Dijkstra's algorithm from to find the shortest path to .
Answer: The shortest path is with length , found by tracing back from through the arcs whose weights match the differences in final labels.
Common mistakes
Exam tip
Never rub out a working value: examiners award marks for the full list of working values in each box, and the crossed-out values show the algorithm was followed.
1.
(6)
(Total for Question 1 is 6 marks)
2.
(3)
(Total for Question 2 is 3 marks)
1.
(7)
(Total for Question 1 is 7 marks)
2.
(7)
(Total for Question 2 is 7 marks)
3.
(6)
(Total for Question 3 is 6 marks)
1.
(8)
(Total for Question 1 is 8 marks)
2.
(6)
(Total for Question 2 is 6 marks)
3.
(8)
(Total for Question 3 is 8 marks)
4.
(5)
(Total for Question 4 is 5 marks)
5.
(7)
(Total for Question 5 is 7 marks)
Answers begin on a new printed page so the question pack can be completed without the solutions alongside it.
| Question | Scheme | Marks |
|---|---|---|
| 1 |
| 5 |
| (5 marks) | 5 | |
| Notes | ||
| Sorting the arcs gives . Adding , and creates no cycle and connects , , , . The next arc would close the cycle , so it is rejected. Then brings in the last vertex , giving arcs, so the algorithm terminates with weight . | ||
| 2 |
| 3 |
| (3 marks) | 3 | |
| Notes | ||
| A tree is a connected graph with no cycles, and it is spanning when it includes every vertex of the original network. Building a tree by adding one arc at a time connects one new vertex per arc after the first vertex, so a tree on vertices always has exactly arcs; with that gives arcs. | ||
| Question | Scheme | Marks |
|---|---|---|
| 1 |
| 6 |
| (6 marks) | 6 | |
| Notes | ||
| Starting from , the shortest arc out of is . From the choices are , , , , , , and the shortest is . From the shortest arc to a new vertex is , since is longer. From the shortest is , as , and are all longer. Finally brings in . The five arcs total . | ||
| 2 |
| 6 |
| (6 marks) | 6 | |
| Notes | ||
| Sorting gives . Arc starts a component ; starts a second one, which and then extend to ; finally joins those two components together. Every arc taken has its two endpoints in different components at the moment it is tested, so no cycle is ever formed and this network gives the algorithm nothing to reject. After the tree has arcs spanning all six vertices, so Kruskal's algorithm terminates and , , , and are never reached. The total weight is , matching Prim's answer as it must. | ||
| 3 |
| 6 |
| (6 marks) | 6 | |
| Notes | ||
| Taking arcs in ascending order, starts one component and another; and extend the second to ; extends the first to . The next arc is the first that joins the two components, and it is accepted. That gives arcs covering all seven vertices, so , , , , and are never required. The weight is . | ||
| Question | Scheme | Marks |
|---|---|---|
| 1 |
| 7 |
| (7 marks) | 7 | |
| Notes | ||
| From the arcs available are , , , so is chosen. From the shortest arc to a new vertex is . From the candidates are , , , , , so is chosen. From the candidates are , , , , so is chosen. From the shortest is , and finally beats . Both algorithms must return the same minimum weight, and confirms it. | ||
| 2 |
| 5 |
| (5 marks) | 5 | |
| Notes | ||
| Prim's algorithm grows one connected tree and only ever considers arcs from a vertex inside the tree to a vertex outside it, so adding such an arc joins a new vertex and leaves a tree. Kruskal's algorithm builds a forest of several components at once, so an arc taken in weight order can have both endpoints in the same component; that arc must be rejected, which is exactly the cycle test. If a problem gives the arcs already listed with their weights, Kruskal needs only a sort and a connectivity check, while Prim would first have to reconstruct which arcs meet each vertex. | ||
| 3 |
| 7 |
| (7 marks) | 7 | |
| Notes | ||
| From the arcs are , , , so is chosen. From the candidates are , , , , , , and wins. From the shortest arc to a new vertex is ; then ; then . The arcs selected are the same five as when Prim starts at , though in a different order, and the weight is . In general the start vertex changes the order of selection but not the set of minimum-weight trees, because the minimum connector is determined by the arc weights alone. | ||
| 4 |
| 6 |
| (6 marks) | 6 | |
| Notes | ||
| Deleting an arc of a spanning tree always leaves exactly two components. Every spanning tree of the reduced network must include at least one arc across the cut between them, so its weight is at least plus the smallest crossing weight; taking the cheapest crossing arc, of weight , achieves that bound and gives . An arc whose endpoints lie in the same component adds a cycle to that component while leaving the other component unreachable, so it fails the spanning condition and cannot serve as the replacement. | ||
| 5 |
| 7 |
| (7 marks) | 7 | |
| Notes | ||
| The arcs and are the two cheapest and connect , and for . Two further arcs must bring in and . With available the cheapest pair is followed by , costing ; the alternative then costs and is never better. Without the cheapest pair is followed by , costing , which beats with at . The tree weight is therefore , so appears exactly while , with both trees weighing at . At the arc is not used and the tree , , , has weight . | ||
| Question | Scheme | Marks |
|---|---|---|
| 1 |
| 6 |
| (6 marks) | 6 | |
| Notes | ||
| Label with . Its neighbours take working values and , so is labelled second with . From , improves to and takes , so is labelled third with . From , improves to and takes , so is labelled fourth with . From , improves to , so is labelled fifth with . Tracing back, , , and , giving the path . | ||
| 2 |
| 3 |
| (3 marks) | 3 | |
| Notes | ||
| The box records, in order, when the vertex was made permanent, the shortest distance to it from the start, and every trial distance found on the way. Each time a vertex is given a final label, all of its unlabelled neighbours are offered the new final label plus the connecting arc; whenever that offer beats the values already written, it is added to the list. The last, smallest working value becomes the final label. | ||
| Question | Scheme | Marks |
|---|---|---|
| 1 |
| 7 |
| (7 marks) | 7 | |
| Notes | ||
| Labelling with offers and , so is made final at . From , improves to and takes ; becomes final at . From , improves to and takes ; becomes final at . From , takes , and at is smaller, so becomes final at . From , would be , which does not beat , so is final at . Tracing back, , , and , giving . | ||
| 2 |
| 7 |
| (7 marks) | 7 | |
| Notes | ||
| The first four final labels are , , and . From , takes ; from , improves to and takes ; from , improves to . The smallest working value is now , which becomes final; from , improves to and takes . Then becomes final and offers the value , which beats , so is final at . | ||
| 3 |
| 6 |
| (6 marks) | 6 | |
| Notes | ||
| The distance matrix records the direct arc weights with zeros on the diagonal and a dash where no arc exists; the route matrix starts with column filled entirely with the label . Iteration tests every against . The only entries that are currently missing and can be filled through are and , each becoming , and their route entries are set to and respectively. Entries such as are already shorter than any route through , so they are unchanged. | ||
| Question | Scheme | Marks |
|---|---|---|
| 1 |
| 8 |
| (8 marks) | 8 | |
| Notes | ||
| Iteration fills with route entry . Iteration gives with , and symmetrically with . Iteration gives , improving on , with , and symmetrically with . Iteration gives , improving on , with , and symmetrically with . Reading the route matrix, to goes first to and then to goes direct, so the route is ; to goes first to and then direct, giving . | ||
| 2 |
| 6 |
| (6 marks) | 6 | |
| Notes | ||
| Dijkstra's correctness rests on non-negative weights: the smallest outstanding working value cannot be beaten by extending any longer route, so making it final is safe and the destination's label is already optimal when it is made final. Floyd's algorithm, by contrast, considers intermediate vertices one at a time, and after iteration the matrix holds the shortest routes that use only to as intermediates. A route that passes through a later vertex is simply not yet representable, so the algorithm has no valid stopping point before the final iteration. | ||
| 3 |
| 8 |
| (8 marks) | 8 | |
| Notes | ||
| Dijkstra from gives final labels , , , , , , , and tracing back through , , and gives . If is changed to the length of that route becomes . Every route to finishes with or . The best route reaching without using is , of length , which beats at , so the best rival through is ; the best route using is then , of length . The binding rival is therefore , and stays shortest while , that is , an increase of at most . | ||
| 4 |
| 5 |
| (5 marks) | 5 | |
| Notes | ||
| The trace-back rule is that an arc lies on a shortest route to exactly when the final label of minus the final label of equals the weight of ; here confirms that is such an arc, so appending to any shortest route to gives a shortest route to . The rule identifies one valid predecessor, not a unique one: if some other vertex also satisfies the equality, the network has two distinct shortest routes to of the same total length, and the trace-back would legitimately produce either. | ||
| 5 |
| 7 |
| (7 marks) | 7 | |
| Notes | ||
| Removing also removes every arc incident to it, leaving only , , and . From the sole first step is ; from the sole onward step is ; from the sole onward step is . The vertex now hangs off alone, so it cannot appear on a route into . The unique route is therefore of length , which is more than the original shortest route of length . | ||