Planar Graphs
A graph is planar if it can be drawn in the plane without edges crossing. Circuit boards with one layer of wiring, road maps without bridges, and the meshes used in games and finite-element simulations are planar. A single formula of Euler controls their structure and limits how many edges they can have.
Faces and Euler's formula
A crossing-free drawing divides the plane into regions called faces, including the unbounded outer face. A triangle has 2 faces (inside and outside); a cube's skeleton has 6.
Euler's formula. For a connected planar graph drawn with vertices, edges and faces:
Proof by induction on the number of edges. A tree has and one face: . If the graph is not a tree, it has a cycle; removing a cycle edge keeps it connected and merges the two faces on either side of that edge into one, lowering both and by 1, which leaves unchanged.
| Shape (as a graph) | ||||
|---|---|---|---|---|
| tetrahedron | 4 | 6 | 4 | 2 |
| cube | 8 | 12 | 6 | 2 |
| octahedron | 6 | 12 | 8 | 2 |
| dodecahedron | 20 | 30 | 12 | 2 |
| icosahedron | 12 | 30 | 20 | 2 |
An edge bound and two non-planar graphs
In a planar graph with , every face is bounded by at least 3 edges, and each edge borders at most 2 faces, so . Substituting into Euler's formula:
For : , so is not planar. For a bipartite graph there are no triangles, so faces have at least 4 edges: , giving . For (three houses, three utilities): , so is not planar: you cannot connect three houses to water, gas and electricity without crossings.
Kuratowski's theorem says these are the only obstacles: a graph is planar if and only if it contains no subdivision of or .
def check(name, v, e, bipartite=False):
bound = 2 * v - 4 if bipartite else 3 * v - 6
verdict = "may be planar" if e <= bound else "NOT planar"
print(f"{name:10s} v={v:2d} e={e:2d} bound={bound:2d} -> {verdict}")
check("K4", 4, 6)
check("K5", 5, 10)
check("K3,3", 6, 9, bipartite=True)
check("cube", 8, 12, bipartite=True)
check("Petersen", 10, 15)K4 v= 4 e= 6 bound= 6 -> may be planar
K5 v= 5 e=10 bound= 9 -> NOT planar
K3,3 v= 6 e= 9 bound= 8 -> NOT planar
cube v= 8 e=12 bound=12 -> may be planar
Petersen v=10 e=15 bound=24 -> may be planar
The bound is only a necessary condition: the Petersen graph passes it but is not planar (it contains a subdivision of ).
Every planar graph has a vertex of degree at most 5
If every vertex had degree at least 6, the handshake lemma would give , so , contradicting the edge bound. This small fact drives the proof that planar graphs can be colored with 6 colors (remove a vertex of degree , color the rest by induction, put it back: at most 5 colors are blocked). With more work the same idea gives 5 colors; the Four Color Theorem needed a computer.
Only five regular polyhedra
A regular polyhedron has faces that are all -gons and edges at every vertex. Counting edges from faces and from vertices gives and . Euler's formula then becomes
so with , which allows only 5 pairs. That is why there are exactly five Platonic solids:
from fractions import Fraction
for m in range(3, 7):
for n in range(3, 7):
s = Fraction(1, m) + Fraction(1, n) - Fraction(1, 2)
if s > 0:
e = 1 / s
print(f"faces are {m}-gons, {n} per vertex: e={e}, v={2 * e / n}, f={2 * e / m}")faces are 3-gons, 3 per vertex: e=6, v=4, f=4
faces are 3-gons, 4 per vertex: e=12, v=6, f=8
faces are 3-gons, 5 per vertex: e=30, v=12, f=20
faces are 4-gons, 3 per vertex: e=12, v=8, f=6
faces are 5-gons, 3 per vertex: e=30, v=20, f=12
In software
Chip and PCB layout software tests planarity to decide how many wiring layers are needed. Graph-drawing libraries use planar embeddings to draw diagrams without crossings. Mesh code in game engines and CAD checks Euler's formula ( for a closed mesh without holes) to detect broken geometry.
Exercises
Exercise 1: Count faces
A connected planar graph has 10 vertices and 15 edges. How many faces does any planar drawing have?
Answer
Solution
.
Exercise 2: Too many edges
Can a planar graph with 8 vertices have 19 edges?
Answer
No.
Solution
The bound is .
Exercise 3: Soccer ball
A soccer ball has pentagonal and hexagonal faces, with exactly 3 faces at each vertex. Show that it has exactly 12 pentagons.
Answer
Euler's formula forces , whatever the number of hexagons.
Solution
With pentagons and hexagons: , , and . Then
so . The standard ball has .
Test yourself
A connected planar graph has 6 vertices and 9 edges. How many faces?
- 3
- 5
- 4
- 6
Why is not planar?
- It has a vertex of degree 5
- It has 10 edges, more than
- It is bipartite
- It has no cycles
Every planar graph has a vertex of degree at most…
- 3
- 4
- 5
- 6