Planar Graphs and Coloring
A planar graph is one you can draw flat with no edges crossing, and every such drawing balances out the same way: V − E + F = 2. Coloring vertices so that neighbors always differ is how you schedule things that clash, and any planar graph, so any map, needs at most four colors.
What the symbols mean
- Vertices
The number of vertices.
- Edges
The number of edges.
- Faces
The regions the drawing divides the plane into, counting the outside.
- Chromatic number
The fewest colors needed so that neighbors always differ.
Explanation
A planar graph is simply one you can draw on a flat sheet of paper without any lines crossing; "planar" just means it fits in a plane. Coloring a graph means giving each dot a color so that no two connected dots match. That's good for scheduling, since connected dots are things that clash, like exams sharing students, and colors are time slots. The formula is three counts: (dots), (lines) and (faces, the regions the lines cut the paper into, including the big one outside). And says the fewest colors you need, , is never more than 4 for a flat drawing. Two short facts with a lot packed into them.
Euler's formula. For any connected planar drawing, . A cube's skeleton has . Why should that always come out the same? Build the drawing up one edge at a time and watch . A single vertex has , since the whole page is one face. Adding a new vertex on the end of a new edge raises and together, so nothing changes. Adding an edge between two vertices you already have splits a face in two, raising and together, so again nothing changes. Every connected drawing can be built this way, so it's stuck at 2. That's the heart of the proof.
Consequences. Each face of a simple planar graph has at least 3 edges and each edge borders at most 2 faces, which gives . In other words, a flat drawing can't hold too many edges. So (, ) is not planar. A similar count shows isn't either. By Kuratowski's theorem, these two are the only obstacles: a graph is non-planar exactly when it contains a copy of one of them, possibly with extra vertices sitting along its edges.
Coloring. The chromatic number is the fewest colors so adjacent vertices differ. A cycle needs 2 colors if it's even, because you can just alternate. If it's odd, alternating breaks when you get back around, so it needs 3. needs , since every vertex touches every other. A greedy algorithm (color vertices one at a time with the first color available) never needs more than one more than the largest degree, because each vertex has at most that many neighbors blocking colors.
The four color theorem (1976) says every planar graph, and so every map, can be colored with four colors. To see why maps count, put a vertex in each country and join two when they share a border; that graph is planar. It was the first major theorem proved with essential computer help.
A common mistake. It's tempting to apply in reverse and decide a graph is planar because it passes. It doesn't work that way. The inequality can only rule planarity out. has 9 edges and 6 vertices, well under , and it still isn't planar.
See it
Worked examples
Check Euler's formula for a cube.
- 1
A cube has 8 vertices, 12 edges and 6 faces.
Practice
Type your answer and check it. Solve them all to complete the lesson.
A connected planar graph has 10 vertices and 15 edges. How many faces does it have?
What is the chromatic number of a cycle with 5 vertices?
What is the most edges a simple planar graph with 8 vertices can have?
How many colors does the four color theorem guarantee are enough for any map?
Five courses have final exams, and each course shares students with the next one around a ring: C1–C2, C2–C3, C3–C4, C4–C5 and C5–C1. Conflicting exams can't share a time slot. What is the fewest slots needed?
A soccer ball is stitched from 12 pentagons and 20 hexagons. How many corners (vertices) does it have?
The hardest one here. Get it, and you've got this lesson.
A connected planar graph has 12 vertices, and every face, including the outer one, is a triangle. How many edges and how many faces does it have? Enter both.
Where it's used
Exam timetables, radio frequency assignments and register allocation in compilers are all graph-coloring problems.