All topic tests topics

Decision Mathematics 1: Algorithms on graphsEdexcel A-Level Further Maths: Topic test

20 questions, 54 marks

Edexcel A-Level Further Maths

Decision Mathematics 1: Algorithms on graphs topic test

Total 54 marks

Name

Class

Date

  1. 1
    A network has six vertices AA, BB, CC, DD, EE and FF. The weights of the edges are AB=6AB=6, AC=3AC=3, BC=4BC=4, BD=7BD=7, CD=5CD=5, CE=8CE=8, DE=2DE=2, DF=9DF=9 and EF=10EF=10.
    (a)
    When Kruskal's algorithm is applied to the network, which edge is the first to be rejected?
    [1 mark]
    • ADEDE
    • BABAB
    • CBDBD
    • DCECE
    (b)
    What is the total weight of the minimum spanning tree?
    [1 mark]
    • A1414
    • B2424
    • C2929
    • D2323
    (c)
    Use Prim's algorithm, starting at AA, to list the edges of the minimum spanning tree in the order in which they are added.
    [2 marks]

    Total for question 1: 4 marks

  2. 2
    A road network joins towns SS, AA, BB, CC, DD and TT. The road lengths in km are SA=4SA=4, SB=7SB=7, AB=2AB=2, AC=6AC=6, BC=3BC=3, BD=9BD=9, CD=5CD=5, CT=10CT=10 and DT=4DT=4. Dijkstra's algorithm is used to find the shortest route from SS to TT.
    (a)
    What is the final (permanent) label of CC?
    [1 mark]
    • A99
    • B1010
    • C1212
    • D33
    (b)
    In which order do the vertices receive their permanent labels?
    [1 mark]
    • AS,B,A,C,D,TS, B, A, C, D, T
    • BS,A,C,B,D,TS, A, C, B, D, T
    • CS,A,B,C,D,TS, A, B, C, D, T
    • DS,A,B,D,C,TS, A, B, D, C, T
    (c)
    The road BCBC is closed. Find the new shortest distance from SS to TT.
    [2 marks]

    Total for question 2: 4 marks

  3. 3
    Floyd's algorithm is applied to a directed network with four vertices AA, BB, CC and DD. The initial distance matrix, with rows and columns in the order AA, BB, CC, DD and ∞\infty meaning that there is no direct arc, is (04∞10305∞∞2036∞70)\begin{pmatrix} 0 & 4 & \infty & 10 \\ 3 & 0 & 5 & \infty \\ \infty & 2 & 0 & 3 \\ 6 & \infty & 7 & 0 \end{pmatrix}. In iteration kk the intermediate vertex is the kkth vertex, taken in the order AA, BB, CC, DD.
    (a)
    Complete iteration 1 and write down the updated distance matrix.
    [3 marks]
    (b)
    Complete iterations 2, 3 and 4 to find the final distance matrix.
    [4 marks]

    Total for question 3: 7 marks

  4. 4
    A network has seven vertices SS, AA, BB, CC, DD, EE and TT. The edges and their weights are SA=5SA=5, SB=9SB=9, SC=6SC=6, AB=3AB=3, AD=11AD=11, BC=13BC=13, BD=7BD=7, BE=10BE=10, CE=8CE=8, DT=4DT=4 and ET=12ET=12.
    (a)
    Use Kruskal's algorithm to find a minimum spanning tree for the network. List the edges in the order considered, stating clearly which are accepted and which are rejected, and give the total weight of the tree.
    [6 marks]
    (b)
    Use Dijkstra's algorithm to find the shortest route from SS to TT, showing the order of permanent labels and the working values. State whether this route uses only edges of the minimum spanning tree found in part (a).
    [6 marks]

    Total for question 4: 12 marks

  5. 5
    The distances in km between five towns PP, QQ, RR, SS and TT are given by the matrix (−8511−8−6−956−71311−7−4−9134−)\begin{pmatrix} - & 8 & 5 & 11 & - \\ 8 & - & 6 & - & 9 \\ 5 & 6 & - & 7 & 13 \\ 11 & - & 7 & - & 4 \\ - & 9 & 13 & 4 & - \end{pmatrix}, with rows and columns in the order PP, QQ, RR, SS, TT. A dash means that there is no direct road. A minimum spanning tree for the towns is to be found.
    (a)
    Prim's algorithm is started at PP. Which edge is added second?
    [1 mark]
    • APQPQ
    • BRSRS
    • CQRQR
    • DPSPS
    (b)
    What is the weight of the minimum spanning tree?
    [1 mark]
    • A2222
    • B2424
    • C1515
    • D3131
    (c)
    The road STST is closed. Find the weight of the minimum spanning tree for the remaining roads.
    [2 marks]

    Total for question 5: 4 marks

  6. 6
    A network of roads has vertices SS, AA, BB, CC, DD, EE and TT and the road lengths in km are SA=4SA=4, SC=7SC=7, SB=9SB=9, AB=8AB=8, AT=14AT=14, CB=1CB=1, CD=6CD=6, CE=10CE=10, BD=4BD=4, DE=3DE=3 and DT=5DT=5. Dijkstra's algorithm is applied from SS. At one stage SS, AA and CC have permanent labels 0, 4 and 7, and no other vertex has a permanent label.
    (a)
    Which vertex is given the next permanent label?
    [1 mark]
    • ADD
    • BEE
    • CTT
    • DBB
    (b)
    After BB is made permanent, what is the new working value of DD?
    [1 mark]
    • A1313
    • B1212
    • C44
    • D1414
    (c)
    Complete the algorithm to find the shortest distance from SS to TT and state the route.
    [2 marks]

    Total for question 6: 4 marks

  7. 7
    Floyd's algorithm is applied to a directed network with four vertices PP, QQ, RR and SS. The initial distance matrix, with rows and columns in the order PP, QQ, RR, SS and ∞\infty meaning that there is no direct arc, is (06∞2∞03∞4∞07∞1∞0)\begin{pmatrix} 0 & 6 & \infty & 2 \\ \infty & 0 & 3 & \infty \\ 4 & \infty & 0 & 7 \\ \infty & 1 & \infty & 0 \end{pmatrix}. The route matrix initially has the column vertex in every entry, so each row reads PP, QQ, RR, SS. When d(i,j)d(i,j) is improved using intermediate vertex kk, the route entry for (i,j)(i,j) is replaced by the route entry for (i,k)(i,k). In iteration kk the intermediate vertex is the kkth vertex in the order PP, QQ, RR, SS.
    (a)
    Complete iteration 1 for both the distance matrix and the route matrix, stating the entries that change.
    [3 marks]
    (b)
    The algorithm is completed. The final distance matrix is (0362703947068140)\begin{pmatrix} 0 & 3 & 6 & 2 \\ 7 & 0 & 3 & 9 \\ 4 & 7 & 0 & 6 \\ 8 & 1 & 4 & 0 \end{pmatrix} and the final route matrix, with rows and columns in the order PP, QQ, RR, SS, is (PSSSRQRRPPRPQQQS)\begin{pmatrix} P & S & S & S \\ R & Q & R & R \\ P & P & R & P \\ Q & Q & Q & S \end{pmatrix}. Use the final matrices to find the shortest route from RR to QQ and its length.
    [4 marks]

    Total for question 7: 7 marks

  8. 8
    A network has four vertices JJ, KK, LL and MM. The roads and their lengths in km are JK=8JK=8, JL=12JL=12, JM=6JM=6, KL=3KL=3 and LM=9LM=9. There is no direct road between KK and MM.
    (a)
    Write down the initial distance matrix with rows and columns in the order JJ, KK, LL, MM, then use Floyd's algorithm to find the shortest distance between every pair of vertices, showing the matrix after each iteration.
    [6 marks]
    (b)
    Use Prim's algorithm, starting at JJ, to find a minimum spanning tree for the original network and its total weight. Show that the route between KK and MM in this tree is longer than the shortest distance found in part (a), and explain why this happens.
    [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).