A Level Further Mathematics · Chapter 64 · Decision Mathematics · Decision 1
A graph is just dots joined by lines, yet counting its degrees, edges and faces reveals which routes exist and which drawings are possible.
Road maps, computer networks, molecules and social circles can all be drawn as points joined by lines. This chapter builds the language of graphs, introduces the facts that every graph must obey, and asks when a graph can be drawn without any edges crossing.
In this chapter · jump to a section
Start here
Your route through this chapter
By the end of this chapter you will be able to:
- use the vocabulary of graphs and networks precisely
- use the handshaking lemma to link degrees and edges
- recognise simple, connected, complete, bipartite and tree graphs, and count their edges
- decide whether a graph is Eulerian, semi-Eulerian or neither, and recognise Hamiltonian cycles
- represent graphs and networks with adjacency and distance matrices
- use Euler's formula and the planarity algorithm to decide whether a graph is planar
Time: three sessions, about 4 hours, plus the practice ladder and the exam workshop.
You need first: algorithms, sorting and bin packing, and confident counting.
The big idea
The big idea
A graph consists of vertices joined by edges. Only the connections matter, not the positions or the shapes of the edges. A network is a graph whose edges carry numbers, called weights, such as distances, times or costs.
The diagram shows a network of five vertices and six weighted edges. Vertex B meets three edges, so its degree is 3. Questions about networks ask about connections, routes and totals, never about the exact positions of the points.
Vertices and edges
The points of a graph are called vertices, or nodes. The lines joining them are edges, or arcs. Two vertices joined by an edge are adjacent. An edge joining a vertex to itself is a loop, and two edges joining the same pair are multiple edges.
Degree
The degree, or valency, of a vertex is the number of edge-ends meeting it. A loop counts twice, because both of its ends meet the vertex. Vertices of odd degree turn out to be especially important for routes, as section 3 shows.
Graphs versus drawings
The same graph can be drawn in many ways. Moving vertices or bending edges does not change the graph, as long as the same pairs stay joined. This freedom is what makes planarity interesting: a graph that looks tangled may have a tidy drawing.
Networks and weights
Adding weights to the edges turns a graph into a network. The weights might be distances between towns, times to complete tasks, or costs of laying cables. Most of Decision Mathematics works with networks, finding routes or connections that minimise or maximise total weight.
Directed graphs
In a directed graph, or digraph, each edge has a direction, shown by an arrow. One-way streets and flows of goods are modelled with directed edges. Degrees then split into in-degree and out-degree.
Why graphs are useful
Graphs strip away irrelevant detail and keep only the structure of connections. That makes very different problems look the same, so one algorithm can solve them all. A delivery route, a circuit design and a timetable can all become graph problems.
The language of the exam
Exam questions use these words precisely, and the mark scheme expects you to as well. Learn the definitions of vertex, edge, degree, trail, path, cycle, tree and planar, so that every explanation you write is exact and quick.
Section 1
Degrees and the handshaking lemma
The handshaking lemma
In any graph, the sum of the degrees of all the vertices equals twice the number of edges. Every edge has two ends, and each end adds one to the degree of a vertex. So the degrees always add up to an even number.
Common mistake: taking the number of edges to be the sum of the degrees, which counts every edge twice. Each edge contributes 2 to the total degree, one for each end. The number of edges is half the sum of the degrees.
The handshaking lemma
- Sum of degrees
- 14
- Edges, half the sum
- 7
- Odd vertices
- 4
Figure 64.1 adds edges to a graph on five vertices and shows each vertex's degree. However the edges are placed, the degrees add to twice the number of edges.
Odd vertices come in pairs
Since the degree sum is even, the number of vertices of odd degree must be even. A graph can have 0, 2, 4 or more odd vertices, but never 1 or 3. This simple fact settles many questions about whether a graph can exist.
Checking whether degrees are possible
To test whether a list of degrees could belong to a graph, add them. If the sum is odd, no such graph exists. If the sum is even, a graph might exist, though further checks may be needed for simple graphs.
Degree sequences
The degree sequence lists the degrees of a graph's vertices, usually in order. Two graphs with different degree sequences cannot be the same graph. Two graphs with the same degree sequence might still be different, so the sequence is a useful but incomplete description.
Isolated vertices
A vertex of degree zero is isolated: it has no edges. A graph with an isolated vertex, and at least one other vertex, is not connected. Isolated vertices still count in the total number of vertices.
Finding missing degrees
If all but one degree is known, together with the number of edges, the handshaking lemma gives the missing degree. Twice the number of edges minus the known degrees leaves the unknown one. This is a common short question.
Proof that odd vertices come in pairs
Proof: every graph has an even number of odd vertices
Split the vertices into those of even degree and those of odd degree. By the handshaking lemma,
The first sum is even and is even, so
is even. A sum of odd numbers is even only when there is an even number of them.
Loops and multiple edges
A loop adds two to the degree of its vertex, because both of its ends meet that vertex. Multiple edges between the same pair each count separately. The handshaking lemma still holds, provided loops are counted twice, so it works for every graph, simple or not.
Using the lemma in reverse
Sometimes the number of edges is given and the degrees must be shared out. Then the degrees must add to exactly twice that number. This quickly shows whether a proposed design, such as a network of roads meeting at junctions, could possibly exist.
Why examiners like this lemma
The handshaking lemma turns a question about drawings into a question about arithmetic. A short sum can prove that a graph is impossible without any drawing. Questions often hide it inside a longer problem, so look for it whenever degrees are mentioned.
Degrees in a network
In a network the degree of a vertex still counts edges, not weights. A vertex joined by edges of weight 3, 5 and 1 has degree 3, not 9. Keep the two ideas apart: degree is about how many connections meet a vertex, weight is about their size.
Worked example 1: counting edges from degrees
A graph has five vertices with degrees 3, 2, 2, 3 and 4. How many edges does it have?
| Working | Reason |
|---|---|
| Sum of degrees | Add every vertex's degree |
| Edges | Each edge adds two to the sum |
| 7 edges | Half the degree sum |
Simple graphs need more checks
For a simple graph, an even degree sum is not enough. No vertex can have degree greater than the number of other vertices, so a graph on four vertices cannot contain a vertex of degree 4. Check this limit as well as the parity of the sum.
Worked example 2: an impossible graph
Explain why no graph can have vertices of degrees 3, 3, 3, 2 and 2.
| Working | Reason |
|---|---|
| Sum of degrees | Add the given degrees |
| The sum must equal twice the edges | This is the handshaking lemma |
| 13 is odd, so no such graph exists | An odd sum is impossible |
Check yourself. A graph has six vertices, each of degree 3. How many edges does it have?
Show the answer
The degrees add to , and the number of edges is half of this. So the graph has 9 edges.
Section 2
Types of graph
Simple and connected graphs
A simple graph has no loops and no multiple edges. A graph is connected if there is a path between every pair of vertices. Most graphs in this course are simple and connected, but questions sometimes test whether you can recognise when they are not.
Common mistake: counting n² edges in the complete graph on n vertices instead of n(n − 1)/2. In a complete graph each pair of different vertices is joined once. Squaring counts every pair twice and also counts loops, which a simple graph does not have.
Complete graphs
- Edges n(n − 1)/2
- 10
- Hamiltonian cycles (n − 1)!/2
- 12
Figure 64.2 draws complete graphs for different numbers of vertices. Count the edges and compare with the formula.
Complete graphs
The complete graph has vertices, each joined to every other. Each vertex has degree . By the handshaking lemma, has edges. These graphs model situations where everything connects to everything.
Bipartite graphs
A bipartite graph has its vertices split into two sets, with every edge joining a vertex in one set to a vertex in the other. No edge joins two vertices in the same set. Workers and tasks, or students and courses, form natural bipartite graphs.
Complete bipartite graphs
The complete bipartite graph has vertices in one set and in the other. Every vertex in the first set is joined to every vertex in the second. It has edges. is famous as a graph that cannot be drawn without crossings.
Trees
A tree is a connected graph with no cycles. A tree with vertices always has exactly edges. Removing any edge from a tree disconnects it, and adding any edge creates a cycle. Trees are central to the next chapter.
Subgraphs
A subgraph uses some of the vertices and edges of a graph. A spanning subgraph includes every vertex. A spanning tree is a spanning subgraph that is a tree, connecting every vertex with the fewest possible edges.
Counting edges in a complete graph another way
Choose any two vertices of : there are ways, and each choice gives exactly one edge. Since , the two counts agree. Thinking in pairs is often the quickest way to count edges.
Recognising bipartite graphs
To test whether a graph is bipartite, try colouring its vertices with two colours so that every edge joins different colours. If this succeeds, the colours give the two sets. If a cycle of odd length exists, the colouring must fail, so the graph is not bipartite.
Connected components
A graph that is not connected falls into separate pieces called components. Each component is connected in its own right. Many algorithms in this course assume a single component, so check connectivity before applying them.
Isomorphic graphs
Two graphs are isomorphic if one can be relabelled to give the other, keeping every edge. Isomorphic graphs have the same numbers of vertices and edges and the same degree sequence. Checking these is a quick way to show that two graphs are different.
Choosing the right model
Deciding which kind of graph fits a situation is part of modelling. Friendships suit simple undirected graphs, one-way roads need directed edges, and matching applicants to jobs gives a bipartite graph. Choosing well makes the later mathematics straightforward.
Worked example 3: a complete graph
How many edges does the complete graph have, and what is the degree of each vertex?
| Working | Reason |
|---|---|
| Each vertex joins the other 5 | Every vertex has degree n − 1 |
| Edges | Halve the degree sum |
| 15 edges, each vertex of degree 5 | Formula for complete graphs |
Why trees have one fewer edge than vertices
Build a tree by starting from one vertex and adding the others one at a time. Each new vertex joins the tree by exactly one edge, since a second edge would make a cycle. So vertices need exactly edges.
Worked example 4: bipartite graphs and trees
Find the number of edges in , and in a tree with 10 vertices.
| Working | Reason |
|---|---|
| : edges | Every pair across the two sets |
| Tree: edges | Trees have one fewer edge than vertices |
| 12 and 9 edges | Results for the two graphs |
Check yourself. How many edges does the complete graph have?
Show the answer
Each of the 8 vertices has degree 7, so the degrees add to 56. Halving gives edges.
Section 3
Routes: Eulerian and Hamiltonian
Walks, trails, paths and cycles
A walk is any sequence of edges, each starting where the last ended. A trail is a walk with no repeated edges. A path is a trail with no repeated vertices. A cycle is a closed path, returning to its start, with no other repeated vertex.
Common mistake: confusing an Eulerian route, which uses every edge once, with a Hamiltonian cycle, which visits every vertex once. These are different problems. An Eulerian trail is about edges and is decided by the odd vertices; a Hamiltonian cycle is about vertices and has no simple test.
Eulerian graphs
A connected graph is Eulerian if it has a closed trail using every edge exactly once. This happens exactly when every vertex has even degree. The trail can start anywhere and returns to its start, like drawing a figure without lifting the pen.
Semi-Eulerian graphs
A connected graph is semi-Eulerian if it has a trail using every edge exactly once that starts and ends at different vertices. This happens exactly when there are exactly two odd vertices. The trail must start at one odd vertex and finish at the other.
Why odd vertices matter
Each time a trail passes through a vertex, it uses two edges there, one in and one out. So a vertex that is neither the start nor the end must have even degree. Only the start and finish of an open trail can have odd degree.
Hamiltonian cycles
A Hamiltonian cycle visits every vertex exactly once and returns to the start. A graph with such a cycle is Hamiltonian. There is no simple test for Hamiltonian graphs; finding a cycle, or proving none exists, can be hard for large graphs.
Counting Hamiltonian cycles
In the complete graph , a Hamiltonian cycle is an ordering of the vertices. Fixing the start and ignoring direction gives distinct cycles. This number grows extremely fast, which is why the travelling salesman problem is hard.
Finding an Eulerian trail
Once the degree test says a trail exists, start at an odd vertex if there are two, or anywhere if there are none. Follow unused edges, avoiding an edge whose removal would cut off unused parts of the graph, until every edge has been used.
The bridges of Königsberg
The study of graphs began with a puzzle about seven bridges joining four land masses. Every land mass met an odd number of bridges, so the graph had four odd vertices. No walk could cross every bridge exactly once, which Euler proved in 1736.
Paths versus trails in exam answers
Examiners expect the words to be used precisely. A trail may revisit vertices but not edges, while a path revisits neither. Writing path when you mean trail can lose a mark, so check the definition before you write.
Hamiltonian versus Eulerian questions
A question that mentions visiting every place, such as every town on a delivery round, points to Hamiltonian cycles. A question about travelling along every road, such as gritting or post delivery, points to Eulerian ideas and to route inspection.
Adding edges to make a graph Eulerian
A graph with odd vertices can be made Eulerian by adding edges that pair up the odd vertices. Each added edge changes two odd degrees into even ones. This idea is the heart of route inspection, where repeated roads play the part of the added edges.
Worked example 5: classifying a graph
A connected graph has degrees 2, 4, 3, 3 and 2. Is it Eulerian, semi-Eulerian or neither?
| Working | Reason |
|---|---|
| Odd degrees: the two vertices of degree 3 | Count the odd vertices |
| Exactly two odd vertices | This is the condition for semi-Eulerian |
| So it is semi-Eulerian, with ends at the odd vertices | The route must use those endpoints |
Worked example 6: Hamiltonian cycles in K5
How many distinct Hamiltonian cycles does have?
| Working | Reason |
|---|---|
| Fix the starting vertex | Rotations give the same cycle |
| Order the other 4: ways | Choices for the remaining vertices |
| Halve for direction: 12 cycles | Reversing gives the same cycle |
Check yourself. Classify the connected graph whose degrees are 2, 2, 4, 4 and 2.
Show the answer
Every vertex has even degree, so there are no odd vertices. The graph is therefore Eulerian, with a closed trail using every edge exactly once.
Section 4
Adjacency and distance matrices
Adjacency matrices
An adjacency matrix records a graph as a table. Rows and columns are labelled by the vertices, and the entry in row , column is the number of edges joining vertex to vertex . For an undirected graph, the matrix is symmetric.
Common mistake: reading the number of edges from an undirected adjacency matrix as the full sum of its entries. Each edge appears twice, once in each direction, because the matrix is symmetric. The number of edges is half the sum of the entries.
Reading degrees from a matrix
The degree of a vertex is the sum of its row in the adjacency matrix, with a loop counted as 2 if the matrix records loops that way. Summing every row gives twice the number of edges, which is the handshaking lemma again.
Distance matrices
For a network, a distance matrix records the weight of each edge in place of the number of edges. A dash or blank shows that two vertices are not directly joined. Distance matrices are the usual way to give a network to a computer.
Directed graphs and matrices
For a directed graph, the entry in row , column counts edges from to . The matrix need not be symmetric. Row sums give out-degrees and column sums give in-degrees.
Drawing from a matrix
To draw a graph from its adjacency matrix, place the vertices and add an edge for each non-zero entry above the diagonal. For a distance matrix, label each edge with its weight. Check the drawing by comparing degrees with row sums.
Total weight
The total weight of a network is the sum of all its edge weights. From a symmetric distance matrix, add the entries above the diagonal only, or add them all and halve. Totals like this appear in route inspection problems later.
Checking a matrix is valid
An adjacency matrix for an undirected graph must be symmetric, because an edge from to is also an edge from to . A simple graph also has zeros on the leading diagonal, since it has no loops. Check both properties before using a matrix.
Matrices for large networks
For a network with many vertices, a drawing becomes cluttered, while a matrix stays tidy. Computers store networks as matrices, and many of the algorithms in later chapters, such as Prim's algorithm, can be carried out directly on a distance matrix.
Reading weights carefully
In a distance matrix, an entry of zero on the diagonal means no distance from a vertex to itself. A dash means there is no direct edge, which is quite different from a weight of zero. Confusing the two gives impossible routes.
Comparing two representations
A drawing shows the shape of a network at a glance, which helps you spot routes and cycles. A matrix shows every weight exactly and is easy to check systematically. Exam questions move between the two, so practise converting in both directions.
Degrees and the matrix together
Adding every row sum of an adjacency matrix gives the total degree, and so twice the number of edges. This gives a quick check on any matrix you write down: the total of all its entries must be even for an undirected graph.
Worked example 7: edges from a matrix
An undirected graph has an adjacency matrix whose entries add up to 10. How many edges does it have?
| Working | Reason |
|---|---|
| Each edge appears in two entries | The matrix is symmetric |
| Edges | Halve the sum of the entries |
| 5 edges | Matches the handshaking lemma |
Worked example 8: total weight of a network
The network in the big idea has edges AB 3, BC 5, CD 2, DE 4, EA 6 and BD 1. Find its total weight and the degree of B.
| Working | Reason |
|---|---|
| Total | Add every edge weight once |
| The total weight of the network | |
| B meets AB, BC and BD, so degree 3 | Count the edges at B |
Check yourself. In the graph shown in this section, what is the degree of vertex B, and how does it appear in the adjacency matrix?
Show the answer
B is joined to A, C and D, so its degree is 3. In the adjacency matrix, the row for B has three entries equal to 1, summing to 3.
Section 5
Planarity and Euler's formula
Planar graphs
A graph is planar if it can be drawn in the plane with no edges crossing. A drawing with crossings does not prove a graph is non-planar; perhaps a better drawing exists. Planarity matters for designing circuit boards and road layouts.
Common mistake: treating the bound E ≤ 3V − 6 as proof that a graph is planar, when it only rules graphs out. A simple planar graph must satisfy the bound, so breaking it proves non-planarity. But satisfying it proves nothing: some non-planar graphs, such as , satisfy it.
Euler's formula and the planarity bound
- Bound 3V − 6
- 12
- Faces if planar, E − V + 2
- 5
- Verdict
- may be planar
Figure 64.3 plots the planarity bound. Points above the line are definitely non-planar; points on or below it need further checking.
Faces
A planar drawing divides the plane into regions called faces, including the unbounded outside face. Every face is bounded by edges. Counting faces, edges and vertices of a planar drawing leads to a remarkable formula.
Euler's formula
For any connected planar graph drawn without crossings, , where , and count vertices, edges and faces. The formula holds for every such drawing, so the number of faces is fixed by the graph.
Derivation: the bound E ≤ 3V − 6 for simple planar graphs
In a simple connected planar graph with at least three vertices, every face is bounded by at least three edges, and every edge borders at most two faces. Counting edge-face incidences gives
Substituting from Euler's formula gives
Any simple graph with more edges than this cannot be planar.
Using the bound
If a simple graph has more than edges, it is not planar. has and , so it is not planar. This gives a quick way to rule graphs out without trying to draw them.
Bipartite graphs and the stricter bound
A bipartite graph has no cycles of odd length, so every face has at least four edges. The same argument then gives . has , , so it is not planar.
Checking Euler's formula on a simple case
A single cycle with vertices has edges and two faces, inside and outside. Then , as the formula predicts. Testing a formula on a simple case like this builds confidence and catches slips.
Trees and Euler's formula
A tree has only one face, the outside, because it contains no cycles to enclose a region. With , Euler's formula gives . The formula and the tree result agree, as they must.
Why the formula holds
Start with a single vertex, where . Adding a new vertex with one edge increases and by one each. Adding an edge between existing vertices increases and by one each. Neither step changes .
What the bound cannot do
The bound comes from Euler's formula, so it only applies to planar graphs. It gives a test that can rule a graph out but never rule one in. To prove a graph is planar, draw it without crossings or use the planarity algorithm.
Counting faces in a drawing
When counting faces by eye, remember the outside region, which is the most commonly forgotten face. Then check the count with Euler's formula. If the two disagree, either a face has been missed or the drawing has a crossing.
Worked example 9: counting faces
A connected planar graph has 6 vertices and 9 edges. How many faces does any planar drawing of it have?
| Working | Reason |
|---|---|
| Euler's formula for planar graphs | |
| Substitute the known values | |
| faces | Including the outside face |
Planarity of small complete graphs
to are all planar: can be drawn as a triangle with one vertex in the middle. is the first complete graph that is not planar, and every larger complete graph contains , so none of them is planar either.
Worked example 10: K5 is not planar
Show that is not planar.
| Working | Reason |
|---|---|
| , | Complete graph on five vertices |
| Bound | Greatest edges for a planar graph |
| , so is not planar | The bound is broken |
Check yourself. Use the bipartite bound to show that is not planar.
Show the answer
has 6 vertices and 9 edges, and the bipartite bound allows at most edges. Since , it is not planar.
Section 6
The planarity algorithm
When the bound is not enough
If a graph satisfies , it might still be non-planar. The planarity algorithm settles the question for graphs with a Hamiltonian cycle. It tries to place every remaining edge either inside or outside the cycle without crossings.
Common mistake: placing two edges that cross inside the Hamiltonian cycle on the same side in the planarity algorithm. Edges that would cross if both were drawn inside must go on opposite sides. Putting them together creates a crossing and gives the wrong verdict.
Steps of the algorithm
First, find a Hamiltonian cycle and draw it as a polygon. List the remaining edges. Place the first edge inside. For each later edge, check which placed edges it would cross; it must go on the opposite side to each of them.
Detecting non-planarity
If an edge would cross an edge already inside and also an edge already outside, it cannot be placed. The graph is then not planar. If every edge finds a side, the resulting drawing proves the graph is planar.
Crossing chords
Two chords of the Hamiltonian cycle cross inside it exactly when their endpoints alternate around the cycle. For example, with the cycle in order A, B, C, D, E, F, the chords AD and BE alternate, so they cannot both go inside.
Choosing the cycle
The algorithm needs a Hamiltonian cycle, and different cycles lead to different working but the same verdict. Choose a cycle that is easy to see in the given drawing. If the graph has no Hamiltonian cycle, this algorithm does not apply directly.
Showing your working
List the edges not in the cycle, then record each one as inside or outside with a brief reason, such as BE crosses AD so goes outside. Finish with a clear conclusion and, if planar, a crossing-free drawing.
Recording the algorithm in a table
A clear way to present the algorithm is a table with one row per edge. Each row names the edge, the edges it crosses, and the side chosen. An examiner can then follow every decision, and a mistake in one row is easy to locate.
Redrawing the final graph
When the algorithm succeeds, finish by drawing the graph with the inside edges inside the cycle and the outside edges outside. This drawing is the proof of planarity. Bend outside edges around the cycle as needed so that they do not cross.
Kuratowski's theorem
A deep result says that a graph is planar exactly when it contains no subdivision of or . You do not need to use this theorem, but it explains why these two graphs keep appearing as the standard non-planar examples.
Practical uses of planarity
Single-layer circuit boards, underground pipe networks and road junctions without bridges all need planar layouts. When a layout is not planar, engineers add layers, bridges or tunnels. Planarity tells them how much extra cost to expect.
When there is no Hamiltonian cycle
If a graph has no Hamiltonian cycle, the planarity algorithm cannot start. In exam questions a Hamiltonian cycle is usually given or easy to spot. If not, look for a long cycle through most vertices and treat the rest separately.
Worked example 11: applying the algorithm
A graph has Hamiltonian cycle ABCDEFA and extra edges AD, BE and CF. Decide whether it is planar.
| Working | Reason |
|---|---|
| Place AD inside | The first chord can go either side |
| BE crosses AD, so place BE outside | Alternating endpoints must separate |
| CF crosses AD and BE, so it cannot be placed | The graph is not planar |
| 9 edges, within the bound | The bound alone could not decide |
Worked example 12: faces of a planar drawing
A connected planar graph has 7 vertices and 10 edges. How many faces does a planar drawing have, and is the planarity bound satisfied?
| Working | Reason |
|---|---|
| Rearrange Euler's formula for faces | |
| Faces including the outside | |
| Bound , so it is satisfied | This is consistent with planarity |
Check yourself. How many faces does a connected planar graph with 8 vertices and 12 edges have?
Show the answer
Rearranging Euler's formula gives faces, including the outside face.
Reference
Results in this chapter
| Result | What it says | When to use it | In the formula booklet? |
|---|---|---|---|
| Sum of degrees | Handshaking lemma | Counting edges | No, learn it |
| has edges | Complete graphs | Counting edges | No, learn it |
| Tree with vertices has edges | Trees | Spanning trees | No, learn it |
| 0 odd vertices: Eulerian; 2: semi-Eulerian | Edge routes | Route problems | No, learn it |
| Euler's formula | Planar graphs | No, learn it | |
| , or if bipartite | Planarity bounds | Ruling out planarity | No, derive it |
Reasoning
Modelling task: laying out a circuit board
The situation
An engineer is designing a single-layer circuit board. Six components must be connected by tracks, and tracks on a single layer cannot cross. The engineer wants to know whether the required connections can be laid out on one layer, or whether a second layer is needed.
Assumptions
Each component is treated as a point and each track as a line joining two components. Tracks may bend freely around the board. Only the pattern of connections matters, not the lengths of the tracks or the sizes of the components.
With these assumptions, the board becomes a graph, and the question becomes whether the graph is planar.
The model
The components are the vertices A to F. The required connections form a Hamiltonian cycle ABCDEFA, together with three more tracks AD, BE and CF. The graph has 6 vertices and 9 edges, so it satisfies , and the bound alone cannot decide.
Results
The planarity algorithm places AD inside the cycle and BE outside, because BE crosses AD. The track CF crosses both AD and BE, so it cannot be placed on either side. The graph is therefore not planar: in fact it is drawn differently.
Evaluating the model
The model correctly shows that one layer is not enough, so the engineer needs a second layer or a redesign. It ignores track widths and spacing rules, which could make even a planar layout impossible on a small board.
A fuller model would add these physical constraints, but the graph model gives a quick, reliable first answer. Removing just one of the three extra tracks would make the board planar, which suggests where a redesign could help.
Your turn
Suppose the engineer drops the connection CF. Use the planarity algorithm to show that the remaining connections can be laid out on one layer.
Show a model answer
With CF removed, place AD inside the cycle and BE outside, since they cross. No other edges remain, so every edge has a side and no crossings occur. The graph is planar, and one layer is enough.
Practice
Practice ladder
Rung 1: Recall and fluency
Q1. Four vertices have degrees 1, 2, 2 and 3. Find the number of edges in the graph.
Worked solution to Q1
By the handshaking lemma, the degrees add to twice the number of edges. The sum is , so the graph has 4 edges.
Q2. State how many edges the complete graph has.
Worked solution to Q2
Each of the 7 vertices joins the other 6, so the degrees add to 42. Halving, because each edge is counted twice, gives 21 edges.
Q3. Give the number of edges in a tree with 15 vertices.
Worked solution to Q3
A tree with vertices always has edges, since it is connected with no cycles. So a tree with 15 vertices has 14 edges.
Rung 2: Application
Q4. Decide whether a connected graph with degrees 3, 3, 3, 3 is Eulerian, semi-Eulerian or neither.
Worked solution to Q4
All four vertices have odd degree, so there are four odd vertices. A trail using every edge once needs zero or two odd vertices, so the graph is neither Eulerian nor semi-Eulerian.
Q5. Determine the number of edges in the complete bipartite graph .
Worked solution to Q5
In a complete bipartite graph every vertex in one set joins every vertex in the other. With 4 and 5 vertices that gives edges.
Q6. An undirected graph's adjacency matrix has entries adding up to 18. Calculate the number of edges.
Worked solution to Q6
In an undirected adjacency matrix each edge is recorded twice, once in each direction. So the number of edges is half the sum, .
Rung 3: Analysis
Q7. Deduce how many distinct Hamiltonian cycles the complete graph has.
Worked solution to Q7
Fixing the start leaves orderings of the other vertices, and reversing a cycle gives the same cycle. So there are distinct Hamiltonian cycles.
Q8. Find the number of faces of a connected planar graph with 10 vertices and 15 edges.
Worked solution to Q8
Euler's formula links the vertices, edges and faces of any planar drawing. Substituting the given values gives , and solving for the faces gives , counting the outside face as one of them.
Q9. A simple graph has 7 vertices and 16 edges. Explain whether it can be planar.
Worked solution to Q9
A simple planar graph with 7 vertices has at most edges. This graph has 16, which breaks the bound, so it cannot be planar.
Rung 4: Stretch
Q10. Show that satisfies the bipartite bound, and use a drawing argument to decide whether it is planar.
Worked solution to Q10
has 6 vertices and 8 edges, and the bound allows , so it is satisfied. Placing the two vertices on either side of a line of four, every edge can be drawn without crossing, so it is planar.
Q11. A graph has 9 edges, and its six vertices have degrees 2, 3, 3, 4, 4 and . Determine .
Worked solution to Q11
The degrees must add to twice the edges, . The known degrees add to 16, so the missing degree is .
Q12. A connected graph has degrees 4, 2, 5, 3, 2, 4. Compute the number of edges and decide whether it is Eulerian, semi-Eulerian or neither.
Worked solution to Q12
The degrees add to 20, so the graph has 10 edges. Exactly two vertices, of degrees 5 and 3, are odd, so it is semi-Eulerian, with any such trail running between them.
Exam practice
Exam technique and worked answer workshop
How these questions are marked
M1 marks go to using the handshaking lemma, applying Euler's formula or a planarity bound, and following the planarity algorithm correctly. A1 marks go to correct counts and classifications. B1 marks go to precise definitions and clear conclusions.
Use the correct vocabulary: trail, path and cycle have different meanings. When classifying a graph, count the odd vertices and state the rule. In the planarity algorithm, record every edge with its side and a reason.
Exam question 1 (6 marks · Paper 3 · about 8 minutes)
A connected graph has six vertices with degrees 4, 2, 5, 3, 2 and 4. Find the number of edges. Decide whether the graph is Eulerian, semi-Eulerian or neither, giving a reason, and state where any such trail must start and finish. (6)
Mark scheme for exam question 1
Sum of degrees 20 M1
10 edges A1
Counts odd vertices M1
Two odd vertices A1
Semi-Eulerian B1
Starts and ends at the vertices of degree 5 and 3 B1
Exam question 2 (6 marks · Paper 3 · about 8 minutes)
Explain why no graph can have five vertices of degrees 3, 3, 3, 2 and 2. Find the number of edges of and the degree of each of its vertices. (6)
Mark scheme for exam question 2
Sum of degrees 13 M1
Must equal twice the number of edges B1
Odd, so impossible A1
Each vertex of has degree 5 B1
M1
15 edges A1
Exam question 3 (7 marks · Paper 3 · about 10 minutes)
A graph has Hamiltonian cycle ABCDEFA and three further edges AD, BE and CF. Use the planarity algorithm to determine whether the graph is planar, explaining each step. State the number of edges and comment on Euler's bound. (7)
Mark scheme for exam question 3
Draws the Hamiltonian cycle M1
AD placed inside A1
BE crosses AD, so placed outside M1 A1
CF crosses both, so cannot be placed A1
Not planar B1
9 edges, within , so the bound alone cannot decide B1
Exam question 4 (6 marks · Paper 3 · about 8 minutes)
Use Euler's formula to show that a simple connected planar graph with vertices has at most edges. Hence show that is not planar. (6)
Mark scheme for exam question 4
Each face has at least 3 edges B1
Each edge borders at most 2 faces B1
M1
Substitutes M1
Obtains A1
has 10 edges, more than 9 A1
Exam question 5 (5 marks · Paper 3 · about 7 minutes)
How many distinct Hamiltonian cycles does have? Explain your method, and explain why this number makes checking every cycle impractical for large complete graphs. (5)
Mark scheme for exam question 5
Fixes the starting vertex M1
orderings A1
Halves for direction M1
12 cycles A1
grows extremely fast B1
Exam question 6 (5 marks · Paper 3 · about 7 minutes)
A connected planar graph has 6 vertices and 9 edges. Find the number of faces of a planar drawing. Explain why a simple graph with 6 vertices and 13 edges cannot be planar. (5)
Mark scheme for exam question 6
Euler's formula M1
A1
Bound M1
13 exceeds 12 A1
So not planar B1
Exam question 7 (6 marks · Paper 3 · about 8 minutes)
For , check that holds, and use the bipartite bound to show it is not planar. Explain why the stricter bound applies to bipartite graphs. (6)
Mark scheme for exam question 7
, B1
, so the general bound is satisfied A1
Bipartite bound M1
, so not planar A1
Bipartite graphs have no odd cycles B1
So every face has at least 4 edges B1
Exam question 8 (5 marks · Paper 3 · about 7 minutes)
The network in the diagram for the big idea has edges AB 3, BC 5, CD 2, DE 4, EA 6 and BD 1. Find its total weight, the degree of each vertex, and the number of odd vertices. (5)
Mark scheme for exam question 8
Total weight 21 M1 A1
Degrees A 2, B 3, C 2, D 3, E 2 A1
Two odd vertices M1
B and D A1
Annotated model answer: exam question 3
Draw the Hamiltonian cycle ABCDEFA as a hexagon. M1. The remaining edges are AD, BE and CF. Place AD inside. A1. BE has endpoints that alternate with those of AD around the cycle, so it would cross AD and must go outside. M1 A1.
CF alternates with both AD and BE, so it would cross AD inside and BE outside. It cannot be placed, A1, so the graph is not planar. B1. It has 9 edges, within the bound of 12, so the bound alone could not settle the question. B1.
Annotated model answer: exam question 4
In a simple connected planar graph with at least three vertices, every face is bounded by at least three edges, B1, and every edge borders at most two faces. B1. Counting edge-face incidences, . M1.
Euler's formula gives , M1, so , which rearranges to . A1. has and , but the bound allows only 9, so is not planar. A1.
Connections
Synoptic link
Algorithms, sorting and bin packing introduced precise algorithms, which this chapter applies to graphs. Minimum spanning trees and shortest paths uses trees and networks to find cheapest connections and routes.
Route inspection builds directly on Eulerian graphs and odd vertices. The travelling salesman problem builds on Hamiltonian cycles, where the huge number of cycles makes exact solutions hard.
Synoptic question 1. Explain how the handshaking lemma guarantees that the number of odd vertices in any graph is even.
Answer to synoptic question 1
The degrees add to twice the number of edges, an even number. Even degrees contribute an even amount, so the odd degrees must also add to an even number. That is only possible if there is an even number of them.
Recap
Recap and next step
- A graph is vertices and edges; a network adds weights. Only connections matter.
- Degrees add to twice the number of edges, so odd vertices come in pairs.
- has edges, has , and a tree with vertices has .
- Zero odd vertices means Eulerian; exactly two means semi-Eulerian.
- Adjacency and distance matrices record graphs and networks; an undirected matrix counts each edge twice.
- Planar graphs obey and ; the planarity algorithm decides doubtful cases.
Next chapter: Minimum spanning trees and shortest paths, which finds the cheapest way to connect a network and the shortest route through it.
For your exam board
This chapter covers Pearson Edexcel A Level Further Mathematics (9FM0) Decision Mathematics 1 section 1: the language of graphs and networks, degrees, special graphs, Eulerian and Hamiltonian graphs, adjacency and distance matrices, Euler's formula and the planarity algorithm. It is assessed on Paper 3D, Decision Mathematics 1. Similar content appears in AQA (7367) and OCR (H245) discrete options.