7.04a Shortest path: Dijkstra's algorithm

225 questions

Sort by: Default | Easiest first | Hardest first
Edexcel FD1 AS 2023 June Q3
11 marks Standard +0.3
3. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{9edb5209-4244-4916-b3ee-d77e395e8cab-04_977_1472_259_294} \captionsetup{labelformat=empty} \caption{Figure 2}
\end{figure} 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,
  1. explain why the algorithm should begin at C.
  2. Use Dijkstra's algorithm to find the shortest route from A to J via C. State this route and its length.
  3. 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.
  4. State the total length, in km , of the minimum spanning tree.
Edexcel FD1 AS 2024 June Q3
11 marks Challenging +1.2
3. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{ca57c64b-0b33-4179-be7f-684bd6ea2162-06_764_1547_314_355} \captionsetup{labelformat=empty} \caption{Figure 3}
\end{figure} [The total weight of the network is \(139 + x + y\) ]
  1. Explain what is meant by the term "tree". Figure 3 represents a network of walkways in a warehouse.
    The arcs represent the walkways and the nodes represent junctions between them.
    The number on each arc represents the length, in metres, of the corresponding walkway.
    The values \(x\) and \(y\) are unknown, however it is known that \(x\) and \(y\) are integers and that $$9 < x < y < 14$$
    1. Use Dijkstra's algorithm to find the shortest route from A to M.
    2. State an expression for the length of the shortest route from A to M . The warehouse manager wants to check that all of the walkways are in good condition.
      Their inspection route starts at B and finishes at C .
      The inspection route must traverse each walkway at least once and be as short as possible.
  2. State the arcs that are traversed twice.
  3. State the number of times that H appears in the inspection route. The warehouse manager finds that the total length of the inspection route is 172 metres.
  4. Determine the value of \(x\) and the value of \(y\)
Edexcel FD1 AS Specimen Q1
12 marks Standard +0.3
1. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{1e2c1dc4-3724-4bba-961c-1c2ae7e649c4-2_698_1173_447_443} \captionsetup{labelformat=empty} \caption{Figure 1}
\end{figure} [The total weight of the network is 189]
Figure 1 represents a network of pipes in a building. The number on each arc is the length, in metres, of the corresponding pipe.
  1. Use Dijkstra's algorithm to find the shortest path from A to F . State the path and its length. On a particular day, Gabriel needs to check each pipe. A route of minimum length, which traverses each pipe at least once and which starts and finishes at A, needs to be found.
  2. Use an appropriate algorithm to find the pipes that will need to be traversed twice. You must make your method and working clear.
  3. State the minimum length of Gabriel's route. A new pipe, BG, is added to the network. A route of minimum length that traverses each pipe, including BG, needs to be found. The route must start and finish at A. Gabriel works out that the addition of the new pipe increases the length of the route by twice the length of BG .
  4. Calculate the length of BG. You must show your working.
Edexcel FD1 2019 June Q2
14 marks Standard +0.3
2. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{162f9d72-84a4-4b1a-93cf-b7eeb7f957ae-03_663_1421_203_322} \captionsetup{labelformat=empty} \caption{Figure 1
[0pt] [The total weight of the network is 370]}
\end{figure} Figure 1 represents a network of corridors in a building. The number on each arc represents the length, in metres, of the corresponding corridor.
  1. Use Dijkstra's algorithm to find the shortest path from A to D, stating the path and its length. On a particular day, Naasir needs to check the paintwork along each corridor. Naasir must find a route of minimum length. It must traverse each corridor at least once, starting at B and finishing at G .
  2. Use an appropriate algorithm to find the arcs that will need to be traversed twice. You must make your method and working clear.
  3. Find the length of Naasir's route. On a different day, all the corridors that start or finish at B are closed for redecorating. Naasir needs to check all the remaining corridors and may now start at any vertex and finish at any vertex. A route is required that excludes all those corridors that start or finish at B .
    1. Determine the possible starting and finishing points so that the length of Naasir's route is minimised. You must give reasons for your answer.
    2. Find the length of Naasir's new route.
