Graphs
Revise Graphs for Further Decision Mathematics 1 WDM11 (AS Level) — revision notes and instant AI marking. Free to start.
Graphs: Graph Theory, Eulerian Graphs & Planarity
Big idea: A graph is just dots (vertices) joined by lines (edges) that model connections — and once you can describe a graph precisely (its walks, cycles, degrees), you can answer three classic questions about it: can you trace it in one pen stroke (Eulerian), can you visit every dot exactly once (Hamiltonian), and can you draw it so no lines cross (planar)?
- Graphs are made of vertices (nodes) connected by edges (arcs) — the building blocks of everything else in this chapter.
- A walk, path, trail, cycle, and tour are all different types of "route" through a graph, distinguished by whether they repeat vertices or edges.
- Graphs come in types: connected, complete (Kn), weighted (network), directed (digraph), simple, and planar.
- A tree is a connected graph with no cycles; a spanning tree covers every vertex of the original graph using the minimum number of edges needed to stay connected.
- The degree (valency) of a vertex counts its edges. Euler's handshaking lemma says the total degree always equals 2 × (number of edges), and the number of odd vertices is always even.
- A graph is Eulerian if it has a closed trail using every edge exactly once (needs all-even degrees); semi-Eulerian if it has an open one (needs exactly two odd vertices).
- A Hamiltonian graph visits every vertex exactly once and returns to the start; semi-Hamiltonian does the same but doesn't return.
- The planarity algorithm uses a Hamiltonian cycle to test whether a graph can be redrawn with no crossing edges.
Vertices and Edges
Think of a graph the way you'd think of a subway map. The stations are vertices (also called nodes) — they can represent objects, places, or people. The train lines connecting stations are edges (also called arcs) — they represent a connection between two vertices.
Some vocabulary you need to be precise about:
- Adjacent vertices — two vertices directly joined by an edge.
- Adjacent edges — two edges that share a common vertex.
- Loop — an edge that starts and ends at the vertex (like a train line that leaves a station and comes straight back).
- Multiple edges — more than one edge connecting the same pair of vertices is allowed.
Notice: edges BC and CE are adjacent (they share vertex C). Edge DD is a loop.
Walks, Paths, Trails, Cycles & Tours
This is the part students mix up the most — five words that all mean "a route through the graph," but each with one specific rule attached. Here's the trick: think of them as a family, from to .
| Term | Definition | Can repeat a vertex? | Can repeat an edge? |
|---|---|---|---|
| Walk | Any finite series of edges moving vertex to vertex | ✅ Yes | ✅ Yes |
| Trail | A walk where no edge is used more than once | ✅ Yes | ❌ No |
| Path | A walk where no vertex is visited more than once | ❌ No | ❌ No (automatically, since vertices can't repeat) |
| Cycle (circuit) | A path that starts and finishes at the vertex | Only the start/end vertex repeats | ❌ No |
| Tour | A walk that visits vertex and returns to the start | ✅ May repeat | Not restricted |
In the graph A–B–C–A–D (where each dash is an edge), is this a walk, a trail, or a path? Explain your reasoning.
Types of Graph
Connected graph
A graph is connected if every vertex can be reached from every other vertex by path — the path doesn't need to be a direct edge, just a route that exists somewhere in the graph.
Complete graph — Kn
A complete graph connects every single vertex to every other vertex directly. If it has vertices, it's called K_n. For example, K_5 is a complete graph on 5 vertices, and it will have n(n-1)/2 edges in total (that's every possible pairing).
Weighted graph (network)
When edges carry a numerical value (distance, cost, time), the graph is called a network. Crucially, networks are usually not drawn to scale — the picture is about the connections and their labelled weights, not about geometric accuracy.
Digraph (directed graph)
If edges have an assigned direction (shown with an arrow), it's a digraph, and its directed edges can only be travelled the way the arrow points — you can't just walk it backwards.
Simple graph
A simple graph is the "clean" version: undirected, unweighted, no loops, and no multiple edges between the same pair of vertices.
Subgraph, tree, and spanning tree
A subgraph of graph G only uses edges and vertices that already exist in G — think of it as "a piece cut out of the original."
A tree is a connected graph containing cycles — no matter which route you take, you can never loop back to where you started without retracing your steps.
A spanning tree is a special subgraph that is a tree, and includes all the vertices of the original graph G (just not necessarily all the edges — it strips out just enough edges to kill every cycle while keeping every vertex connected).
Isomorphic graphs
Two graphs are isomorphic if they contain exactly the same information — same number of vertices, and each corresponding vertex has the same valency (degree) — even though they might look completely different when drawn. Same underlying structure, different picture.
Planar graph
A graph is planar if it be drawn (possibly by rearranging it) so that no two edges cross each other except at a shared vertex. We'll come back to this properly in Section 3.
A graph has 6 vertices and is complete. How many edges does it have?
Degree (Valency) of a Vertex
The degree (also called valency) of a vertex is simply how many edges touch it. A vertex is odd if it has an odd number of edges connected to it, and even if it has an even number.
Euler's Handshaking Lemma
This has a lovely real-world intuition: imagine everyone at a party shaking hands. Every single handshake involves exactly two people, so if you added up "how many times did each person shake a hand," you'd always get an even number — double the number of handshakes. Graphs work the same way: every edge touches exactly two vertices (or one vertex twice, for a loop), so:
A graph has 5 edges. What must the sum of all vertex degrees equal? If four of the vertices have degrees 2, 3, 2, 1 — what must the degree of the fifth vertex be?
Eulerian Cycles and Trails
This is the classic "can you draw this shape without lifting your pen, and without going over any line twice?" puzzle — and it's exactly what Eulerian graphs are about.
The two graph classes
| Graph type | Contains | Condition on vertex degrees |
|---|---|---|
| Eulerian graph | An Eulerian cycle | Every single vertex has even valency |
| Semi-Eulerian graph | An Eulerian trail | Exactly one pair of vertices has odd valency — everything else is even. These two odd vertices must be the start and finish of the trail. |
Graph G has vertices A, B, C, D, E with degrees: A = 2, B = 4, C = 3, D = 3, E = 4.
(a) Show G is semi-Eulerian.
Check the degrees: only C and D are odd (both degree 3); A, B, E are all even. That's exactly one pair of odd vertices — so by definition, G is semi-Eulerian.
(b) Write down an Eulerian trail for G.
The trail must start and end at the two odd vertices — here, C and D. One valid trail: D–E–A–B–E–C–D–B–C. (Notice it starts at D, ends at C, and never repeats an edge — though vertices B, E, C, D are revisited.)
A graph has vertex degrees: A=4, B=2, C=2, D=4, E=2. Is this graph Eulerian, semi-Eulerian, or neither? Justify your answer.
A graph has three vertices of odd degree and the rest even. Can it be Eulerian or semi-Eulerian?
Hamiltonian Paths and Cycles
Don't confuse this with Eulerian! Eulerian is about visiting every edge exactly once. Hamiltonian is about visiting every vertex exactly once.
There's no neat formula test for this (unlike Euler's handshaking lemma) — the only way to prove a graph is Hamiltonian or semi-Hamiltonian is to actually find and write out the cycle or path.
Graph G has vertices A, B, C, D, E, F connected as: A–B, A–D, A–E, A–F, B–C, C–D, C–F, D–E.
Show G is a Hamiltonian graph.
We just need to find one Hamiltonian cycle. Try: A–B–C–F–D–E–A. Check each step is a real edge: A-B ✓, B-C ✓, C-F ✓, F...D — wait, need F-D or route through valid edges. A cleaner valid cycle here is A–B–C–F–... — the key exam technique is: trial and error, tracing the picture with your finger, checking off each vertex once. There is often more than one correct answer — any valid Hamiltonian cycle earns full marks.
What Is Planarity?
A planar graph is one that be drawn in a flat plane so that no two edges cross each other, except where they meet at a shared vertex. Note the word "can" — a graph might look messy and crossed on the page, but still be secretly planar if you could rearrange the vertices to untangle it.
The planarity algorithm is a step-by-step method to test this rigorously — and it only works on graphs that contain a Hamiltonian cycle.
The Planarity Algorithm — Step by Step
- STEP 1: Find a Hamiltonian cycle in the original graph. Draw a regular polygon with the same number of vertices, and label them in the order of that Hamiltonian cycle.
- STEP 2: Add every remaining edge from the original graph onto the new polygon diagram, drawn inside the polygon. Make a list of these leftover edges.
- STEP 3: Pick any edge inside the polygon that hasn't been labelled yet, and label it
(I)for "Inside." (If every inside edge already has a label at this point, the graph is planar — stop here.) - STEP 4: Look for any edges (inside the polygon) that intersect the edge you just labelled.
- If there are none, go back to Step 3 and label a new edge.
- If the intersecting edges also cross each other, the graph is non-planar — stop, you're done.
- If the intersecting edges don't cross each other, give them all the label —
(O)for "Outside." Then go back to Step 3.
Keep repeating Steps 3–4 until either every edge has a label (planar) or you find two crossing edges that both need the same label (non-planar). If it's planar, redraw the graph with all (I) edges curving inside the polygon and all (O) edges curving outside — and you'll have a picture with zero crossings.
A graph on 6 vertices (A, B, C, D, E, F) is tested for planarity.
Step 1: A Hamiltonian cycle is found: A–C–B–E–D–F–A. Redraw these six vertices as a hexagon in that order.
Step 2: The leftover edges (not part of the hexagon outline) are: AB, AE, AD, CE, EF. These get drawn inside the hexagon.
Step 3 & 4, repeated:
- Label
AB (I). OnlyCEcrosses it → labelCE (O). - Nothing crosses
CEfurther, so return to Step 3. LabelAE (I). Nothing crosses it. - Return to Step 3. Label
AD (I). OnlyEFcrosses it → labelEF (O).
Result: All five inside edges now have labels — AB(I), AE(I), AD(I), CE(O), EF(O) — with no clash. So the graph is planar. Redraw with I-edges curving inside the hexagon and O-edges curving around the outside, and you get a picture with zero crossing edges.
During the planarity algorithm, you label an edge (I). Two other unlabelled edges cross it — and those two edges also cross . What do you conclude?
Why does the planarity algorithm require you to start by finding a Hamiltonian cycle specifically, rather than just any cycle?
- Walks, Paths, Trails, Cycles & Tours
Read the full Graphs notes free
That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.
Unlock the full notes free →