Decision Mathematics 1 (Paper 3D or 4D), topic 1 (Algorithms and graph theory), spec point 1.3
Vocabulary
- A graph has vertices (nodes) joined by edges (arcs). A network is a graph with a weight on each edge.
- The degree (valency) of a vertex is the number of edges meeting there. A vertex is odd or even by its degree.
- A path is a route along edges that does not visit any vertex twice. A cycle is a closed path.
- A graph is connected if there is a path between every pair of vertices.
- A tree is a connected graph with no cycles. A spanning tree includes every vertex of the graph.
- A digraph has directed edges.
- A subgraph uses only vertices and edges from the original graph.
The handshaking lemma
Each edge adds 2 to the total degree, so
This means every graph has an even number of odd vertices.
Eulerian and semi-Eulerian graphs
For a connected graph:
| Odd vertices | Type | Meaning |
|---|---|---|
| 0 | Eulerian | there is a closed route using every edge exactly once |
| 2 | semi-Eulerian | there is a route using every edge exactly once, starting and ending at the two odd vertices |
| more than 2 | neither |
Special graphs
- The complete graph has vertices, each joined to every other. It has edges, and every vertex has degree . So is Eulerian exactly when is odd.
- A planar graph can be drawn with no edges crossing.
- Two graphs are isomorphic if they have the same number of vertices and their vertices can be matched so that the degrees of corresponding vertices are the same (and, in full, the same vertices are joined).
- A Hamiltonian cycle visits every vertex exactly once and returns to the start.
Worked example
A graph has vertex degrees 2, 3, 4, 3, 2.
- The sum is 14, so there are 7 edges.
- There are two odd vertices, so (if connected) it is semi-Eulerian. A route through every edge must start at one vertex of degree 3 and finish at the other.
Common mistake: confusing Eulerian (every edge once) with Hamiltonian (every vertex once).
Exam tip: when classifying a graph, list the degree of every vertex, count the odd ones, and give the reason with your answer.
Check yourself
How many edges does have?
.
Is Eulerian?
Yes: every vertex has degree 4.
A graph has degrees 1, 2, 2, 3, 3. Why is this impossible?
There are three odd vertices (1, 3 and 3), but the number of odd vertices must be even. (Equivalently, the degrees add up to 11, which is odd.)