Minimum Spanning Trees

From an AS paper

Edexcel

Edexcel · Old spec

AS June 2025 Q1

EdexcelAS paperCurrent spec7 marksAlgorithmsMinimum Spanning Trees

1.

16102530131228222320

The list of ten numbers above is to be sorted into ascending order.

(a) Carry out a bubble sort, starting at the left-hand end of the list, to produce the sorted list. You should only give the state of the list after each pass. (3)
Figure 1: weighted network on vertices A to F with arcs AB 13, AC 10, AD 30, BC 12, BE 22, BF 23, CF 20, CD 28, DF 25, EF 16
Figure 1
(b) Use Prim’s algorithm, starting at A, to find the minimum spanning tree for the network in Figure 1. You must list the arcs in the order in which you select them. (2)
(c)
(i) Draw the minimum spanning tree on Diagram 1 in the answer book.
Diagram 1: the vertices A to F of Figure 1 with no arcs
Diagram 1
(ii) Find the weight of the minimum spanning tree. (2)

A2 June 2024 Q2

2. The table below represents a network of shortest distances, in miles, to travel between nine castles, A, B, C, D, E, F, G, H and J.

ABCDEFGHJ
A–5059265040876359
B50–28617963456448
C5928–335735703645
D266133–2464713733
E50795724–40643031
F4063356440–477071
G874570716447–3467
H63643637307034–33
J5948453331716733–
(a) Use Prim’s algorithm, starting at D, to find the minimum spanning tree for this network. You must clearly state the order in which you select the arcs of your tree. (3)
(b) State the weight of the minimum spanning tree found in part (a). (1)
(c) Draw the minimum spanning tree using the vertices given in Diagram 1 in the answer book. (1)
Diagram 1: the nine vertices A, B, C, D, E, F, G, H and J with no arcs
Diagram 1

A historian needs to visit all of the castles, starting and finishing at the same castle, and wishes to minimise the total distance travelled.

(d) Use your answer to part (b) to calculate an initial upper bound for the length of the historian’s route. (1)
(e)
(i) Use the nearest neighbour algorithm, starting at D, to find an upper bound for the length of the historian’s route.
(ii) Write down the route which gives this upper bound. (3)

Using the nearest neighbour algorithm, starting at F, an upper bound of length 352 miles was found.

(f) State the best upper bound that can be obtained by using this information and your answers from parts (d) and (e). Give the reason for your answer. (1)
(g) By deleting A and all of its arcs, find a lower bound for the length of the historian’s route. (2)

By deleting J and all of its arcs, a lower bound of length 274 miles was found.

(h) State the best lower bound that can be obtained by using this information and your answer to part (g). Give the reason for your answer. (1)

A2 June 2023 Q5

5.

Figure 5: network on A to J with arcs AB 34, AG 8, AF 20, AD 42, BE 50, BH 21, BC 17, GD 23, GF 48, FD 22, FE 65, CE 33, CJ 10, HJ 12, EJ 18
Figure 5

[The total weight of the network is 423]

Direct roads between nine towns, A, B, C, D, E, F, G, H and J, are represented in Figure 5. The number on each arc represents the length, in miles, of the corresponding road.

The table below shows the shortest distances, in miles, between the nine towns.

ABCDEFGHJ
A–345131792085561
B34–17654554422127
C5117–822871592210
D316582–8722238692
E79452887–65873018
F2054712265–287581
G84259238728–6369
H55212286307563–12
J6127109218816912–

Table of shortest distances

A route is needed that minimises the total distance required to traverse each road at least once.

The route must start at F and finish at J.

(a)
(i) By considering the pairings of all relevant nodes, find the roads that would need to be traversed twice.
(ii) State the total length of this route. (5)
(b) Starting at A, use Prim’s algorithm to find the minimum spanning tree for the table of shortest distances. You must state the order in which you select the arcs of your tree. (3)

Pete needs to visit all nine towns, starting and finishing in the same town, and wishes to minimise the total distance he travels.

