D1 January 2010 Q2

2. Prim’s algorithm finds a minimum spanning tree for a connected graph.

(a) Explain the terms
(i) connected graph,
(ii) tree,
(iii) spanning tree.
(3)
(b) Name an alternative algorithm for finding a minimum spanning tree. (1)
CambridgeLondonNorwichOxfordPortsmouthSalisburyYork
Cambridge (C)-606281132139156
London (L)60-116567488211
Norwich (N)62116-144204201181
Oxford (O)8156144-8463184
Portsmouth (P)1327420484-43269
Salisbury (S)139882016343-248
York (Y)156211181184269248-

Figure 2

Figure 2 shows the distances by road, in miles, between seven cities.

(c)
(i) Use Prim’s algorithm, starting at London, to find the minimum spanning tree for these cities.  You must clearly state the order in which you selected the edges of your tree, and the weight of the final tree.
(ii) Draw your tree using the vertices given in Diagram 2 in the answer book.
(5)