IB Maths AI HL · Unit 3: Geometry and Trigonometry
IB Maths AI HL Graph Theory Questions
Updated October 2026
Exam-style IB Maths AI HL graph theory questions with worked solutions. Start with the 3 fully worked examples below — each is solved step by step, showing the working that earns the marks — then try the practice questions and check your working against the mark scheme.
Start with one question on graph theory. Stuck? Take a hint. No sign-in needed.
A directed graph on A, B, C, D has adjacency matrix (row = from, column = to). How many walks of length 3 go from A to B?
The vertices of a simple graph have degrees 1, 3, 2, 4, 2. Count its edges.
How many edges does the complete graph have?
A graph has edges AB = 4, BC = 6, CD = 3, DA = 5, AC = 7, BE = 2, EC = 5 (weights). Find the length of the shortest route that travels every edge and returns to its start (the Chinese postman problem).
A graph has edges AB = 3, BC = 4, CD = 6, DE = 2, EA = 5, BD = 12 (weights). Find the length of the shortest route that travels every edge and returns to its start (the Chinese postman problem).
Vertices, edges and the adjacency matrix, where the (i, j) entry of An counts the walks of length n. Then minimum spanning trees with Kruskal and Prim, Eulerian and Hamiltonian circuits, and the Chinese postman problem, each with a worked example. Graph theory — adjacency matrices, spanning trees and route problems overview →
What's examined in AI HL graph theory
The question bank covers these graph theory question types (number of questions in brackets):
Graph Algorithms (60)
Graph Properties & Walks (15)
Adjacency Matrices (11)
Where students lose marks on graph theory
Examiner's noteGraph algorithms: Prim vs nearest neighbour, no method shown, bounds mixed up
Where marks are lost: Prim's algorithm and the nearest-neighbour algorithm were confused; Prim's was done "by eye" with no order of edges (the vertex order does not show the algorithm); the stopping rule was not stated; the cycle did not return to the start or repeated vertices; a spanning tree was treated as a path; the best upper bound was not the smallest, and the deleted-vertex lower bound was not understood. The reports call method "all important" in algorithms.
Examiners flagged this in 4 exam series (May 2024, November 2024, May 2025, November 2025). Summarised in our own words from IB subject reports, IB Programme Resource Centre. Read the full note →
Graph Theory worked examples
Worked example 1: Finding Walks using Adjacency Matrices · easy
An undirected graph has vertices labelled , , , and . Its adjacency matrix is given by . Calculate the exact number of walks of length between vertex and vertex .
Solution
1. Identify that the number of walks of length between vertices in a graph is found by raising its adjacency matrix to the power .
2. Enter the adjacency matrix into your Graphic Display Calculator.
3. Calculate the matrix power using the GDC matrix workspace.
4. Extract the value located in the 1st row (for vertex ) and 3rd column (for vertex ) of the resulting matrix.
5. The matrix evaluates to . The exact number of walks is .
5 steps
Examiner tip: Remember that the main diagonal of shows loops, and shows paths of length 2 which include returning to the same vertex. Always ensure you are reading the correct row-column intersection for the required vertices.
Worked example 2: Finding a Minimum Spanning Tree · medium
A connected, weighted graph has edges with the following weights: , , , , , , . Using Kruskal's algorithm, find the total weight of the minimum spanning tree.
Solution
1. List all edges in ascending order of their weights: , , , , , , .
2. Select the smallest edge, , with weight .
3. Add the next smallest edges, and , as they do not form cycles.
4. Reject the edge because connecting , , and would form a closed cycle.
5. Add edge to connect vertex to the tree without forming a cycle. All vertices () are now connected.
6. Sum the selected edge weights: . The total weight of the minimum spanning tree is .
6 steps
Examiner tip: Always physically cross out edges that form a cycle on your working paper so you do not accidentally include them in your final minimum spanning tree sum.
Worked example 3: Calculating the TSP Lower Bound · hard
A delivery driver must visit towns (, , , , ) and return to the start. The graph of the distances is fully connected. Removing vertex and all its incident edges leaves a residual graph whose minimum spanning tree has a weight of . The two shortest edges connected to vertex are and . Calculate the lower bound for the Travelling Salesman Problem.
Solution
1. Identify the correct formula for the lower bound of the Travelling Salesman Problem (TSP): Weight of Residual MST sum of the two shortest edges incident to the removed vertex.
2. Extract the given weight of the residual minimum spanning tree: .
3. Identify the lengths of the two shortest incident edges to vertex : and .
4. Sum these three values to calculate the lower bound: .
5. The lower bound for the optimal tour is .
5 steps
Examiner tip: The lower bound for the Travelling Salesman Problem is often not a valid closed tour itself, but it guarantees that no valid Hamiltonian cycle can possibly have a shorter distance.
Try these IB Maths AI HL graph theory questions
Three questions from the bank, easiest first. Mark schemes and AI marking of your written working are in the practice area. One of them has its full worked solution here, open to everyone.
Question 1 · easy · 4 marks · Paper 1
An undirected graph has 4 vertices: A, B, C, and D.
Its adjacency matrix is given by: .
Sketch the graph clearly showing all vertices and edges.
Determine the degree of every vertex in . Hence, state whether the graph contains an Eulerian trail, and justify your answer.
An unweighted adjacency matrix for graph is .
Calculate . State the geometric meaning of the number in Row 1, Column 3 of the matrix .
Full worked solution Free, no sign-in
Square the matrix: M1A1
Multiply by again: A1
The entry in Row 1, Column 3 is . A1
Meaning: there are no walks of length 3 from Vertex 1 to Vertex 3. R1
Every question here has a full worked solution.See them all →
Question 3 · hard · 8 marks · Paper 1
The town of Königsberg has a snow-plowing network defined by a weighted graph with the following odd-degree vertices: . The shortest path between and has a weight of . The total weight of all edges in the network is .
A snowplow must traverse every edge in the graph at least once and return to its starting position (The Chinese Postman Problem).
Calculate the minimum total distance the snowplow must travel. Explain your reasoning regarding Eulerian circuits.
How many IB Maths AI HL graph theory questions are there?
There are 86 exam-style graph theory questions in the AI HL question bank (Paper 1: 56 · Paper 2: 30), graded 23 easy, 34 medium, 25 hard, 4 very hard. Every question has a full IB-style mark scheme (M, A and R marks).
Is graph theory on Paper 1 or Paper 2?
Both. In the bank, Paper 1: 56 · Paper 2: 30. Practise with your GDC — AI papers expect calculator methods throughout.
Where can I get the mark schemes?
Open the AI HL Unit 3 practice page: every question has a step-by-step IB-style mark scheme, and you can photograph your working for instant AI marking. The worked examples on this page are free.