(c) Starting at G, use the nearest neighbour algorithm on the table of shortest distances to find an upper bound for the length of Pete’s route. Write down the route that gives this upper bound. (2)
(d) By deleting G and all of its arcs, find a lower bound for the length of Pete’s route. (2)

Pete decides to take the route he found in (c).

(e) Interpret the route in terms of the actual towns visited. (1)

AS June 2023 Q3

EdexcelAS paperCurrent spec11 marksMinimum Spanning TreesShortest Path

3.

Figure 2: weighted network on vertices A to J with edges AB 40, AD 49, AE 45, BC 32, BD 6, BE 28, BF 58, CD 24, CG 41, CH 34, DG 15, EG 11, EF 30, FG 43, FJ 6, GH 23, GJ 50, HJ 61
Figure 2

Figure 2 represents a network of train tracks. The number on each edge represents the length, in kilometres, of the corresponding track.
Dyfan wishes to travel from A to J via C. Dyfan wishes to minimise the distance they travel.

Given that Dijkstra’s algorithm is to be applied only once to find Dyfan’s route,

(a) explain why the algorithm should begin at C. (1)
(b) Use Dijkstra’s algorithm to find the shortest route from A to J via C. State this route and its length. (6)
(c) Use Prim’s algorithm, starting at C, to find a minimum spanning tree for the network. You must clearly state the order in which you select the edges of your tree. (3)
(d) State the total length, in km, of the minimum spanning tree. (1)

A2 June 2022 Q6

EdexcelCurrent spec12 marksAlgorithmsMinimum Spanning Trees

6. The following algorithm determines the number of comparisons made when Prim’s algorithm is applied to \(K_n\)

Step 1Start
Step 2Input the value of \(n\)
Step 3Let \(a = 1\)
Step 4Let \(b = n - 2\)
Step 5Let \(c = b\)
Step 6Let \(a = a + 1\)
Step 7Let \(b = b - 1\)
Step 8Let \(c = c + (a \times b) + (a - 1)\)
Step 9If \(b \gt 0\) go to Step 6
Step 10Output \(c\)
Step 11Stop
(a) For \(K_5\), complete the table in the answer book to show the results obtained at each step of the algorithm. (3)

You may not need to use all the rows in this table. It may not be necessary to complete all the boxes in each row.

\(n\)\(a\)\(b\)\(c\)
    
    
    
    
    
    
    
    
    
    
    
    
    
    

Output: ____________

Figure 4: complete graph on A, B, C, D and E with arcs AB 17, AC 28, AD 24, AE 14, BC 19, BD 21, BE 15, CD 23, CE 20, DE 13
Figure 4

The weights of the ten arcs in Figure 4 are

17212414231315192820
(b)
(i) Starting at the left-hand end of the above list, sort the list into ascending order using bubble sort. You need only write down the state of the list at the end of each pass.
(ii) Find the total number of comparisons performed during the sort. (5)
(c) Find the maximum total number of comparisons required to sort the weights of the 10 arcs of \(K_5\) into ascending order using bubble sort. (1)

It is given that the maximum total number of comparisons required to sort the weights of the arcs of \(K_n\) into ascending order using bubble sort is

\(\lambda n(n - 1)(n + 1)(n - 2)\)

where \(\lambda\) is a constant.

(d) Determine the maximum total number of comparisons required to sort the weights of the arcs of \(K_{50}\) into ascending order using bubble sort. You must make your method and working clear. (3)

AS June 2022 Q1

EdexcelAS paperCurrent spec9 marksAlgorithmsMinimum Spanning Trees

1.

5544345928374152334247

The list of eleven numbers shown above is to be sorted into ascending order.

(a) Carry out a quick sort to produce the sorted list. You should show the result of each pass and identify your pivots clearly. (4)
Figure 1: weighted network on vertices A to G with arcs AC 55, AB 52, BC 41, BD 47, CD 34, CE 37, CF 33, DE 28, DG 59, EG 42, FG 44
Figure 1
(b) Use Kruskal’s algorithm to find the minimum spanning tree for the network in Figure 1. You should list the arcs in the order in which you consider them. For each arc, state whether or not you are adding it to your minimum spanning tree. (3)
(c)
(i) Draw the minimum spanning tree on Diagram 1 in the answer book.
(ii) State the total weight of the tree. (2)
Diagram 1: the vertices A to G of Figure 1 with no arcs
Diagram 1

