Algorithms and programming June 2025, Question 5 11 marks
Also involves Graphs (data structure)
Explain why this graph is a visualisation of the problem.
Reveal mark scheme
A user needs to travel from planet A to planet H. They need to travel the least expensive route.
Show how Dijkstra’s algorithm can be used on the directed graph shown in Fig. 5 to find the shortest path from start planet A to the end planet H.
You must state the nodes on the final path and the distance of this path. Show your working.
You may use the table to give your answer.
Reveal mark scheme
The A* algorithm can also be used to find the shortest path in a graph.
Describe how an A* algorithm uses heuristics to be an efficient algorithm.
Reveal mark scheme