7.04a Shortest path: Dijkstra's algorithm

225 questions

Sort by: Default | Easiest first | Hardest first
AQA D2 2009 June Q3
13 marks Moderate -0.3
3 Five lecturers were given the following scores when matched against criteria for teaching five courses in a college.
Course 1Course 2Course 3Course 4Course 5
Ron131391013
Sam1314121715
Tom161081414
Una1114121610
Viv1214141315
Each lecturer is to be allocated to exactly one of the courses so as to maximise the total score of the five lecturers.
  1. Explain why the Hungarian algorithm may be used if each number, \(x\), in the table is replaced by \(17 - x\).
  2. Form a new table by subtracting each number in the table above from 17. Hence show that, by reducing rows first and then columns, the resulting table of values is as below.
    00330
    43402
    06722
    52306
    31020
  3. Show that the zeros in the table in part (b) can be covered with two horizontal and two vertical lines. Hence use the Hungarian algorithm to reduce the table to a form where five lines are needed to cover the zeros.
  4. Hence find the possible allocations of courses to the five lecturers so that the total score is maximised.
  5. State the value of the maximum total score.
AQA D2 2012 June Q2
10 marks Standard +0.3
2 The times taken in minutes for five people, Ann, Baz, Cal, Di and Ez, to complete each of five different tasks are recorded in the table below. Neither Ann nor Di can do task 2, as indicated by the asterisks in the table.
AQA Further AS Paper 2 Discrete Specimen Q7
4 marks Moderate -0.5
7 The network shows a system of pipes, where \(S\) is the source and \(T\) is the sink.
The capacity, in litres per second, of each pipe is shown on each arc.
The cut shown in the diagram can be represented as \(\{ S , P , R \} , \{ Q , T \}\). \includegraphics[max width=\textwidth, alt={}, center]{ba9e9840-ce27-4ca7-ab05-50461d135445-10_629_1168_616_557} 7
  1. Complete the table below to give the value of each of the 8 possible cuts.
    CutValue
    \{ S \}\(\{ P , Q , R , T \}\)31
    \(\{ S , P \}\)\(\{ Q , R , T \}\)32
    \(\{ S , Q \}\)\(\{ P , R , T \}\)
    \(\{ S , R \}\)\(\{ P , Q , T \}\)
    \(\{ S , P , Q \}\)\(\{ R , T \}\)30
    \(\{ S , P , R \}\)\(\{ Q , T \}\)37
    \(\{ S , Q , R \}\)\(\{ P , T \}\)35
    \(\{ S , P , Q , R \}\)\(\{ T \}\)30
    7
  2. State the value of the maximum flow through the network. Give a reason for your answer.
    [0pt] [1 mark] 7
  3. Indicate on Figure 1 a possible flow along each arc, corresponding to the maximum flow through the network.
    [0pt] [2 marks] \begin{figure}[h]
    \captionsetup{labelformat=empty} \caption{Figure 1} \includegraphics[alt={},max width=\textwidth]{ba9e9840-ce27-4ca7-ab05-50461d135445-11_618_1150_1260_557}
    \end{figure}
AQA Further Paper 3 Discrete 2019 June Q7
10 marks Standard +0.3
7 Figure 1 shows a system of water pipes in a manufacturing complex. The number on each arc represents the upper capacity for each pipe in litres per second. The numbers in the circles represent an initial feasible flow of 38 litres of water per second. \begin{figure}[h]
\captionsetup{labelformat=empty} \caption{Figure 1} \includegraphics[alt={},max width=\textwidth]{22f11ce2-8d07-4f51-9326-b578d1e454f9-10_874_1360_609_338}
\end{figure} 7
    1. Calculate the value of the cut \(\{ S , A , B , C \} \{ D , E , F , G , H , T \}\). 7
      1. (ii) Explain, in the context of the question, what can be deduced from your answer to part (a)(i). 7
      1. Using the initial feasible flow shown in Figure 1, indicate on Figure 2 potential increases and decreases in the flow along each arc. \begin{figure}[h]
        \captionsetup{labelformat=empty} \caption{Figure 2} \includegraphics[alt={},max width=\textwidth]{22f11ce2-8d07-4f51-9326-b578d1e454f9-11_997_1554_475_242}
        \end{figure} 7
    2. (ii) Use flow augmentation on Figure 2 to find the maximum flow through the manufacturing complex. You must indicate any flow augmenting paths clearly in the table and modify the potential increases and decreases of the flow on Figure 2.
      Augmenting PathFlow
      Maximum Flow \(=\) \(\_\_\_\_\) 7
    3. The management of the manufacturing complex want to increase the maximum amount of water which can flow through the system of pipes. To do this they decide to upgrade one of the water pipes by replacing it with a larger capacity pipe. Explain which pipe should be upgraded.
      Deduce what effect this upgrade will have on the maximum amount of water which can flow through the system of pipes. \includegraphics[max width=\textwidth, alt={}, center]{22f11ce2-8d07-4f51-9326-b578d1e454f9-13_2488_1716_219_153}