A2 October 2021 Q3

3.

ABCDEFGH
A–24424834373222
B24–403530413944
C4240–2126453836
D483521–32372927
E34302632–344028
F3741453734–4341
G323938294043–38
H22443627284138–

Table 1

Table 1 shows the shortest distances, in miles, between eight towns, A, B, C, D, E, F, G and H.

(a) Use Prim’s algorithm, starting at A, to find the minimum spanning tree for this table of distances. You must clearly state the order in which you select the edges of your tree. (3)
(b) State the weight of the minimum spanning tree. (1)
ABCDEFGH
J3127502943254935

Table 2

Table 2 shows the distances, in miles, between town J and towns A, B, C, D, E, F, G and H.

Pranav needs to visit all of the towns, starting and finishing at J, and wishes to minimise the total distance he travels.

(c) Starting at J, use the nearest neighbour algorithm to obtain an upper bound for the length of Pranav’s route. You must state your route and its length. (2)
(d) Starting by deleting J, and all of its edges, find a lower bound for the length of Pranav’s route. (2)

AS October 2020 Q3

EdexcelAS paperCurrent spec11 marksMinimum Spanning TreesRoute Inspection

3.

Figure 2: network on vertices A to H with arcs AB 2x + 10, AD 3x – 2, BC 30, BD 20, BG 25, CE 42, CG 15, DG 8, DH 7, EF 12, EG 23, FG 10, FH 29, GH 17
Figure 2

[The weight of the network is \(5x + 246\)]

(a) Explain why it is not possible to draw a graph with an odd number of vertices of odd valency. (2)

Figure 2 represents a network of 14 roads in a town. The expression on each arc gives the time, in minutes, to travel along the corresponding road.

Prim’s algorithm, starting at A, is applied to the network. The order in which the arcs are selected is AD, DH, DG, FG, EF, CG, BD. It is given that the order in which the arcs are selected is unique.

(b) Using this information, find the smallest possible range of values for \(x\), showing your working clearly. (3)

A route that minimises the total time taken to traverse each road at least once is required. The route must start and finish at the same vertex.

Given that the time taken to traverse this route is 318 minutes,

(c) use an appropriate algorithm to determine the value of \(x\), showing your working clearly. (6)

A2 October 2020 Q1

EdexcelCurrent spec6 marksMinimum Spanning Trees

1. The table below shows the lengths, in km, of the roads in a network connecting seven towns, A, B, C, D, E, F and G.

ABCDEFG
A–24–2235––
B24–2527–––
C–25–33313626
D222733––42–
E35–31––3729
F––364237–40
G––26–2940–
(a) By adding the arcs from vertex D along with their weights, complete the drawing of the network on Diagram 1 in the answer book. (2)
Diagram 1: the network drawn without the arcs from D: AB 24, AE 35, BC 25, CE 31, CF 36, CG 26, EF 37, EG 29, FG 40; vertex D has no arcs
Diagram 1
(b) Use Kruskal’s algorithm to find a minimum spanning tree for the network. You should list the arcs in the order that you consider them. In each case, state whether you are adding the arc to your minimum spanning tree. (3)
(c) State the weight of the minimum spanning tree. (1)

D1 June 2019 Q3

3.

ABCDEFGHJ
A–385–––––
B3–4––––––
C84––94–––
D5––––749–
E––9––4––7
F––474––813
G–––4–––4–
H–––9–84–7
J––––713–7–

The table above shows the lengths, in metres, of the paths between nine vertices, A, B, C, D, E, F, G, H and J.

(a) Use Prim’s algorithm, starting at A, to find a minimum spanning tree for this table of distances. You must clearly state the order in which you select the edges and state its weight. Draw your minimum spanning tree using the vertices in the answer book. (5)
(b) State whether your minimum spanning tree is unique. Justify your answer. (1)
(c) Use Dijkstra’s algorithm to find the length of the shortest path from A to J. (5)

D1 June 2018 Q1

