Summary
- Vertex (Node): A point representing an object or place.
- Edge (Arc): A line connecting two vertices.
- Adjacent Vertices: Directly connected by an edge.
- Degree of a Vertex: Total number of edges connected to it.
- Loop: An edge starting and ending at the same vertex.
- Simple Graph: Undirected, unweighted, no loops, no multiple edges.
- Directed Graph (Digraph): Edges have a specific direction (arrows).
- In-degree: Number of edges leading into a vertex.
- Out-degree: Number of edges leaving from a vertex.
- Weighted Graph: Edges assigned numerical values (weights).
- Complete Graph: Every vertex is directly connected to every other vertex.
- Connected Graph: A route exists between any two vertices.
- Strongly Connected Graph (Digraph): A route exists in either direction between any two vertices, obeying arrow directions.
- Subgraph: A smaller graph containing a selection of edges and vertices from a main graph G.
- Tree: A connected graph with no cycles, where any two vertices are connected by exactly one path.
- Spanning Tree: A subgraph that is a tree and contains all vertices from the original graph G.
- Adjacency Matrix: A grid representing connections between vertices.
- Undirected Graph Matrix: Symmetrical along the leading diagonal. Diagonal entry is 0 for no loop, 2 for an undirected loop.
- Directed Graph Matrix: Not usually symmetrical. Diagonal entry is 1 for a directed loop.
- Walks of Length n: The number of walks of length from vertex A to vertex B is the value in row A, column B of the matrix .
- Walks of Length n or less: The total number of walks of length or less from vertex A to vertex B is the value in row A, column B of the sum:
- GDC Use: Use a Graphical Display Calculator (GDC) to compute matrix powers () and sums () for walks.
- Exam Technique: Clearly state the matrix calculation (e.g., ) used on the GDC for method marks.
How it is examined
Mostly vocabulary marks, one each, feeding into AHL 3.15 and AHL 3.16 where the real work is. Getting the terms exactly right matters: connected and strongly connected are different things, and a directed graph has in degree and out degree rather than a single degree. Questions usually supply the graph as a figure, so this subtopic needs figure support in the question rather than drawing support in the answer.
- Graph theory: graphs, vertices, edges, adjacent vertices, adjacent edges, and the degree of a vertex.
- Simple graphs, complete graphs, weighted graphs.
- Directed graphs; the in degree and out degree of a directed graph.
- Subgraphs; trees.
Practice questions
5 questions · 1 medium · 4 hardQuestion 1
MediumPaper 1 · calculator9 marksA network of five research laboratories, A, B, C, D, and E, is connected by data links. The diagram below shows the connections between these laboratories.

State, giving a reason, whether the network graph is
(i) simple;
(ii) connected.
Complete the adjacency matrix for this network.
Hence, determine the number of ways a data packet can travel from Lab A to Lab C using fewer than three direct links.
Recall the definition of a simple graph. A simple graph does not contain loops or multiple edges between the same pair of vertices.
Recall the definition of a connected graph. A graph is connected if there is a path between every pair of distinct vertices.
The entry in the adjacency matrix represents the number of direct links between laboratory and laboratory . Remember that the matrix is symmetric for an undirected graph.
The number of walks of length between two vertices is given by the corresponding entry in the -th power of the adjacency matrix. 'Fewer than three direct links' means paths of length 1 or 2.
Question 2
HardPaper 1 · calculator5 marksA data network connects several hubs, represented by vertices A, B, C, D, E. The numbers on the edges represent the cost (in hundreds of dollars) to lay a new fibre optic cable between two hubs. An engineer needs to inspect all existing cables.

Write down the vertices with odd degree.
The total cost of all existing cables is dollars. The engineer wants to traverse every cable in the network, starting and ending at the same hub, while minimizing the total distance travelled. This may involve traversing some cables more than once.
Find two expressions, in terms of , for the minimum total cost (in hundreds of dollars) required to traverse all cables, beginning and ending at the same hub.
Include in your answer the interval of values of for which each expression is valid.
The degree of a vertex is the number of edges connected to it. A vertex has an odd degree if an odd number of edges connect to it.
To traverse all edges starting and ending at the same vertex, all vertices must have an even degree. Identify the odd-degree vertices from part (a). You need to add edges to the graph to make all degrees even. This involves finding the shortest paths between pairs of odd-degree vertices and choosing the pairing that minimizes the sum of these shortest paths. Consider different cases for the value of .
Question 3
HardPaper 2 · calculator17 marksThe vertices in the following graph represent seven distribution hubs (V1 to V7). The edges represent direct transport routes. The weight on each edge represents the distance, in kilometres, between the two connected hubs.