Edexcel FD1 2019 June Q3
14 marks Moderate -0.5
3. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{162f9d72-84a4-4b1a-93cf-b7eeb7f957ae-04_666_940_173_534} \captionsetup{labelformat=empty} \caption{Figure 2}
\end{figure} The network in Figure 2 shows the direct roads linking five villages, \(\mathrm { A } , \mathrm { B } , \mathrm { C } , \mathrm { D }\) and E .
The number on each arc represents the length, in miles, of the corresponding road.
The roads from A to E and from C to B are one-way, as indicated by the arrows.
  1. Complete the initial distance and route tables for the network provided in the answer book.
    (2)
  2. Perform the first three iterations of Floyd's algorithm. You should show the distance table and the route table after each of the three iterations. After five iterations of Floyd's algorithm the final distance table and partially completed final route table are shown below. \begin{table}[h]
    \captionsetup{labelformat=empty} \caption{Distance table}
    \cline { 2 - 6 } \multicolumn{1}{c|}{}ABCDE
    A-12763
    B15-222118
    C75-47
    D1194-3
    E141273-
    \end{table} \begin{table}[h]
    \captionsetup{labelformat=empty} \caption{Route table}
    \cline { 2 - 6 } \multicolumn{1}{c|}{}ABCDE
    AA
    BAB
    CABC
    DCCCD
    EDDDDE
    \end{table}
    1. Explain how the partially completed final route table can be used to find the shortest route from E to A.
    2. State this route. Mabintou decides to use the distance table to try to find the shortest cycle that passes through each vertex. Starting at D, she applies the nearest neighbour algorithm to the final distance table.
    1. State the cycle obtained using the nearest neighbour algorithm.
    2. State the length of this cycle.
    3. Interpret the cycle in terms of the actual villages visited.
    4. Prove that Mabintou's cycle is not optimal.
Edexcel FD1 2020 June Q3
9 marks Moderate -0.5
3. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{bd357978-6464-43fd-854f-4188b5408e91-04_387_519_214_774} \captionsetup{labelformat=empty} \caption{Figure 2}
\end{figure} Direct roads between five villages, A, B, C, D and E, are shown in Figure 2. The weight on each arc is the time, in minutes, it takes to travel along the corresponding road. The road from D to C is one-way as indicated by the arrow on the corresponding arc. Floyd's algorithm is to be used to find the complete network of shortest times between the five villages.
  1. Set up initial time and route matrices. The matrices after two iterations of Floyd's algorithm are shown below. \begin{table}[h]
    \captionsetup{labelformat=empty} \caption{Time matrix}
    \cline { 2 - 6 } \multicolumn{1}{c|}{}ABCDE
    A-84718
    B8-31510
    C43-116
    D7151-1
    E181061-
    \end{table} \begin{table}[h]
    \captionsetup{labelformat=empty} \caption{Route matrix}
    \cline { 2 - 6 } \multicolumn{1}{c|}{}ABCDE
    AABCDB
    BABCAE
    CABCAE
    DAACDE
    EBBCDE
    \end{table}
  2. Perform the next two iterations of Floyd's algorithm that follow from the tables above. You should show the time and route matrices after each iteration. The final time matrix after completion of Floyd's algorithm is shown below. \begin{table}[h]
    \captionsetup{labelformat=empty} \caption{Final time matrix}
    \cline { 2 - 6 } \multicolumn{1}{c|}{}ABCDE
    A-7478
    B7-3109
    C43-76
    D541-1
    E6521-
    \end{table}
    1. Use the nearest neighbour algorithm, starting at A , to find a Hamiltonian cycle in the complete network of shortest times.
    2. Find the time taken for this cycle.
    3. Interpret the cycle in terms of the actual villages visited.