EdexcelOld spec8 marksMinimum Spanning Trees

1.

Figure 1: weighted network with vertices A to J
Figure 1
(a) Define the terms
(i) tree,
(ii) minimum spanning tree. (3)
(b) Use Prim’s algorithm, starting at A, to find a minimum spanning tree for the network shown in Figure 1. You must clearly state the order in which you select the arcs of the tree. (3)
(c) Draw the minimum spanning tree using the vertices given in Diagram 1 in the answer book and state the weight of the tree. (2)

D1 June 2017 Q2

EdexcelOld spec7 marksMinimum Spanning Trees

2.

Figure 3: weighted network of nine computer terminals A to J
Figure 3

Figure 3 represents nine computer terminals, A, B, C, D, E, F, G, H and J, at Pearsonby School. The school wishes to connect them to form a single computer network. The number on each arc represents the cost, in pounds, of connecting the corresponding computer terminals.

(a) Use Prim’s algorithm, starting at B, to find the minimum spanning tree for the computer network. You must clearly state the order in which you select the arcs of your tree. (3)
(b) State the minimum cost of connecting the nine computer terminals. (1)

It is discovered that some computer terminals are already connected. There are already direct connections along BD and FJ, as shown in bold in Diagram 1 in the answer book. It is decided to use these connections.

(c) Use Kruskal’s algorithm to find the minimum spanning tree that includes arcs BD and FJ. You must list the arcs in the order that you consider them. In each case, state whether or not you are adding the arcs to your spanning tree. (3)

D1 June 2016 Q4

4.

Figure 3: weighted network of tram tracks with vertices A to K
Figure 3

Figure 3 represents a network of tram tracks. The number on each edge represents the length, in miles, of the corresponding track. One day, Sarah wishes to travel from A to F. She wishes to minimise the distance she travels.

(a) Use Dijkstra’s algorithm to find the shortest path from A to F. State your path and its length. (6)

On another day, Sarah wishes to travel from A to F via J.

(b) Find a route of minimal length that goes from A to F via J and state its length. (2)
(c) Use Prim’s algorithm, starting at G, to find the minimum spanning tree for the network. You must clearly state the order in which you select the edges of your tree. (3)
(d) State the length, in miles, of the minimum spanning tree. (1)

D1 June 2015 Q5

EdexcelOld spec10 marksMinimum Spanning Trees

5.

Figure 5: weighted network with nine nodes A to J and 17 arcs
Figure 5

The numbers on the 17 arcs in the network shown in Figure 5 represent the distances, in km, between nine nodes, A, B, C, D, E, F, G, H and J.

(a) Use Kruskal’s algorithm to find a minimum spanning tree for the network. You should list the arcs in the order in which you consider them. In each case, state whether you are adding the arc to your minimum spanning tree. (3)
(b) Starting at G, use Prim’s algorithm to find a minimum spanning tree. You must clearly state the order in which you select the arcs of your tree. (3)
(c) Find the weight of the minimum spanning tree. (1)

A connected graph V has \(n\) nodes. The sum of the degrees of all the nodes in V is \(m\). The graph T is a minimum spanning tree of V.

(d)
(i) Write down, in terms of \(m\), the number of arcs in V.
(ii) Write down, in terms of \(n\), the number of arcs in T.
(iii) Hence, write down an inequality, in terms of \(m\) and \(n\), comparing the number of arcs in T and V. (3)

D1 June 2014 Q1

EdexcelOld spec5 marksMinimum Spanning Trees

1.

ArtBiologyChemistryDramaEnglishFrenchGraphics
Art (A)–619373504842
Biology (B)61–11482836358
Chemistry (C)93114–59947788
Drama (D)738259–8910441
English (E)50839489–9175
French (F)48637710491–68
Graphics (G)425888417568–

The table shows the travelling times, in seconds, to walk between seven departments in a college.

(a) Use Prim’s algorithm, starting at Art, to find the minimum spanning tree for the network represented by the table. You must clearly state the order in which you select the edges of your tree. (3)
(b) Draw the minimum spanning tree using the vertices given in Diagram 1 in the answer book. (1)
(c) State the weight of the tree. (1)

