Topic 8 of 8
Step 21 · Proofs and discrete maths topics
Describe networks as graphs of vertices and edges, use degrees to count edges, decide when a graph has an Euler circuit, and work with trees.
Vertices, edges and degrees
A graph is a set of vertices joined by edges. The degree of a vertex is the number of edges that meet it. Every edge has two ends, so adding all the degrees counts every edge twice: the handshake lemma.
Example: Counting edges
A graph has 6 vertices, each of degree 3. How many edges does it have?
- The degrees add to 18.
- 18 ÷ 2 = 9.
Answer9
Example: An impossible graph
Can a graph have degrees 3, 3, 3, 2, 2?
- The degrees add to 13, which is odd.
AnswerNo: the degrees must add to an even number
Paths and Euler circuits
A path walks along edges from vertex to vertex. A graph is connected if every two vertices are joined by a path. An Euler circuit uses every edge exactly once and returns to where it started.
| A connected graph with | Result |
|---|---|
| Every degree even | An Euler circuit |
| Exactly two odd degrees | An Euler path from one odd vertex to the other |
| More than two odd degrees | Neither |
Example: A drawing puzzle
Can a square with both diagonals be drawn without lifting the pen or going over a line twice?
- Each corner has degree 3, so there are four odd vertices.
AnswerNo
Example: Königsberg's bridges
Seven bridges joined four land masses, with degrees 5, 3, 3 and 3. Could a walk cross each bridge exactly once?
- All four vertices have odd degree.
AnswerNo, as Euler showed in 1736
Trees
A tree is a connected graph with no cycles. Trees are the leanest connected graphs: remove any edge and the graph falls apart; add any edge and a cycle appears.
Example: Counting edges
How many edges does a tree with 10 vertices have?
- Every tree with n vertices has n − 1 edges.
Answer9
Example: Leaves
Why does every tree with at least 2 vertices have a leaf, a vertex of degree 1?
- Follow a longest path in the tree.
- Its last vertex cannot have another neighbor: that would make a longer path or a cycle.
AnswerSo the end of a longest path is a leaf
Try it yourself
Work each one on paper first, then open the answer to check.
A graph has degrees 4, 3, 3, 2, 2. How many edges does it have?
Show answer
7
Can a graph have exactly one vertex of odd degree?
Show answer
No
Does a connected graph with degrees 2, 2, 4, 2 have an Euler circuit?
Show answer
Yes: every degree is even
How many edges does a tree with 25 vertices have?
Show answer
24
A connected graph has 8 vertices and 7 edges. Is it a tree?
Show answer
Yes
What is the degree of each vertex in a cycle of 5 vertices?
Show answer
2