Maths topics › A level Further Maths › D1, algorithms and graphs
Apply Prim's algorithm to a distance matrix
A question
Free worksheet
10 questions on this objective, ready to print.
Download the worksheet (PDF)Worked solution
The working
- Start with column V: cross out row V, and look down the columns of the vertices in the tree for the least number not crossed out. Add that arc and the new vertex.
- From {V} the least arc to a new vertex is VA (16); From {V, A} the least arc to a new vertex is VG (23); From {V, A, G} the least arc to a new vertex is VW (28); From {V, A, G, W} the least arc to a new vertex is AF (43); From {V, A, G, W, F} the least arc to a new vertex is FN (22).
- (a) VA, VG, VW, AF, FN. (b) Weight \(= (16 + 23 + 28 + 43 + 22) = 132\).
- Answers: (a) VA, VG, VW, AF, FN; (b) 132.
Mathster is maths homework, practice and assessment for schools, with animated worked solutions. Try Mathster free for 60 days →
Objectives from the AS and A level subject content for further mathematics (Department for Education). Contains public sector information licensed under the Open Government Licence v3.0.