Determine whether it is possible for a delivery driver to complete a route that starts and finishes at different hubs, using each transport route exactly once. Give a reason for your answer.
The shortest distance, in kilometres, between any two hubs is given in the table.
| V1 | V2 | V3 | V4 | V5 | V6 | V7 | |
|---|---|---|---|---|---|---|---|
| V1 | - | 10 | 15 | a | 24 | 25 | 20 |
| V2 | 10 | - | 8 | 15 | 14 | b | 24 |
| V3 | 15 | 8 | - | 7 | 16 | 11 | c |
| V4 | 22 | 15 | 7 | - | 9 | 15 | 13 |
| V5 | d | 14 | 16 | 9 | - | 6 | 11 |
| V6 | 25 | 19 | 11 | 15 | 6 | - | 5 |
| V7 | 20 | 24 | 16 | 13 | 11 | 5 | - |
Find the values of , , , and .
Use the nearest neighbour algorithm, starting at hub V7, to find an upper bound for the travelling salesman problem.
Sketch a minimum spanning tree for the subgraph formed by removing hub V7.
Write down the total weight of the minimum spanning tree.
Hence find a lower bound for the travelling salesman problem.
Explain one way in which an improved lower bound could be found.
The optimal solution for the travelling salesman problem, starting at V1, is . Given that the length of each transport route shown on the graph is given to the nearest kilometre, find the lower bound for the total distance in the optimal solution.
Consider the degrees of the vertices. For a graph to have an Eulerian path (starting and finishing at different vertices, using each edge exactly once), how many vertices must have an odd degree?
Use Dijkstra's algorithm or inspect the graph to find the shortest paths between the specified pairs of vertices. For example, to find the shortest path from V1 to V4, consider all possible routes and their total lengths.
Start at V7. At each step, move to the unvisited hub that is closest to your current hub. Once all hubs are visited, return to V7 from the last visited hub.
When removing V7, only consider the hubs V1, V2, V3, V4, V5, V6 and the routes connecting them. Use Kruskal's or Prim's algorithm to find the minimum spanning tree.
Sum the weights of the edges in your minimum spanning tree from part (d.i).
To find a lower bound for the TSP, add the weight of the minimum spanning tree (from the subgraph without the starting vertex) to the weights of the two shortest edges connected to the removed starting vertex.
The lower bound calculation involved removing a specific vertex. What if you chose a different vertex to remove?
The phrase 'given to the nearest kilometre' implies an uncertainty in each edge length. If a measurement is given to the nearest whole number, the actual value lies within of the stated value. Consider how this affects the total length of the route.
Question 4
HardPaper 2 · calculator17 marksThe following table shows the average transmission times in milliseconds (ms) for direct data packets between six deep-space observatories. Blank cells indicate no direct data link. The rows represent the sending observatory. The columns represent the receiving observatory.
| O1 | O2 | O3 | O4 | O5 | O6 | |
|---|---|---|---|---|---|---|
| O1 | - | 120 | 180 | - | - | - |
| O2 | 120 | - | - | 90 | 150 | - |
| O3 | 180 | - | - | 200 | - | 220 |
| O4 | - | 90 | 200 | - | 110 | 160 |
| O5 | - | 150 | - | 110 | - | 250 |
| O6 | - | - | 220 | 160 | 250 | - |
Show the direct data links between the observatories as a graph.
Write down the adjacency matrix for this graph, assuming the observatories are ordered O1, O2, O3, O4, O5, O6.
Using your answer to part (b), find the number of different ways to transmit data from and return to observatory O1 in exactly 4 hops.
State whether or not it is possible to transmit data from and return to observatory O1 in exactly 6 hops, having visited each of the other 5 observatories exactly once. Justify your answer.
The following table shows the least transmission time (in ms) to travel between the observatories.
| O1 | O2 | O3 | O4 | O5 | O6 | |
|---|---|---|---|---|---|---|
| O1 | 0 | 120 | 180 | a | 270 | 370 |
| O2 | 120 | 0 | 300 | 90 | 150 | b |
| O3 | 180 | 300 | 0 | 200 | 310 | 220 |
| O4 | a | 90 | 200 | 0 | 110 | 160 |
| O5 | 270 | 150 | 310 | 110 | 0 | 250 |
| O6 | 370 | b | 220 | 160 | 250 | 0 |
Find the values of and .
A research team needs to visit each of the observatories, starting and finishing at observatory O1. Use the nearest neighbour algorithm to find an upper bound for the total transmission time of the trip.
By deleting observatory O1, use the deleted vertex algorithm to find a lower bound for the total transmission time of the trip.
Represent each observatory as a vertex and each direct data link as an edge. Since transmission times are given, the graph should be weighted, but for showing direct links, you only need to draw the edges.
An adjacency matrix has elements if there is a direct link between vertex and vertex , and otherwise. For an undirected graph, the matrix is symmetric.
The entry of the -th power of the adjacency matrix gives the number of walks of length from vertex to vertex . You need to find the entry of .
Consider if a Hamiltonian cycle of length 6 exists in the graph, starting and ending at O1.
The values and represent the shortest paths between pairs of observatories. You can find these by tracing paths on the graph or using a shortest path algorithm.
Start at O1. At each step, move to the unvisited observatory that has the shortest direct transmission time from the current observatory. Continue until all observatories are visited, then return to O1.
Remove O1 and all its incident edges. Find the Minimum Spanning Tree (MST) for the remaining graph. Then, add the two shortest edges that connect O1 to any vertex in the MST.
Question 5
HardPaper 3 · calculator14 marksA new suburb is being planned with 10 plots of land. The road network connecting these plots is modelled as a simple, connected graph , where the plots are vertices and roads are edges.
(a) (i) Write down the minimum number of roads required to connect all 10 plots.
(a) (ii) Find the maximum number of roads that could be built if every plot is directly connected to every other plot.
(a) (iii) The local council wants to design the road network so that a garbage truck can travel along each road exactly once and return to its starting depot (one of the plots). Find the maximum number of roads possible in such a network.
A biochemist is studying fullerenes, which are molecules of carbon in the form of a hollow sphere. The structure of a fullerene can be represented by a connected, planar graph , where carbon atoms are vertices (), covalent bonds are edges (), and the rings of atoms are faces (). Each face is a polygon with edges.
(b) (i) By considering the total number of edges counted face by face, explain why .
(b) (ii) A hypothetical fullerene, , is composed entirely of pentagonal faces (). Given that it has 20 vertices (), find the number of faces, .
(b) (iii) Another hypothetical fullerene has 28 vertices (). It is known that all its faces are identical polygons. Find the possible values for the number of faces, .
Think about the simplest type of connected graph. What is its name and how many edges does it have for a given number of vertices?
This describes a specific type of graph where every vertex is connected to every other vertex. What is the formula for the number of edges in such a graph?
For a garbage truck to travel each road exactly once and return, what condition must be met by the degree of each vertex? How does this limit the maximum number of edges?
Consider one face. It has 'm' edges. If you sum this over all 'f' faces, what do you get? Now consider a single edge. How many faces does it border?
You have two equations: Euler's formula for planar graphs and the formula from part (b)(i). You need to solve them simultaneously.
Use Euler's formula and the result from (b)(i) to create an equation relating 'f' and 'm'. Remember that both 'f' and 'm' must be integers, and a polygon must have at least 3 sides.
No question on this page matches those filters. Try another difficulty or paper.
1,013 more IB Math AI questions in the app
Every answer is marked mark by mark, IB-style, and the AI tutor helps when you are stuck.
Where marks are lost
- Using your own wrong value after failing a "show that." All follow through is withdrawn for the rest of that question.
- Leaving an answer in calculator notation. Never accepted in a final answer, and AI's constant calculator use makes this the easiest slip in the whole subject.
Links to other topics and subjects
- Aim 8: the importance of symbolic maps, for example Metro and Underground maps, structural formulae in chemistry, electrical circuits.
- TOK: mathematics and knowledge claims. Consider the proof of the four-colour theorem. If a theorem is proved by computer, how can we claim to know it is true?