Networks and graphsIB MYP Maths Extended: Revision notes
Section 1
Vertices, edges and degree
A network (graph) is made of vertices (also called nodes) joined by edges (also called arcs). Towns and roads, computers and cables, and islands and ferries are all examples. The degree of a vertex is the number of edges that meet there. For a network with edges , , , : has degree 3, and have degree 2 and has degree 1. Every edge has two ends, so the sum of all the degrees is twice the number of edges: . This means the number of odd-degree vertices is always even.
Mixing up the number of edges with the sum of the degrees. The sum of the degrees is double the number of edges.
Section 2
Paths and connected networks
A path is a route along edges that does not visit any vertex more than once. A network is connected if there is a path between every pair of vertices. To count the paths from one vertex to another, list them in order: choose the first step, then follow every branch. For the road network with there are 7 paths from to : , , , , , and . Listing systematically stops you missing paths or repeating them.
List routes starting with each first edge in turn. Cross out any route that repeats a vertex.
Section 3
Weighted networks and shortest paths
In a weighted network each edge has a number (its weight), such as a distance in km, a time or a cost. The length of a path is the sum of the weights of the edges it uses. To find the shortest path, work out the length of each possible path, or build up the shortest distance to each vertex step by step. From to in the road network: , , , , . The shortest path is with length 14 km. The route with the fewest edges is not always the shortest. has the fewest edges but is longer than .
Choosing the path with the fewest edges. Add up the weights before deciding.
Section 4
Adjacency matrices
An adjacency matrix records which vertices are joined. For vertices in a fixed order, the entry in row and column is if there is an edge between them and if not. It is symmetric, and each row total is the degree of that vertex. For edges : Writing the matrix as , each entry of counts journeys of exactly two edges between two vertices (a vertex may be revisited, e.g. ). For the ferry network with edges , the to entry of is : via , via and via . Higher powers count journeys of exactly edges.
Check your matrix: the diagonal is all zeros, it is symmetric, and each row total equals that vertex's degree.
Section 5
Euler and Hamiltonian routes
An Euler trail uses every edge exactly once. An Euler circuit is an Euler trail that returns to its start. Use the degrees:
- all vertices even: an Euler circuit exists (start anywhere)
- exactly two odd vertices: an Euler trail exists, starting at one odd vertex and ending at the other
- more than two odd vertices: no Euler route A Hamiltonian path visits every vertex exactly once, and a Hamiltonian cycle also returns to the start. There is no simple degree test for these, so look for a route by trying. Example with edges : odd vertices are (degree 3) and (degree 1), so an Euler trail exists, e.g. . A Hamiltonian path is , but there is no Hamiltonian cycle because has only one edge.
Mixing up Euler (every edge once) and Hamiltonian (every vertex once) routes.
That's the notes covered.
Carry on to the next subtopic.
Exam questions on Networks and graphs
- A network has four vertices , , and . The edges are , , and . Each edge joins two different vertices, and no two vertices are joined by more than one edge.Write down the adjacency matrix of the network, with the vertices in the order , , , .2 marks
- Five towns , , , and are joined by roads. The road lengths in km are , , , , , and . There are no other roads, and a route may not visit the same town twice.Find the shortest route from to and state its length.2 marks
- A complete network has vertices, with every pair of vertices joined by exactly one edge. has 3 edges, has 6 edges and has 10 edges. An Euler circuit is a route that starts and ends at the same vertex and uses every edge exactly once. A connected network has an Euler circuit if and only if every vertex has even degree.Describe the pattern in the number of edges of and write a general rule for the number of edges in terms of . Check your rule using and predict the number of edges of .3 marks
Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).