TExcelTAD
Home › Discrete Mathematics › Planar Graphs

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 vv vertices, ee edges and ff faces:

v−e+f=2v - e + f = 2

Proof by induction on the number of edges. A tree has e=v−1e = v - 1 and one face: v−(v−1)+1=2v - (v - 1) + 1 = 2. 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 ee and ff by 1, which leaves v−e+fv - e + f unchanged. ■\blacksquare

Shape (as a graph) vv ee ff v−e+fv - e + f
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 v≥3v \ge 3, every face is bounded by at least 3 edges, and each edge borders at most 2 faces, so 3f≤2e3f \le 2e. Substituting into Euler's formula:

e≤3v−6e \le 3v - 6

For K5K_5: e=10>3⋅5−6=9e = 10 > 3 \cdot 5 - 6 = 9, so K5K_5 is not planar. For a bipartite graph there are no triangles, so faces have at least 4 edges: 4f≤2e4f \le 2e, giving e≤2v−4e \le 2v - 4. For K3,3K_{3,3} (three houses, three utilities): e=9>2⋅6−4=8e = 9 > 2 \cdot 6 - 4 = 8, so K3,3K_{3,3} 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 K5K_5 or K3,3K_{3,3}.

python · try it yourself
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 K3,3K_{3,3}).

Every planar graph has a vertex of degree at most 5

If every vertex had degree at least 6, the handshake lemma would give 2e≥6v2e \ge 6v, so e≥3v>3v−6e \ge 3v > 3v - 6, contradicting the edge bound. This small fact drives the proof that planar graphs can be colored with 6 colors (remove a vertex of degree ≤5\le 5, 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 ff faces that are all mm-gons and nn edges at every vertex. Counting edges from faces and from vertices gives mf=2emf = 2e and nv=2env = 2e. Euler's formula then becomes

1m+1n=12+1e\frac{1}{m} + \frac{1}{n} = \frac{1}{2} + \frac{1}{e}

so 1m+1n>12\frac{1}{m} + \frac{1}{n} > \frac{1}{2} with m,n≥3m, n \ge 3, which allows only 5 pairs. That is why there are exactly five Platonic solids:

python · try it yourself
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 (v−e+f=2v - e + f = 2 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

f=2−v+e=2−10+15=7f = 2 - v + e = 2 - 10 + 15 = 7.

Exercise 2: Too many edges

Can a planar graph with 8 vertices have 19 edges?

Answer

No.

Solution

The bound is 3⋅8−6=18<193 \cdot 8 - 6 = 18 < 19.

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 p=12p = 12, whatever the number of hexagons.

Solution

With pp pentagons and hh hexagons: f=p+hf = p + h, 2e=5p+6h2e = 5p + 6h, and 3v=2e3v = 2e. Then

v−e+f=5p+6h3−5p+6h2+p+h=10p+12h−15p−18h+6p+6h6=p6=2v - e + f = \frac{5p + 6h}{3} - \frac{5p + 6h}{2} + p + h = \frac{10p + 12h - 15p - 18h + 6p + 6h}{6} = \frac{p}{6} = 2

so p=12p = 12. The standard ball has h=20h = 20.

Test yourself

A connected planar graph has 6 vertices and 9 edges. How many faces?

  1. 3
  2. 5
  3. 4
  4. 6

Why is K5K_5 not planar?

  1. It has a vertex of degree 5
  2. It has 10 edges, more than 3v−6=93v - 6 = 9
  3. It is bipartite
  4. It has no cycles

Every planar graph has a vertex of degree at most…

  1. 3
  2. 4
  3. 5
  4. 6