Edexcel FD1 2021 June Q4
8 marks Standard +0.3
4. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{43bc1e60-d8b2-4ea5-9652-4603a26c2f78-05_668_1424_169_322} \captionsetup{labelformat=empty} \caption{Figure 3
[0pt] [The total weight of the network is 1648]}
\end{figure} Direct roads between six cities, A, B, C, D, E and F, are represented in Figure 3. The weight on each arc is the time, in minutes, required to travel along the corresponding road. Floyd's algorithm is to be used to find the complete network of shortest times between the six cities.
An initial route matrix is given in the answer book.
  1. Set up the initial time matrix.
  2. Perform the first iteration of Floyd's algorithm. You should show the time and route matrices after this iteration. The final time matrix after completion of Floyd's algorithm is shown below.
    \cline { 2 - 7 } \multicolumn{1}{c|}{}ABCDEF
    A-579514763220
    B57-72204120197
    C9572-242158125
    D147204242-84275
    E6312015884-191
    F220197125275191-
    A route is needed that minimises the total time taken to traverse each road at least once.
    The route must start at B and finish at E .
  3. Use an appropriate algorithm to find the roads that will need to be traversed twice. You should make your method and working clear.
  4. Write down the length of the route.
Edexcel FD1 2021 June Q6
10 marks Standard +0.3
6. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{43bc1e60-d8b2-4ea5-9652-4603a26c2f78-07_728_1465_248_301} \captionsetup{labelformat=empty} \caption{Figure 4}
\end{figure} In Figure 4 the weights on the arcs represent distances.
    1. Use Dijkstra's algorithm to find the shortest path from A to H .
    2. State the length of the shortest path from A to H . One application of Dijkstra's algorithm has order \(n ^ { 2 }\), where \(n\) is the number of nodes in the network. A computer produces a table of shortest distances between any two different nodes by repeatedly applying Dijkstra's algorithm from each node of the network. It takes the computer 0.082 seconds to produce a table of shortest distances for a network of 10 nodes.
  1. Calculate approximately how long it will take, in seconds, for the computer to produce a table of shortest distances for a network with 200 nodes. You must give a reason for your answer.
  2. Explain why your answer to part (b) can only be an approximation.
Edexcel FD1 2022 June Q2
13 marks Challenging +1.2
2. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{27586973-89f4-45e1-9cc4-04c4044cd3db-03_563_1445_214_312} \captionsetup{labelformat=empty} \caption{Figure 1}
\end{figure} [The total weight of the network is 299] Figure 1 represents a network of cycle tracks between 10 landmarks, A, B, C, D, E, F, G, H, J and K. The number on each edge represents the length, in kilometres, of the corresponding track. One day, Blanche wishes to cycle from A to K. She wishes to minimise the distance she travels.
    1. Use Dijkstra's algorithm to find the shortest path from A to K .
    2. State the length of the shortest path from A to K .
      (6) The cycle tracks between the landmarks now need to be inspected. Blanche must travel along each track at least once. She wishes to minimise the length of her inspection route. Blanche will start her inspection route at D and finish at E .
    1. State the edges that will need to be traversed twice.
    2. Find the length of Blanche's route. It is now decided to start the inspection route at A and finish at K . Blanche must minimise the length of her route and travel along each track at least once.
  1. By considering the pairings of all relevant nodes, find the length of Blanche's new route. You must make your method and working clear.