AQA Further Paper 3 Discrete 2020 June Q1
1 marks Moderate -0.5
1 The diagram below shows a network of pipes with their capacities. \includegraphics[max width=\textwidth, alt={}, center]{c297a67f-65fd-47e0-a60c-d38fd86c6081-02_734_1275_630_386} A supersource and a supersink will be added to the network.
To which nodes should the supersource and supersink be connected?
Tick \(( \checkmark )\) one box.
SupersourceSupersink
\(P , Q\)\(U , V , W\)
\(U , V , W\)\(P , Q\)
\(V , X\)\(U , W\)
\(U , W\)\(V , X\)


□ \includegraphics[max width=\textwidth, alt={}, center]{c297a67f-65fd-47e0-a60c-d38fd86c6081-02_118_113_2261_1324}
AQA Further Paper 3 Discrete 2021 June Q2
1 marks Standard +0.3
2 The network below represents a system of pipes. The numbers on each arc represent the lower and upper capacity for each pipe. \includegraphics[max width=\textwidth, alt={}, center]{59347089-ea4a-4ee6-b40e-1ab78aa7cdc3-03_616_1415_447_310} Find the value of the cut \(\{ A , B , C , D , E \} \{ F , G , H , I \}\).
Circle your answer. 56586370
OCR Further Discrete AS 2021 November Q3
10 marks Standard +0.3
3 The diagram shows a simplified map of the main streets in a small town. \includegraphics[max width=\textwidth, alt={}, center]{4db3fbc5-e664-4803-a5f2-05af376d2591-3_531_1127_301_246} Some of the junctions have traffic lights, these junctions are labelled A to F .
There are no traffic lights at junctions X and Y .
The numbers show distances, in km, between junctions. Alex needs to check that the traffic lights at junctions A to F are working correctly.
  1. Find a route from A to E that has length 2.8 km . Alex has started to construct a table of shortest distances between junctions A to F. \includegraphics[max width=\textwidth, alt={}, center]{4db3fbc5-e664-4803-a5f2-05af376d2591-3_543_1173_1420_246} For example, the shortest route from C to B has length 1.7 km , the shortest route from C to D has length 2.5 km and the shortest route from C to E has length 1.8 km .
  2. Complete the copy of the table in the Printed Answer Booklet.
  3. Use your table from part (b) to construct a minimum spanning tree for the complete graph on the six vertices A to F .
    Beth starts from junction B and travels through every junction, including X and Y . Her route has length 5.1 km .
  4. Write down the junctions in the order that Beth visited them. Do not draw on your answer from part (c).