D1 June 2013 (R) Q2

EdexcelOld spec8 marksMinimum Spanning Trees

2.

ABCDEF
A–85110160225195
B85–100135180150
C110100–215200165
D160135215–235215
E225180200235–140
F195150165215140–

The table shows the average journey time, in minutes, between six towns, A, B, C, D, E and F.

(a) Use Prim’s algorithm, starting at A, to find a minimum spanning tree for this network. You must list the arcs that form your tree in the order in which you selected them. (3)
(b) Draw your tree using the vertices given in Diagram 1 in the answer book. (1)
(c) Find the weight of your minimum spanning tree. (1)

Kruskal’s algorithm may also be used to find a minimum spanning tree.

(d) State three differences between Prim’s algorithm and Kruskal’s algorithm. (3)

D1 June 2013 Q3

EdexcelOld spec10 marksMinimum Spanning Trees

3.

ABCDEF
A-1569--
B15-12-14-
C612-710-
D9-7-1117
E-141011-5
F---175-

The table shows the times, in days, needed to repair the network of roads between six towns, A, B, C, D, E and F, following a flood.

(a) Use Prim’s algorithm, starting at A, to find the minimum connector for this network. You must list the arcs that form your tree in the order that you selected them. (3)
(b) Draw your minimum connector using the vertices given in Diagram 1 in the answer book. (1)
(c) Add arcs from D, E and F to Diagram 2 in the answer book, so that it shows the network of roads shown by the table. (2)
(d) Use Kruskal’s algorithm to find the minimum connector. You should list the arcs in the order in which you consider them. In each case, state whether you are adding the arc to your minimum connector. (3)
(e) State the minimum time needed, in days, to reconnect the six towns. (1)

D1 January 2013 Q5

5.

Figure 5: network of roads A to J with lengths in km
Figure 5

[The weight of the network is 379]

Figure 5 represents the roads in a highland wildlife conservation park. The vertices represent warden stations. The number on each arc gives the length, in km, of the corresponding road.

During the winter months the park is closed. It is only necessary to ensure road access to the warden stations.

(a) Use Prim’s algorithm, starting at A, to find a minimum connector for the network in Figure 5. You must state the order in which you include the arcs. (3)
(b) Given that it costs £80 per km to keep the selected roads open in winter, calculate the minimum cost of ensuring road access to all the warden stations. (2)

At the end of winter, Ben inspects all the roads before the park re-opens. He needs to travel along each road at least once. He will start and finish at A, and wishes to minimise the length of his route.

(c) Use the route inspection algorithm to find the roads that will be traversed twice. You must make your method and working clear. (6)
(d) Find the length of the shortest inspection route. (1)

If Ben starts and finishes his inspection route at different warden stations, a shorter inspection route is possible.

(e) Determine the two warden stations Ben should choose as his starting and finishing points in order that his route has minimum length. Give a reason for your answer and state the length of the route. (3)

D1 June 2012 Q3

EdexcelOld spec7 marksMinimum Spanning Trees

3.

ABCDEFG
A-1519-2224-
B15--813--
C19--12-16-
D-812-10-18
E2213-10-1516
F24-16-15-17
G---181617-

The table shows the lengths, in km, of a network of roads between seven villages, A, B, C, D, E, F and G.

(a) Complete the drawing of the network in Diagram 1 of the answer book by adding the necessary arcs from vertex D together with their weights. (2)
(b) Use Kruskal’s algorithm to find a minimum spanning tree for the network. You should list the arcs in the order that you consider them. In each case, state whether you are adding the arc to your minimum spanning tree. (3)
(c) Draw the minimum spanning tree using the vertices provided in Diagram 2 in the answer book. (1)
(d) State the weight of the minimum spanning tree. (1)

D1 January 2012 Q1

EdexcelOld spec8 marksMinimum Spanning Trees

1.

Figure 1: network with arcs AB 25, AD 19, BC 21, BE 30, CD 11, CF 15, DF 16, DH 39, EF 33, EG 13, FG 37, FH 40, HG 57
Figure 1