Edexcel FD1 2022 June Q3
10 marks Moderate -0.5
3. The initial distance matrix (Table 1) shows the lengths, in metres, of the corridors connecting six classrooms, A, B, C, D, E and F, in a school. For safety reasons, some of the corridors are one-way only. \begin{table}[h]
ABCDEF
A-1232242911
B12-178\(\infty\)\(\infty\)
C3217-412\(\infty\)
D24\(\infty\)4-\(\infty\)13
E\(\infty\)\(\infty\)1218-12
F11\(\infty\)\(\infty\)1312-
\captionsetup{labelformat=empty} \caption{Table 1}
\end{table}
  1. By adding the arcs from vertex A, along with their weights, complete the drawing of this network on Diagram 1 in the answer book. Floyd's algorithm is to be used to find the complete network of shortest distances between the six classrooms. The distance matrix after two iterations of Floyd's algorithm is shown in Table 2. \begin{table}[h]
    ABCDEF
    A-1229202911
    B12-1784123
    C2917-41240
    D24364-5313
    E\(\infty\)\(\infty\)1218-12
    F1123401312-
    \captionsetup{labelformat=empty} \caption{Table 2}
    \end{table}
  2. Perform the next two iterations of Floyd's algorithm that follow from Table 2. You should show the distance matrix after each iteration. The final distance matrix after completion of Floyd's algorithm is shown in Table 3.
    ABCDEF
    A-1224202311
    B12-1282421
    C2817-41217
    D24214-1613
    E23291216-12
    F1123171312-
    \section*{Table 3} Yinka must visit each classroom. He will start and finish at E and wishes to minimise the total distance travelled.
    1. Use the nearest neighbour algorithm, starting at E, to find two Hamiltonian cycles in the completed network of shortest distances.
    2. Find the length of each of the two cycles.
    3. State, with a reason, which of the two cycles provides the better upper bound for the length of Yinka's route.
Edexcel FD1 2023 June Q1
7 marks Moderate -0.8
1. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{6ccce35f-4e62-4b6b-acf6-f9b3e18d4b52-02_476_727_210_683} \captionsetup{labelformat=empty} \caption{Figure 1}
\end{figure} Figure 1 shows the graph G.
  1. State whether G is Eulerian, semi-Eulerian, or neither, giving a reason for your answer.
  2. Write down an example of a Hamiltonian cycle on G.
  3. State whether or not G is planar, justifying your answer.
  4. State the number of arcs that would need to be added to G to make the graph \(\mathrm { K } _ { 5 }\) \begin{figure}[h]
    \includegraphics[alt={},max width=\textwidth]{6ccce35f-4e62-4b6b-acf6-f9b3e18d4b52-03_467_716_178_671} \captionsetup{labelformat=empty} \caption{Figure 2}
    \end{figure} Direct roads between five villages, A, B, C, D and E, are represented in Figure 2. The weight on each arc is the time, in minutes, required to travel along the corresponding road. Floyd's algorithm is to be used to find the complete network of shortest times between the five villages.
  5. For the network represented in Figure 2, complete the initial time matrix in the answer book. The time matrix after four iterations of Floyd's algorithm is shown in Table 1. \begin{table}[h]
    ABCDE
    A-1013155
    B10-354
    C133-27
    D1552-7
    E5477-
    \captionsetup{labelformat=empty} \caption{Table 1}
    \end{table}
  6. Perform the final iteration of Floyd's algorithm that follows from Table 1, showing the time matrix for this iteration.
Edexcel FD1 2023 June Q3
8 marks Standard +0.3
3. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{6ccce35f-4e62-4b6b-acf6-f9b3e18d4b52-05_862_1460_219_299} \captionsetup{labelformat=empty} \caption{Figure 4}
\end{figure} Figure 4 represents a network with nodes, A, B, C, D, E, F, G, H and J.
The number on each edge gives the length of the corresponding edge.
    1. Use Dijkstra's algorithm to find the shortest path from A to J.
    2. State the length of the shortest path from A to J . One application of Dijkstra's algorithm has order \(n ^ { 2 }\), where \(n\) is the number of nodes in the network. It takes a computer 0.0312 seconds to find the shortest path from a given start node to a given end node in a network of 9 nodes.
  1. Calculate approximately how long it would take, in minutes, for the computer to find the shortest path from a given start node to a given end node for a network of 9000 nodes.
