Coloring
Coloring
• Graph coloring
• Applications
• Planar graphs
Graph Colouring
3-colourable
Optimal Colouring
(Ceven ) =2
(Codd ) =3
Complete Graphs
(Kn ) =n
Wheels
W5
(Wodd ) =4 (Weven ) =3
Trees
root
even length:
odd length:
This is 2-colourable.
• Graph coloring
• Applications
• Planar graphs
Flight Gates
time
122
145
Flights 67
257
306
99
Conflict Graph
145
99
Graph Colouring
257 122
145
67
306
There is a k-colouring in this graph iff the flights can be scheduled using k gates.
> If there is a schedule, the flights scheduled at the same gate have no conflict,
d so we can colour the graph by using one colour for flights in each gate.
= If there is a graph colouring, then the vertices using each colour have no confli
d so we can schedule the flights having the same colour in one gate.
Colouring the Vertices
257 122
145
assign
gates:
67
306
257, 67
122,145
4 colors 99
99
4 gates 306
Better Colouring
257 122
145
67
306
3 colors
99
3 gates
Final Exams
8.02
6.042
18.02
assign
times:
3.091 M 9am
a and b cannot use the same register, because they store different values.
c and d cannot use the same register otherwise the value of c is overwritten.
For some special graphs, we know exactly when they are k-colourable.
b b
d d
a a
c c
So the “flight gate” problem and the “register allocation” can be solved.
This Lecture
• Graph coloring
• Applications
• Planar graphs
Map Colouring
The proof is computer assisted, some mathematics are still not happy.
Planar Graphs
II
IV II
I
4 Connected Regions
Region Boundaries
d
Region Boundaries
abca
b
d
Region Boundaries
abca
b
abda
a
d
Region Boundaries
abca
b
abda
a
acda
d
outer region
Region Boundaries
abca
b
abda
a
bcdb
acda
outer region d
Region Boundaries: Bridge
Region Boundaries: Bridge
f
a c e
efge
abcda
abcefgecda
outer region
Region Boundaries: Dongle
Region Boundaries: Dongle
s
r y x
v
t
w
rstur
outer region
u
Region Boundaries: Dongle
s
r y x
v
t
w
u
Region Boundaries: Dongle
s
stvxyxvwvturs
r y x
v
t
w
rstur
u
Planar Embeddings
v –e +f = 2
v –e +f = 2
Proof by induction on the number of vertices.
v=1 f=e+1
Proof of Euler’s Formula
v –e +f = 2
Induction step (v>1):
e <= 3v-6
Note that
e <= 3v-6
Note that
So
e <= 3v-6
e <= 3v-6
This graph has v=5 and e=10, and so does not satisfy the claim.
Polyhedra