How do we find the route of least total weight between two points in a network?
Find the shortest path between two vertices in a weighted network and interpret it in context.
How to find the shortest path between two vertices in a weighted network by systematic listing or labelling, interpret the result, and tell shortest path apart from minimum spanning tree.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
You must find the shortest path between two vertices and interpret it in context.
Shortest path versus spanning tree
These two network problems are easy to confuse, but they answer different questions.
Read the wording: "travel from to ", "quickest route", "least cost from start to finish" signal a shortest path; "connect all sites", "least cabling for the whole network" signal a spanning tree.
Finding the shortest path
For the small networks in this course, a systematic labelling method works reliably.
The crucial step is updating: a route through an intermediate vertex can be shorter than a direct edge, so always compare and keep the smaller total.
Directed networks and one-way edges
In a directed network the edges have a direction (one-way roads, irreversible processes), so a route may only travel along an edge the way it points. When labelling, only update a vertex from a predecessor that has an edge pointing towards it. A path that would be valid in an undirected network can be impossible in a directed one, so always check the arrow direction before adding an edge to a route. Critical path analysis (scheduling) and flow networks both use directed edges for this reason.
Interpreting the result
State both the path (the sequence of vertices) and its total weight, and interpret in context: the cheapest delivery route, the quickest journey, or the least-cost connection between two points. The shortest path need not use the fewest edges; a longer route through more vertices can have a smaller total weight.
If a question asks for a round trip or for the shortest path that must pass through a particular intermediate vertex, split it into stages: find the shortest path from the start to the required vertex, then from that vertex to the destination, and add the two totals. The overall shortest constrained route is the sum of the shortest sub-paths.
Exam-style practice questions
Practice questions written in the style of SCSA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
WACE 20226 marksIn a road network the distances (km) are , , , , , , . Find the shortest path from to and its length.Show worked answer →
Label each vertex with the least distance from the start, updating as shorter routes appear.
From : to is , to is . Via to is , which beats , so is labelled . To : via is , via is , so is . To : via directly is ; via is . The smaller is . (4 marks)
Shortest path: , length km. (2 marks)
Markers reward updating to via , comparing the routes to , and the km path --.
WACE 20244 marksExplain how a shortest path problem differs from a minimum spanning tree problem, and describe how you would systematically find a shortest path between two vertices.Show worked answer →
One is a single journey; the other connects everything.
A shortest path finds the route of least total weight between two specific vertices. A minimum spanning tree connects all vertices together at least total weight. They answer different questions and usually give different edge sets. (2 marks)
To find a shortest path, label the start vertex , then repeatedly assign each vertex the smallest running total from the start along any route, updating whenever a shorter route is found, until the destination has its least label. (2 marks)
Markers reward the single-journey versus connect-all distinction and the least-running-total labelling method.