Edexcel FD1 2024 June Q3
13 marks Standard +0.8
3. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{7f7546eb-0c1a-40da-bdf0-31e0574a9867-06_764_1136_258_466} \captionsetup{labelformat=empty} \caption{Figure 1}
\end{figure} [The total weight of the network is 413] Figure 1 represents a network of cycle tracks between ten towns, A, B, C, D, E, F, G, H, J and K. The number on each arc represents the length, in kilometres, of the corresponding track.
  1. Use Dijkstra's algorithm to find the shortest path from A to J. Abi needs to travel along every track shown in Figure 1 to check that they are all in good repair. She needs to start her inspection route at town G and finish her route at either town J or town K. Abi wishes to minimise the total distance required to traverse every track.
  2. By considering all relevant pairings of vertices, determine whether Abi should finish her inspection route at town J or town K. You must
    The direct track between town B and town C and the direct track between town H and town K are now closed to all users. A second person, Tarig, is asked to check all the remaining tracks starting at G and finishing at H. Tarig wishes to minimise the total length of his inspection route.
  3. Determine which route, Abi's or Tarig's, is shorter. You must make your working clear.
Edexcel FD1 Specimen Q4
14 marks Moderate -0.3
4. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{37435cc9-1e38-4c55-bd72-e2a1ec415ba7-05_572_799_228_632} \captionsetup{labelformat=empty} \caption{Figure 3}
\end{figure} The network in Figure 3 shows the roads linking a depot, D, and three collection points \(\mathrm { A } , \mathrm { B }\) and C . The number on each arc represents the length, in miles, of the corresponding road. The road from B to D is a one-way road, as indicated by the arrow.
  1. Explain clearly if Dijkstra's algorithm can be used to find a route from D to A . The initial distance and route tables for the network are given in the answer book.
  2. Use Floyd's algorithm to find a table of least distances. You should show both the distance table and the route table after each iteration.
  3. Explain how the final route table can be used to find the shortest route from D to B . State this route. There are items to collect at \(\mathrm { A } , \mathrm { B }\) and C . A van will leave D to make these collections in any order and then return to D. A minimum route is required. Using the final distance table and the Nearest Neighbour algorithm starting at D,
  4. find a minimum route and state its length. Floyd's algorithm and Dijkstra's algorithm are applied to a network. Each will find the shortest distance between vertices of the network.
  5. Describe how the results of these algorithms differ.
Edexcel FD2 2019 June Q3
13 marks Challenging +1.2
3. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{5274a614-7862-49f0-ad1d-b59b73aa51ad-04_1047_1691_210_187} \captionsetup{labelformat=empty} \caption{Figure 1}
\end{figure} In Figure 1 the weight of \(\operatorname { arc } \mathrm { SB }\) is denoted by \(x\) where \(x \geqslant 0\)
  1. Explain why Dijkstra's algorithm cannot be used on the directed network in Figure 1.
    (1) It is given that the minimum weight route from S to T passes through B .
  2. Use dynamic programming to find
    1. the range of possible values of \(x\)
    2. the minimum weight route from S to T .
      (12)
Edexcel D1 2002 June Q4
10 marks Moderate -0.3
  1. Use Dijkstra's algorithm to find the shortest route from \(A\) to \(I\). Show all necessary working in the boxes in the answer booklet and state your shortest route and its length.
    (5) The park warden wishes to check each of the paths to check for frost damage. She has to cycle along each path at least once, starting and finishing at \(A\).
    1. Use an appropriate algorithm to find which paths will be covered twice and state these paths.
    2. Find a route of minimum length.
    3. Find the total length of this shortest route.
      (5)