Figure 1 represents the distances, in km, between eight vertices, A, B, C, D, E, F, G and H in a network.

(a) Use Kruskal’s algorithm to find the minimum spanning tree for the network. You should list the arcs in the order in which you consider them. In each case, state whether you are adding the arc to your minimum spanning tree. (3)
(b) Starting at A, use Prim’s algorithm to find the minimum spanning tree. You must clearly state the order in which you selected the arcs of your tree. (3)
(c) Draw the minimum spanning tree using the vertices given in Diagram 1 in the answer book. (1)
(d) State the weight of the tree. (1)

D1 June 2011 Q2

2.

Figure 1: network with arcs AC 14, AB 10, BC 13, CF 18, CE 17, BF 20, BE 15, BD 14, DF 19, EF 18, DE 12
Figure 1
(a) Define the terms
(i) tree,
(ii) minimum spanning tree.
(3)
(b) Use Kruskal’s algorithm to find a minimum spanning tree for the network shown in Figure 1. You should list the arcs in the order in which you consider them. In each case, state whether you are adding the arc to your minimum spanning tree. (3)
(c) Draw your minimum spanning tree using the vertices given in Diagram 1 in the answer book. (1)
(d) State whether your minimum spanning tree is unique. Justify your answer. (1)

D1 January 2011 Q3

EdexcelOld spec10 marksMinimum Spanning Trees

3.

Figure 2: network with arcs AB 48, AI 53, BC 39, BI 42, CD 23, CI 19, DI 26, DE 38, EI 34, EF 28, FI 31, FG 43, GI 45, HI 39, HG 46
Figure 2
(a) Use Kruskal’s algorithm to find a minimum spanning tree for the network shown in Figure 2. You should list the arcs in the order in which you consider them. In each case, state whether you are adding the arc to your minimum spanning tree. (3)
(b) Starting at A, use Prim’s algorithm to find a minimum spanning tree for the network in Figure 2. You must clearly state the order in which you include the arcs in your tree. (3)
(c) Draw a minimum spanning tree for the network in Figure 2 using the vertices given in Diagram 1 of the answer book. State the weight of the minimum spanning tree. (2)

A new spanning tree is required which includes the arcs DI and HG, and which has the lowest possible total weight.

(d) Explain which algorithm you would choose to complete the tree, and how the algorithm should be adapted. (You do not need to find the tree.) (2)

D1 June 2010 Q2

EdexcelOld spec9 marksMinimum Spanning Trees

2.

Figure 1: network with arcs AC 30, AB 31, CF 29, CE 24, CD 22, DE 18, BD 24, DH 34, BH 38, EF 28, EG 26, FG 21, GH 33
Figure 1

Figure 1 represents the distances, in metres, between eight vertices, A, B, C, D, E, F, G and H, in a network.

(a) Use Kruskal’s algorithm to find a minimum spanning tree for the network.
You should list the arcs in the order in which you consider them. In each case, state whether you are adding the arc to your minimum spanning tree. (3)
(b) Complete Matrix 1 in your answer book, to represent the network. (2)
(c) Starting at A, use Prim’s algorithm to determine a minimum spanning tree. You must clearly state the order in which you considered the vertices and the order in which you included the arcs. (3)
(d) State the weight of the minimum spanning tree. (1)

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)

D1 June 2009 Q1

EdexcelOld spec5 marksMinimum Spanning Trees

1.

ABCDEF
A-1351807095225
B135-215125205240
C180215-150165155
D70125150-100195
E95205165100-215
F225240155195215-

The table shows the lengths, in km, of potential rail routes between six towns, A, B, C, D, E and F.

(a) Use Prim’s algorithm, starting from A, to find a minimum spanning tree for this table. You must list the arcs that form your tree in the order that they are selected. (3)
(b) Draw your tree using the vertices given in Diagram 1 in the answer book. (1)
(c) State the total weight of your tree. (1)

D1 January 2009 Q2

EdexcelOld spec8 marksMinimum Spanning Trees

2.

ABCDEF
A-24--2322
B24-18191720
C-18-1114-
D-1911-13-
E23171413-21
F2220--21-

