All topic tests topics

D1: Algorithms on graphsEdexcel International A Level Maths: Topic test

20 questions, 54 marks

Edexcel International A Level Maths

D1: Algorithms on graphs topic test

Total 54 marks

Name

Class

Date

  1. 1
    A graph GG has vertices PP, QQ, RR, SS and TT, and edges PQPQ, PRPR, QRQR, QSQS, RSRS and STST.
    (a)
    How many vertices of GG have odd degree?
    [1 mark]
    • A22
    • B33
    • C44
    • D55
    (b)
    Which of the following is a cycle in GG?
    [1 mark]
    • AP−Q−S−TP-Q-S-T
    • BQ−R−S−T−S−QQ-R-S-T-S-Q
    • CP−Q−R−S−T−PP-Q-R-S-T-P
    • DP−Q−S−R−PP-Q-S-R-P
    (c)
    State the number of edges in any spanning tree of GG, and list the edges of one spanning tree of GG.
    [2 marks]

    Total for question 1: 4 marks

  2. 2
    The complete graph K7K_7 has 7 vertices, and every pair of vertices is joined by exactly one edge.
    (a)
    How many edges does K7K_7 have?
    [1 mark]
    • A2121
    • B4242
    • C1414
    • D77
    (b)
    How many edges does a spanning tree of K7K_7 have?
    [1 mark]
    • A55
    • B66
    • C77
    • D1515
    (c)
    Show that the sum of the degrees of the vertices of K7K_7 is twice the number of edges of K7K_7.
    [2 marks]

    Total for question 2: 4 marks

  3. 3
    A network joins six stations UU, VV, WW, XX, YY and ZZ. The cost of laying cable along each possible route, in hundreds of pounds, is: UV=6UV=6, UW=9UW=9, VW=4VW=4, VX=11VX=11, WX=7WX=7, WY=10WY=10, XY=5XY=5, XZ=8XZ=8 and YZ=13YZ=13. The stations are to be connected at minimum total cost.
    (a)
    Use Kruskal's algorithm to find a minimum spanning tree. List the arcs in the order in which they are accepted, and state the total weight of the tree.
    [3 marks]
    (b)
    Use Prim's algorithm, starting at UU, to find the minimum spanning tree. List the arcs in the order in which they are selected, and state the total weight of the tree.
    [4 marks]

    Total for question 3: 7 marks

  4. 4
    A courier network joins seven depots HH, JJ, KK, LL, MM, NN and ZZ. The road lengths, in km, are: HK=14HK=14, HM=11HM=11, HN=4HN=4, JL=13JL=13, JM=9JM=9, KL=6KL=6, KZ=7KZ=7, LN=2LN=2, LZ=8LZ=8, MN=3MN=3 and MZ=12MZ=12. There are no other direct roads.
    (a)
    Use Dijkstra's algorithm to find the shortest route from HH to ZZ. Show the order in which the depots are given permanent labels and the working values at each stage, and state the route and its length.
    [6 marks]
    (b)
    (i) Write down the vertices of odd degree, and show that the sum of the degrees of all the vertices is consistent with the number of roads.
    (ii) Use Kruskal's algorithm to find a minimum spanning tree for the network, listing the arcs accepted and rejected, and state its total weight.
    [6 marks]

    Total for question 4: 12 marks

  5. 5
    Kruskal's algorithm is applied to a network with five vertices VV, WW, XX, YY and ZZ. The arcs, in increasing order of weight, are VW=2VW=2, XY=3XY=3, WX=4WX=4, VY=5VY=5, YZ=6YZ=6, WZ=7WZ=7 and XZ=9XZ=9.
    (a)
    Which arc is the first to be rejected?
    [1 mark]
    • AVYVY
    • BWZWZ
    • CXZXZ
    • DWXWX
    (b)
    Find the total weight of the minimum spanning tree.
    [1 mark]
    • A99
    • B1616
    • C1515
    • D3636
    (c)
    Use Prim's algorithm, starting at VV, and list the arcs in the order in which they are selected.
    [2 marks]

    Total for question 5: 4 marks

  6. 6
    Dijkstra's algorithm is used to find the shortest route from SS to DD in a network with five vertices SS, AA, BB, CC and DD. The arcs and their lengths are SA=4SA=4, SB=7SB=7, AB=2AB=2, AC=9AC=9, BC=3BC=3, BD=8BD=8 and CD=2CD=2.
    (a)
    Find the final label of vertex BB.
    [1 mark]
    • A77
    • B66
    • C22
    • D99
    (b)
    Find the shortest route from SS to DD.
    [1 mark]
    • AS−B−DS-B-D
    • BS−B−C−DS-B-C-D
    • CS−A−C−DS-A-C-D
    • DS−A−B−C−DS-A-B-C-D
    (c)
    The working value of CC is 13 after AA is given its permanent label, but it is 9 after BB is given its permanent label. Explain why the working value changes.
    [2 marks]

    Total for question 6: 4 marks

  7. 7
    A tree TT has 10 vertices. Exactly 6 of the vertices have degree 1, and the other 4 vertices all have the same degree.
    (a)
    Find the degree of each of the 4 vertices that do not have degree 1.
    [3 marks]
    (b)
    A connected graph HH has 10 vertices and 12 edges.
    (i) State the number of edges in a spanning tree of
    HH.
    (ii) Find the number of edges that must be removed from
    HH to leave a spanning tree.
    (iii) Explain why any 3 edges of
    HH cannot simply be removed.
    [4 marks]

    Total for question 7: 7 marks

  8. 8
    A network joins six sensors PP, QQ, RR, SS, TT and UU. The lengths of the possible cables, in metres, are: PQ=2PQ=2, PR=9PR=9, PS=4PS=4, PT=15PT=15, QT=10QT=10, QU=14QU=14, RS=6RS=6, RT=5RT=5, SU=13SU=13 and TU=3TU=3.
    (a)
    Use Prim's algorithm, starting at PP, to find a minimum spanning tree. List the arcs in the order in which they are selected, and state the total weight of the tree.
    [6 marks]
    (b)
    (i) Use Dijkstra's algorithm to find the shortest route from PP to UU, showing the working values, and state its length.
    (ii) Find the length of the route from
    PP to UU that uses only cables in the minimum spanning tree from (a), and explain why it is not the shortest route.
    [6 marks]

    Total for question 8: 12 marks

End of questions

Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).