OCR D1 2006 January Q2
6 marks Moderate -0.8
2 Answer this question on the insert provided.
\includegraphics[max width=\textwidth, alt={}]{8f17020a-14bf-4459-9241-1807b954a629-2_659_1136_1720_530}
This diagram shows part of a network. There are other arcs connecting \(D\) and \(E\) to other parts of the network. Apply Dijkstra's algorithm starting from \(A\), as far as you are able, showing your working. Note: you will not be able to give permanent labels to all the vertices shown.
OCR D1 2007 January Q5
16 marks Moderate -0.3
5 Answer part (i) of this question on the insert provided. Rhoda Raygh enjoys driving but gets extremely irritated by speed cameras.
The network represents a simplified map on which the arcs represent roads and the weights on the arcs represent the numbers of speed cameras on the roads. The sum of the weights on the arcs is 72 . \includegraphics[max width=\textwidth, alt={}, center]{8a1232ae-6a6e-4afb-8757-fffe4fc9570f-05_874_1484_664_333}
  1. Rhoda lives at Ayton ( \(A\) ) and works at Kayton ( \(K\) ). Use Dijkstra's algorithm on the diagram in the insert to find the route from \(A\) to \(K\) that involves the least number of speed cameras and state the number of speed cameras on this route.
  2. In her job Rhoda has to drive along each of the roads represented on the network to check for overhanging trees. This requires finding a route that covers every arc at least once, starting and ending at Kayton (K). Showing all your working, find a suitable route for Rhoda that involves the least number of speed cameras and state the number of speed cameras on this route.
  3. If Rhoda checks the roads for overhanging trees on her way home, she will instead need a route that covers every arc at least once, starting at Kayton and ending at Ayton. Calculate the least number of speed cameras on such a route, explaining your reasoning.
OCR D1 2009 January Q3
23 marks Moderate -0.3
3 Answer this question on the insert provided. \includegraphics[max width=\textwidth, alt={}, center]{43fe5fd5-4b98-4c3a-90ca-a1bd5cf065fe-3_492_1006_356_568}
  1. This diagram shows a network. The insert has a copy of this network together with a list of the arcs, sorted into increasing order of weight. Use Kruskal's algorithm on the insert to find a minimum spanning tree for this network. Draw your tree and give its total weight.
  2. Use your answer to part (i) to find the weight of a minimum spanning tree for the network with vertex \(E\), and all the arcs joined to \(E\), removed. Hence find a lower bound for the travelling salesperson problem on the original network.
  3. Show that the nearest neighbour method, starting from vertex \(A\), fails on the original network.
  4. Apply the nearest neighbour method, starting from vertex \(B\), to find an upper bound for the travelling salesperson problem on the original network.
  5. Apply Dijkstra's algorithm to the copy of the network in the insert to find the least weight path from \(A\) to \(G\). State the weight of the path and give its route.
  6. The sum of the weights of all the arcs is 300 . 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. The weights of least weight paths from vertex \(A\) should be found using your answer to part (v); the weights of other such paths should be determined by inspection.
OCR D1 2010 January Q1
11 marks Standard +0.3
1 Answer this question on the insert provided. \includegraphics[max width=\textwidth, alt={}, center]{e1495f6b-c09f-46a1-a6f8-02354e28887a-02_533_1353_342_395}
  1. Apply Dijkstra's algorithm to the copy of this network in the insert to find the least weight path from \(A\) to \(F\). State the route of the path and give its weight.
  2. 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. Write down a closed route that has this least weight. An extra arc is added, joining \(B\) to \(E\), with weight 2 .
  3. Write down the new least weight path from \(A\) to \(F\). Explain why the new least weight closed route, that uses every arc at least once, has no repeated arcs.
OCR D1 2007 June Q5
16 marks Standard +0.3
5 Answer this question on the insert provided. The network below represents a simplified map of a building. The arcs represent corridors and the weights on the arcs represent the lengths of the corridors, in metres. The sum of the weights on the arcs is 765 metres. \includegraphics[max width=\textwidth, alt={}, center]{dbf782dd-879c-4f0f-b532-246a0db9f130-5_1271_1539_584_303}
  1. Janice is the cleaning supervisor in the building. She is at the position marked as J when she is called to attend a cleaning emergency at B. On the network in the insert, use Dijkstra's algorithm, starting from vertex J and continuing until B is given a permanent label, to find the shortest path from J to B and the length of this path.
  2. In her job J anice has to walk along each of the corridors represented on the network. This requires finding a route that covers every arc at least once, starting and ending at J. Showing all your working, find the shortest distance that J anice must walk to check all the corridors. The labelled vertices represent 'cleaning stations'. J anice wants to visit every cleaning station using the shortest possible route. She produces a simplified network with no repeated arcs and no arc that joins a vertex to itself.
  3. On the insert, complete Janice's simplified network. Which standard network problem does Janice need to solve to find the shortest distance that she must travel?