The table shows the distances, in metres, between six vertices, A, B, C, D, E and F, in a network.

(a) Draw the weighted network using the vertices given in Diagram 1 in the answer booklet. (3)
(b) Use Kruskal’s algorithm to find a minimum spanning tree. You should list the edges in the order that you consider them and state whether you are adding them to your minimum spanning tree. (3)
(c) Draw your tree on Diagram 2 in the answer booklet and find its total weight. (2)

D1 June 2008 Q4

EdexcelOld spec8 marksMinimum Spanning Trees

4.

Figure 4: network with vertices A to G and arc weights
Figure 4
(a) State two differences between Kruskal’s algorithm and Prim’s algorithm for finding a minimum spanning tree. (2)
(b) Listing the arcs in the order that you consider them, find a minimum spanning tree for the network in Figure 4, using
(i) Prim’s algorithm,
(ii) Kruskal’s algorithm. (6)

D1 January 2008 Q2

EdexcelOld spec10 marksAlgorithmsMinimum Spanning Trees

2.

(a)
18201171715142123169

The list of numbers shown above is to be sorted into ascending order. Apply quick sort to obtain the sorted list. You must make your pivots clear. (5)

Figure 3: network of paths with vertices A to I and arc lengths in metres
Figure 3

Figure 3 represents a network of paths in a park. The number on each arc represents the length of the path in metres.

(b) Using your answer to part (a) and Kruskal’s algorithm, find a minimum spanning tree for the network in Figure 3. You should list the arcs in the order in which you consider them and state whether you are adding it to your minimum spanning tree. (4)
(c) Find the total weight of the minimum spanning tree. (1)

D1 June 2007 Q5

EdexcelOld spec7 marksMinimum Spanning Trees

5.

MABCDE
M–215170290210305
A215–275100217214
B170275–267230200
C290100267–180220
D210217230180–245
E305214200220245–

The table shows the cost, in pounds, of linking five automatic alarm sensors, A,B,C,D and E, and the main reception, M.

(a) Use Prim’s algorithm, starting from M, to find a minimum spanning tree for this table of costs. You must list the arcs that form your tree in the order that they are selected. (3)
(b) Draw your tree using the vertices given in Diagram 1 in the answer book. (1)
(c) Find the total weight of your tree. (1)
(d) Explain why it is not necessary to check for cycles when using Prim’s algorithm. (2)

D1 January 2006 Q2

2.

\(A\)\(B\)\(C\)\(D\)\(E\)\(F\)\(G\)
\(A\)–4811792–––
\(B\)48––––6355
\(C\)117––28––85
\(D\)92–28–58132–
\(E\)–––58–124–
\(F\)–63–132124––
\(G\)–5585––––

The table shows the lengths, in metres, of the paths between seven vertices \(A\), \(B\), \(C\), \(D\), \(E\), \(F\) and \(G\) in a network N.

(a) Use Prim’s algorithm, starting at \(A\), to solve the minimum connector problem for this table of distances. You must clearly state the order in which you selected the edges of your tree, and the weight of your final tree. Draw your tree using the vertices given in Diagram 1 in the answer book. (5)
(b) Draw N using the vertices given in Diagram 2 in the answer book. (3)
(c) Solve the Route Inspection problem for N. You must make your method of working clear. State a shortest route and find its length.
(The weight of N is 802.) (7)

D1 January 2005 Q3

EdexcelOld spec8 marksMinimum Spanning Trees

3.

Figure 2: weighted network on A to J
Figure 2

The network in Figure 2 shows the distances, in metres, between 10 wildlife observation points. The observation points are to be linked by footpaths, to form a network along the arcs indicated, using the least possible total length.

(a) Find a minimum spanning tree for the network in Figure 2, showing clearly the order in which you selected the arcs for your tree, using
(i) Kruskal’s algorithm, (3)
(ii) Prim’s algorithm, starting from \(A\). (3)

Given that footpaths are already in place along \(AB\) and \(FI\) and so should be included in the spanning tree,

(b) explain which algorithm you would choose to complete the tree, and how it should be adapted. (You do not need to find the tree.) (2)