Weighted Graphs, Networks, and the Shortest Path Problem (VCE SSCE General Mathematics): Revision Notes
Weighted Graphs, Networks, and the Shortest Path Problem
Introduction to weighted graphs and networks
In many real-world situations, we need to represent more than just connections between locations or points. We often need to show additional information such as distances, times, or costs. This is where weighted graphs become useful.
A weighted graph is a graph that has a number associated with each edge. These numbers are called weights. The weights can represent any kind of numerical information we want to attach to the connections in our graph.
For example, consider a graph showing how six towns are connected by roads. Initially, the graph might just show which towns have direct road connections. However, we can make this graph much more informative by adding weights to each edge.

In this weighted graph, each edge has a number representing the distance between towns in kilometres. For instance, the edge connecting Town A and Town B shows , meaning these towns are km apart. Similarly, Town E and Town F are connected by an edge with weight , indicating a km distance.
What is a network?
While all networks are weighted graphs, not all weighted graphs are networks. The key distinction is what the weights represent.
A network is a weighted graph in which the weights represent physical quantities. These physical quantities include:
- Distance (measured in kilometres, metres, etc.)
- Time (measured in minutes, hours, etc.)
- Cost (measured in dollars, pounds, etc.)
Key Distinction:
When the weights on a graph represent abstract numbers that don't correspond to real-world measurements, we call it a weighted graph but not necessarily a network. However, when dealing with transportation routes, communication systems, or other practical applications where weights represent actual measurable quantities, we refer to the graph as a network.
Interpreting a network
Being able to read and extract information from network diagrams is an essential skill. Let's explore how to work with networks through a practical example.
Consider a network representing walking tracks in a forest. The vertices represent key locations like gates, a bridge, a waterfall, and other points of interest. The edges show the direct paths connecting these locations, with weights indicating walking times in minutes.

In this forest network:
- represents a waterfall
- represents a suspension bridge
- represents a very old tree
- represents a fern gully
- and represent entrance/exit gates
The numbers on the edges tell us how many minutes it takes to walk between directly connected locations.
Reading direct connections
To find the time to walk directly between two connected locations, simply identify the edge linking them and read the weight. For example:
- Walking directly from the bridge () to the fern gully () takes minutes (reading the weight on edge -)
- Walking from the waterfall () to the old tree () takes minutes
Calculating path lengths
When traveling between locations that aren't directly connected, or when following a specific route through multiple points, we need to add up the weights of all edges along the path.
Worked Example: Calculating Path Length
To find how long it takes to walk from the old tree () to the fern gully () via the waterfall () and the bridge ():
Step 1: Identify the path:
Step 2: Calculate the total time by adding each segment:
- to : minutes
- to : minutes
- to : minutes
Step 3: Sum the weights:
Total time minutes
Answer: It takes 31 minutes to walk from the old tree to the fern gully via the waterfall and bridge.
This systematic approach of identifying the path and summing the individual edge weights works for any sequence of connected vertices in a network.
Practice problem
Consider this network showing towns and the distances between them in kilometres:

Using the same principles:
- To find the distance from Stratmoore directly to Osburn, locate the edge connecting these vertices and read the weight
- To find the distance from Stratmoore to Kenton via Melville then Osburn, identify each edge in the path (Stratmoore-Melville, Melville-Osburn, Osburn-Kenton) and add their weights
The shortest path problem
One of the most important questions we can ask about a network is: "What is the shortest route between two vertices?" This challenge is known as the shortest path problem.

In this network, finding the shortest distance between some towns is straightforward. For example, Town A and Town B are directly connected, so the shortest distance is simply the weight of that edge: km.
However, when towns aren't directly connected, such as Town F and Town C, we must travel through other towns. This means we need to compare different possible routes to find the shortest one.
While sophisticated mathematical techniques exist for solving the shortest path problem systematically, for smaller networks we can use a practical method called finding the shortest path by inspection. This means identifying all reasonable routes and comparing their total lengths.
Method: Finding the shortest path by inspection
The inspection method involves these key steps:
Step 1: Identify all likely shortest routes
List all reasonable paths between the starting and ending vertices. To save time, eliminate paths that:
- Pass through any vertex more than once
- Use any edge more than once
- Take an obvious detour when a direct route exists
Eliminating Unlikely Paths
For example, when traveling from Town B to Town D, ignore any route that goes via Town A if a direct edge exists from B to D, as this would unnecessarily increase the distance. This strategy saves valuable time during problem-solving!
Step 2: Calculate the length of each route
For each identified path, add up the weights of all edges along that path.
Step 3: Compare and identify the shortest
Compare all calculated lengths and identify the minimum value. This is your shortest path. Note that sometimes multiple paths may have the same minimum length, meaning there can be more than one shortest path in a network.
Worked example: Finding the shortest route
Worked Example: Finding the Shortest Path
Problem: Find the shortest route between Town C and Town F in the network shown above.
Solution:
Step 1: Identify likely shortest routes between C and F:
- Route 1:
- Route 2:
- Route 3:
(We eliminate routes that backtrack or visit vertices multiple times)
Step 2: Calculate each route length:
Route 1:
Route 2:
Route 3:
Step 3: Compare lengths:
- Route 1: km
- Route 2: km
- Route 3: km
Answer: The shortest path is C → B → E → F with a total distance of 16 km.
Exam tips
Examination Strategy
When solving shortest path problems:
- Work systematically through all reasonable routes
- Show your working clearly, listing each path and its calculation
- Don't forget to state your final answer clearly, including both the path and its total length
- Always check that your identified path is actually connected in the network
- Remember that "shortest" could refer to distance, time, or cost depending on what the weights represent
Practice problem

Find the shortest route between the waterfall () and the fern gully () in this forest network. Remember to:
- List all reasonable paths
- Calculate the total time for each path
- Compare results to find the minimum
Remember!
Key Points to Remember:
- Weighted graphs have numbers (weights) associated with each edge, which can represent any numerical information
- Networks are weighted graphs where the weights represent physical quantities like distance, time, or cost
- To find the distance along a path, add up all the edge weights along that path
- The shortest path problem asks: what is the most efficient route between two vertices?
- Use the inspection method for small networks: list all reasonable routes, calculate their lengths, and compare to find the shortest
- When using inspection, eliminate paths that visit vertices more than once or take unnecessary detours
- Always clearly state your final answer, including both the path and its total length or time