OCR MEI D1 Q2
Moderate -0.3
2 Answer this question on the insert provided.
  1. Use Dijkstra's algorithm to find the least weight route from A to G in the network shown in Fig. 2.1. Show the order in which you label vertices, give the route and its weight. \begin{figure}[h]
    \includegraphics[alt={},max width=\textwidth]{5d8d35b7-e4ba-4bc0-93a1-0cae58093a02-003_458_586_525_758} \captionsetup{labelformat=empty} \caption{Fig. 2.1}
    \end{figure}
  2. Fig. 2.2 shows a partially completed application of Kruskal's algorithm to find a minimum spanning tree for the network. \begin{figure}[h]
    \includegraphics[alt={},max width=\textwidth]{5d8d35b7-e4ba-4bc0-93a1-0cae58093a02-003_417_524_1309_786} \captionsetup{labelformat=empty} \caption{Fig. 2.2}
    \end{figure} Complete the algorithm and give the total weight of your minimum spanning tree.
OCR MEI D1 2005 January Q2
8 marks Moderate -0.3
2 Answer this question on the insert provided.
  1. Use Dijkstra's algorithm to find the least weight route from \(A\) to \(G\) in the network shown in Fig. 2.1. Show the order in which you label vertices, give the route and its weight. \begin{figure}[h]
    \includegraphics[alt={},max width=\textwidth]{b9ee9306-18ca-42b3-9f2e-b23849374b5e-3_458_584_525_760} \captionsetup{labelformat=empty} \caption{Fig. 2.1}
    \end{figure}
  2. Fig. 2.2 shows a partially completed application of Kruskal's algorithm to find a minimum spanning tree for the network. \begin{figure}[h]
    \includegraphics[alt={},max width=\textwidth]{b9ee9306-18ca-42b3-9f2e-b23849374b5e-3_421_533_1307_779} \captionsetup{labelformat=empty} \caption{Fig. 2.2}
    \end{figure} Complete the algorithm and give the total weight of your minimum spanning tree.
OCR MEI D1 2005 June Q4
16 marks Standard +0.3
4 Answer parts (i) and (ii) on the insert provided. Fig. 4 shows a network of roads giving direct connections between a city, C , and 7 towns labelled P to V. The weights on the arcs are distances in kilometres. The local coastline is also shown. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{03df7d9e-63d4-48fb-9cf3-e92003f44788-5_536_828_573_642} \captionsetup{labelformat=empty} \caption{Fig. 4}
\end{figure}
  1. Use Dijkstra's algorithm on the insert to find the shortest distances from each of the towns to the city, C. List those distances and give the shortest route from P to C and from V to C. [8]
  2. Use Kruskal's algorithm to find a minimum connector for the network. List the order in which you include arcs and give the length of your connector. A bridge is built giving a direct road between P and Q of length 12 km .
  3. What effect does the bridge have on the shortest distances from the towns to the city? (You do not need to use an algorithm to answer this part of the question.)
  4. What effect does the bridge have on the minimum connector for the network? (You do not need to use an algorithm to answer this part of the question.)
  5. Before the bridge was built it was possible to travel from P to C using every road once and only once. With the bridge in place, it is possible to travel from a different town to C using every road once and only once. Give this town and justify your answer.
OCR MEI D1 2006 June Q1
8 marks Moderate -0.3
1 Answer this question on the insert provided. \begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{c429bfed-9241-409a-9cd5-9553bf16c9df-2_658_739_466_662} \captionsetup{labelformat=empty} \caption{Fig. 1}
\end{figure}
  1. Apply Dijkstra's algorithm to the copy of Fig. 1 in the insert to find the least weight route from A to D. Give your route and its weight.
  2. Arc DE is now deleted. Write down the weight of the new least weight route from A to D , and explain how your working in part (i) shows that it is the least weight.
    [0pt] [2]