OCR Further Discrete AS 2021 November Q5
11 marks Moderate -0.8
5
  1. Find the packing that results using each of these algorithms.
    1. The next-fit method
    2. The first-fit method
    3. The first-fit decreasing method
  2. A student claims that all three methods from part (a) can be used for both 'online' and 'offline' lists. Explain why the student is wrong. The bins of capacity 30 kg are replaced with bins of capacity \(M \mathrm {~kg}\), where \(M\) is an integer.
    The item of size 23 kg can be split into two items, of sizes \(x \mathrm {~kg}\) and \(( 23 - x ) \mathrm { kg }\), where \(x\) may be any integer value you choose from 1 to 11. No other item can be split.
  3. Determine the smallest value of \(M\) for which four bins are needed to pack these eight items. Explain your reasoning carefully. 3 The diagram shows a simplified map of the main streets in a small town. \includegraphics[max width=\textwidth, alt={}, center]{4db3fbc5-e664-4803-a5f2-05af376d2591-3_531_1127_301_246} Some of the junctions have traffic lights, these junctions are labelled A to F .
    There are no traffic lights at junctions X and Y .
    The numbers show distances, in km, between junctions. Alex needs to check that the traffic lights at junctions A to F are working correctly.
    1. Find a route from A to E that has length 2.8 km . Alex has started to construct a table of shortest distances between junctions A to F. \includegraphics[max width=\textwidth, alt={}, center]{4db3fbc5-e664-4803-a5f2-05af376d2591-3_543_1173_1420_246} For example, the shortest route from C to B has length 1.7 km , the shortest route from C to D has length 2.5 km and the shortest route from C to E has length 1.8 km .
    2. Complete the copy of the table in the Printed Answer Booklet.
    3. Use your table from part (b) to construct a minimum spanning tree for the complete graph on the six vertices A to F .
      Beth starts from junction B and travels through every junction, including X and Y . Her route has length 5.1 km .
    4. Write down the junctions in the order that Beth visited them. Do not draw on your answer from part (c). 4 Li and Mia play a game in which they simultaneously play one of the strategies \(\mathrm { X } , \mathrm { Y }\) and Z . The tables show the points won by each player for each combination of strategies.
      A negative entry means that the player loses that number of points.
      Mia
      XYZ
      \multirow{3}{*}{Li}X5- 60
      \cline { 2 - 5 }Y- 234
      \cline { 2 - 5 }Z- 148
      \cline { 2 - 5 }
      Mia
      XYZ
      \multirow{2}{*}{Li}X4
      \cline { 2 - 5 }Y115
      \cline { 2 - 5 }Z1051
      \cline { 2 - 5 }
      The game can be converted into a zero-sum game, this means that the total number of points won by Li and Mia is the same for each combination of strategies.
      1. Complete the table in the Printed Answer Booklet to show the points won by Mia.
      2. Convert the game into a zero-sum game, giving the pay-offs for Li .
    5. Use dominance to reduce the pay-off matrix for the game to a \(2 \times 2\) table. You do not need to explain the dominance. Mia knows that Li will choose his play-safe strategy.
    6. Determine which strategy Mia should choose to maximise her points. 5 A linear programming problem is formulated as below. Maximise \(\quad \mathrm { P } = 4 \mathrm { x } - \mathrm { y }\) subject to \(2 x + 3 y \geqslant 12\) \(x + y \leqslant 10\) \(5 x + 2 y \leqslant 30\) \(x \geqslant 0 , y \geqslant 0\)
      1. Identify the feasible region by representing the constraints graphically and shading the regions where the inequalities are not satisfied.
      2. Hence determine the maximum value of the objective. The constraint \(x + y \leqslant 10\) is changed to \(x + y \leqslant k\), the other constraints are unchanged.
    7. Determine, algebraically, the value of \(k\) for which the maximum value of \(P\) is 3 . Do not draw on the graph from part (a) and do not use the spare grid.
    8. Determine, algebraically, the other value of \(k\) for which there is a (non-optimal) vertex of the feasible region at which \(P = 3\).
      Do not draw on the graph from part (a) and do not use the spare grid.
    9. OCR Further Discrete AS 2021 November Q18
      1 marks Moderate -0.8
      18
      8
      7
      5
      1. Find the packing that results using each of these algorithms.
        1. The next-fit method
        2. The first-fit method
        3. The first-fit decreasing method
      2. A student claims that all three methods from part (a) can be used for both 'online' and 'offline' lists. Explain why the student is wrong. The bins of capacity 30 kg are replaced with bins of capacity \(M \mathrm {~kg}\), where \(M\) is an integer.
        The item of size 23 kg can be split into two items, of sizes \(x \mathrm {~kg}\) and \(( 23 - x ) \mathrm { kg }\), where \(x\) may be any integer value you choose from 1 to 11. No other item can be split.
      3. Determine the smallest value of \(M\) for which four bins are needed to pack these eight items. Explain your reasoning carefully. 3 The diagram shows a simplified map of the main streets in a small town. \includegraphics[max width=\textwidth, alt={}, center]{4db3fbc5-e664-4803-a5f2-05af376d2591-3_531_1127_301_246} Some of the junctions have traffic lights, these junctions are labelled A to F .
        There are no traffic lights at junctions X and Y .
        The numbers show distances, in km, between junctions. Alex needs to check that the traffic lights at junctions A to F are working correctly.
        1. Find a route from A to E that has length 2.8 km . Alex has started to construct a table of shortest distances between junctions A to F. \includegraphics[max width=\textwidth, alt={}, center]{4db3fbc5-e664-4803-a5f2-05af376d2591-3_543_1173_1420_246} For example, the shortest route from C to B has length 1.7 km , the shortest route from C to D has length 2.5 km and the shortest route from C to E has length 1.8 km .
        2. Complete the copy of the table in the Printed Answer Booklet.
        3. Use your table from part (b) to construct a minimum spanning tree for the complete graph on the six vertices A to F .
          Beth starts from junction B and travels through every junction, including X and Y . Her route has length 5.1 km .
        4. Write down the junctions in the order that Beth visited them. Do not draw on your answer from part (c). 4 Li and Mia play a game in which they simultaneously play one of the strategies \(\mathrm { X } , \mathrm { Y }\) and Z . The tables show the points won by each player for each combination of strategies.
          A negative entry means that the player loses that number of points.
          Mia
          XYZ
          \multirow{3}{*}{Li}X5- 60
          \cline { 2 - 5 }Y- 234
          \cline { 2 - 5 }Z- 148
          \cline { 2 - 5 }
          Mia
          XYZ
          \multirow{2}{*}{Li}X4
          \cline { 2 - 5 }Y115
          \cline { 2 - 5 }Z1051
          \cline { 2 - 5 }
          The game can be converted into a zero-sum game, this means that the total number of points won by Li and Mia is the same for each combination of strategies.
          1. Complete the table in the Printed Answer Booklet to show the points won by Mia.
          2. Convert the game into a zero-sum game, giving the pay-offs for Li .
        5. Use dominance to reduce the pay-off matrix for the game to a \(2 \times 2\) table. You do not need to explain the dominance. Mia knows that Li will choose his play-safe strategy.
        6. Determine which strategy Mia should choose to maximise her points. 5 A linear programming problem is formulated as below. Maximise \(\quad \mathrm { P } = 4 \mathrm { x } - \mathrm { y }\) subject to \(2 x + 3 y \geqslant 12\) \(x + y \leqslant 10\) \(5 x + 2 y \leqslant 30\) \(x \geqslant 0 , y \geqslant 0\)
          1. Identify the feasible region by representing the constraints graphically and shading the regions where the inequalities are not satisfied.
          2. Hence determine the maximum value of the objective. The constraint \(x + y \leqslant 10\) is changed to \(x + y \leqslant k\), the other constraints are unchanged.
        7. Determine, algebraically, the value of \(k\) for which the maximum value of \(P\) is 3 . Do not draw on the graph from part (a) and do not use the spare grid.
        8. Determine, algebraically, the other value of \(k\) for which there is a (non-optimal) vertex of the feasible region at which \(P = 3\).
          Do not draw on the graph from part (a) and do not use the spare grid. 6 Sarah is having some work done on her garden.
          The table below shows the activities involved, their durations and their immediate predecessors. These durations and immediate predecessors are known to be correct.
          ActivityImmediate predecessorsDuration (hours)
          A Clear site-4
          B Mark out new designA1
          C Buy materials, turf, plants and trees-3
          D Lay pathsB, C1
          E Build patioB, C2
          F Plant treesD1
          G Lay turfD, E1
          H Finish plantingF, G1
          1. Use a suitable model to determine the following.
        9. Sarah needs the work to be completed as quickly as possible. There will be at least one activity happening at all times, but it may not always be possible to do all the activities that are needed at the same time.
        10. Determine the earliest and latest times at which building the patio (activity E) could start. There needs to be a 2-hour break after laying the paths (activity D). During this time other activities that do not depend on activity D can still take place.
        11. Describe how you would adapt your model to incorporate the 2-hour break.
        12. Edexcel D1 2018 Specimen Q4
          15 marks Moderate -0.5
          \includegraphics{figure_1} Figure 1 models a network of roads. The number on each edge gives the time, in minutes, taken to travel along that road. Oliver wishes to travel by road from A to K as quickly as possible.
          1. Use Dijkstra's algorithm to find the shortest time needed to travel from A to K. State the quickest route. \hfill [6]
          On a particular day Oliver must travel from B to K via A.
          1. Find a route of minimal time from B to K that includes A, and state its length. \hfill [2]
          Oliver needs to travel along each road to check that it is in good repair. He wishes to minimise the total time required to traverse the network.
          1. Use the route inspection algorithm to find the shortest time needed. You must state all combinations of edges that Oliver could repeat, making your method and working clear. \hfill [7]
          Edexcel D1 2002 January Q4
          8 marks Moderate -0.8
          \includegraphics{figure_1} Figure 1 shows a network of roads. Erica wishes to travel from \(A\) to \(L\) as quickly as possible. The number on each edge gives the time, in minutes, to travel along that road.
          1. Use Dijkstra's algorithm to find a quickest route from \(A\) to \(L\). Complete all the boxes on the answer sheet and explain clearly how you determined the quickest route from your labelling. [7]
          2. Show that there is another route which also takes the minimum time [1]
          Edexcel D1 2005 January Q5
          11 marks Moderate -0.5
          \includegraphics{figure_3} Figure 3 shows a network of paths. The number on each arc gives the distance, in metres, of that path.
          1. Use Dijkstra's algorithm to find the shortest distance from \(A\) to \(H\). [5]
          2. Solve the route inspection problem for the network shown in Figure 3. You should make your method and working clear. State a shortest route, starting at \(A\), and find its length. [The total weight of the network is 1241] [6]
          Edexcel D1 2004 June Q2
          8 marks Easy -1.2
          \includegraphics{figure_1} Figure 1 shows a network of roads. The number on each edge gives the time, in minutes, to travel along that road. Avinash wishes to travel from \(S\) to \(T\) as quickly as possible.
          1. Use Dijkstra's algorithm to find the shortest time to travel from \(S\) to \(T\). [4]
          2. Find a route for Avinash to travel from \(S\) to \(T\) in the shortest time. State, with a reason, whether this route is a unique solution. [2]
          On a particular day Avinash must include \(C\) in his route.
          1. Find a route of minimal time from \(S\) to \(T\) that includes \(C\), and state its time. [2]
          Edexcel D1 2005 June Q6
          10 marks Easy -1.2
          \includegraphics{figure_5} Figure 5 shows a network of roads. The number on each arc represents the length of that road in km.
          1. Use Dijkstra's algorithm to find the shortest route from \(A\) to \(J\). State your shortest route and its length. [5]
          2. Explain how you determined the shortest route from your labelled diagram. [2]
          The road from \(C\) to \(F\) will be closed next week for repairs.
          1. Find the shortest route from \(A\) to \(J\) that does not include \(CF\) and state its length. [3]
          (Total 10 marks)
          Edexcel D1 2006 June Q4
          12 marks Easy -1.3
          1. Explain what is meant by the term 'path'. [2]
          \includegraphics{figure_3} Figure 3 shows a network of cycle tracks. The number on each edge represents the length, in miles, of that track. Mary wishes to cycle from A to I as part of a cycling holiday. She wishes to minimise the distance she travels.
          1. Use Dijkstra's algorithm to find the shortest path from A to I. Show all necessary working in the boxes in Diagram 1 in the answer book. State your shortest path and its length. [6]
          2. Explain how you determined the shortest path from your labelling. [2]
          Mary wants to visit a theme park at E.
          1. Find a path of minimal length that goes from A to I via E and state its length. [2]
          Edexcel D1 2010 June Q6
          9 marks Easy -1.2
          \includegraphics{figure_5} Figure 5 shows a network of cycle tracks within a national park. The number on each arc represents the time taken, in minutes, to cycle along the corresponding track.
          1. Use Dijkstra's algorithm to find the quickest route from S to T. State your quickest route and the time it takes. [6]
          2. Explain how you determined your quickest route from your labelled diagram. [2]
          3. Write down the quickest route from E to T. [1]
          (Total 9 marks)
          AQA D1 2011 January Q4
          10 marks Moderate -0.3
          The network below shows some paths on an estate. The number on each edge represents the time taken, in minutes, to walk along a path.
            1. Use Dijkstra's algorithm on the network to find the minimum walking time from \(A\) to \(J\). [6]
            2. Write down the corresponding route. [1]
          1. A new subway is constructed connecting \(C\) to \(G\) directly. The time taken to walk along this subway is \(x\) minutes. The minimum time taken to walk from \(A\) to \(G\) is now reduced, but the minimum time taken to walk from \(A\) to \(J\) is not reduced. Find the range of possible values for \(x\). [3]
          \includegraphics{figure_4}
          AQA D1 2010 June Q4
          14 marks Moderate -0.3
          The network below shows 13 towns. The times, in minutes, to travel between pairs of towns are indicated on the edges. The total of all the times is 384 minutes.
          1. Use Dijkstra's algorithm on the network below, starting from \(M\), to find the minimum time to travel from \(M\) to each of the other towns. [7 marks]
            1. Find the travelling time of an optimum Chinese postman route around the network, starting and finishing at \(M\). [6 marks]
            2. State the number of times that the vertex \(F\) would appear in a corresponding route. [1 mark]
          \includegraphics{figure_4}
          OCR D1 2012 January Q3
          13 marks Moderate -0.8
          \includegraphics{figure_3}
          1. Apply Dijkstra's algorithm to the copy of this network in the answer booklet to find the least weight path from A to F. State the route of the path and give its weight. [6]
          In the remainder of this question, any least weight paths required may be found without using a formal algorithm.
          1. Apply the route inspection algorithm, showing all your working, to find the weight of the least weight closed route that uses every arc at least once. [3]
          2. Find the weight of the least weight route that uses every arc at least once, starting at A and ending at F. Explain how you reached your answer. [4]
          OCR D1 2009 June Q4
          25 marks Moderate -0.3
          Answer this question on the insert provided. The vertices in the network below represent the junctions between main roads near Ayton (A). The arcs represent the roads and the weights on the arcs represent distances in miles. \includegraphics{figure_4}
          1. On the diagram in the insert, use Dijkstra's algorithm to find the shortest path from A to H. You must show your working, including temporary labels, permanent labels and the order in which permanent labels are assigned. Write down the route of the shortest path from A to H and give its length in miles. [7]
          Simon is a highways surveyor. He needs to check that there are no potholes in any of the roads. He will start and end at Ayton.
          1. Which standard network problem does Simon need to solve to find the shortest route that uses every arc? [1]
          The total weight of all the arcs is 67.5 miles.
          1. Use an appropriate algorithm to find the length of the shortest route that Simon can use. Show all your working. (You may find the lengths of shortest paths between nodes by using your answer to part (i) or by inspection.) [5]
          Suppose that, instead, Simon wants to find the shortest route that uses every arc, starting from A and ending at H.
          1. Which arcs does Simon need to travel twice? What is the length of the shortest route that he can use? [2]
          There is a set of traffic lights at each junction. Simon's colleague Amber needs to check that all the traffic lights are working correctly. She will start and end at the same junction.
          1. Show that the nearest neighbour method fails on this network if it is started from A. [1]
          2. Apply the nearest neighbour method starting from C to find an upper bound for the distance that Amber must travel. [3]
          3. Construct a minimum spanning tree by using Prim's algorithm on the reduced network formed by deleting node A and all the arcs that are directly joined to node A. Start building your tree at node B. (You do not need to represent the network as a matrix.) Mark the arcs in your tree on the diagram in the insert. Give the order in which nodes are added to your tree and calculate the total weight of your tree. Hence find a lower bound for the distance that Amber must travel. [6]
          Edexcel D1 Q4
          10 marks Moderate -0.5
          This question should be answered on the sheet provided. \includegraphics{figure_1} Figure 1 above shows distances in miles between 10 cities. Use Dijkstra's algorithm to determine the shortest route, and its length, between Liverpool and Hull. You must indicate clearly:
          1. the order in which you labelled the vertices,
          2. how you used your labelled diagram to find the shortest route. [10 marks]
          OCR MEI D2 Q3
          20 marks Standard +0.3
          The distance and route matrices shown in Fig. 3.1 are the result of applying Floyd's algorithm to the incomplete network on 4 vertices shown in Fig. 3.2. \includegraphics{figure_3} \includegraphics{figure_4}
          1. Draw the complete network of shortest distances. [2]
          2. Explain how to use the route matrix to find the shortest route from vertex 4 to vertex 1 in the original incomplete network. [2]
          A new vertex, vertex 5, is added to the original network. Its distances from vertices to which it is connected are shown in Fig. 3.3. \includegraphics{figure_5}
          1. Draw the extended network and the complete 5-node network of shortest distances. (You are not required to use an algorithm to find the shortest distances.) [3]
          2. Produce the shortest distance matrix and the route matrix for the extended 5-node network. [3]
          3. Apply the nearest neighbour algorithm to your \(5 \times 5\) distance matrix, starting at vertex 1. Give the length of the cycle produced, together with the actual cycle in the original 5-node network. [3]
          4. By deleting vertex 1 and its arcs, and by using Prim's algorithm on the reduced distance matrix, produce a lower bound for the solution to the practical travelling salesperson problem in the original 5-node network. Show clearly your use of the matrix form of Prim's algorithm. [4]
          5. In the original 5-node network find a shortest route starting at vertex 1 and using each of the 6 arcs at least once. Give the length of your route. [3]
          OCR D2 Q3
          8 marks Moderate -0.3
          Arthur is planning a bus journey from town \(A\) to town \(L\). There are various routes he can take but he will have to change buses three times -- at \(B\), \(C\) or \(D\), at \(E\), \(F\), \(G\) or \(H\) and at \(I\), \(J\) or \(K\). \includegraphics{figure_2} Fig. 2 Figure 2 shows the bus routes that Arthur can use. The number on each arc shows the average waiting time, in minutes, for a bus to come on that route. As the forecast is for rain, Arthur wishes to plan his journey so that the total waiting time is as small as possible. Use dynamic programming to find the route that Arthur should use. [8 marks]
          OCR D2 Q5
          22 marks Standard +0.3
          The following matrix gives the capacities of the pipes in a system. \begin{array}{c|c|c|c|c|c|c|c} To & & S & T & A & B & C & D
          From & & & & & & &
          \hline S & & -- & -- & 16 & 26 & -- & --
          T & & -- & -- & -- & -- & -- & --
          A & & -- & -- & -- & -- & 13 & 5
          B & & -- & 16 & -- & -- & -- & 11
          C & & -- & 11 & -- & -- & -- & --
          D & & -- & 11 & -- & -- & -- & --
          \end{array}
          1. Represent this information as a digraph. [3 marks]
          2. Find the minimum cut, expressing it in the form \(\{\) \(\}|\{\) \(\}\), and state its value. [2 marks]
          3. Starting from having no flow in the system, use the labelling procedure to find a maximal flow through the system. You should list each flow-augmenting route you use, together with its flow. [5 marks]
          4. Explain how you know that this flow is maximal. [1 mark]
          [11 marks]
          Edexcel FD1 AS 2019 June Q4
          10 marks Challenging +1.2
          \includegraphics{figure_1} **Figure 1** [The total weight of the network is \(135 + 4x + 2y\)] The weights on the arcs in Figure 1 represent distances. The weights on the arcs CE and GH are given in terms of \(x\) and \(y\), where \(x\) and \(y\) are positive constants and \(7 < x + y < 20\) There are three paths from A to H that have the same minimum length.
          1. Use Dijkstra's algorithm to find \(x\) and \(y\). [7]
          An inspection route starting at A and finishing at H is found. The route traverses each arc at least once and is of minimum length.
          1. State the arcs that are traversed twice. [1]
          2. State the number of times that vertex C appears in the inspection route. [1]
          3. Determine the length of the inspection route. [1]