Color vertices so that min # gates needed Color the vertices... Final ExamsCourses conflict if student takes both, so need different time slots.. How short an exam period?... But This Ma
Trang 1Coloring
Trang 3Airline Schedule
122 145 67 257 306 99 Flights
time
Trang 4Conflicts Among 3 Flights
99
145
306 Needs gate at same time
Trang 5Model all Conflicts with a
Graph
257
67 99
145
306
122
Trang 6Color vertices so that
min # gates needed
Color the vertices
Trang 7Coloring the Vertices
257, 67 122,145 99
306
4 colors
4 gates
assig n
gates :
257
67 99
145
306
122
Trang 8306
122
Trang 9Final Exams
Courses conflict if student
takes both, so need different time slots
How short an exam period?
Trang 10Harvard’s SolutionDifferent
Trang 12But This May be Suboptimal
• Suppose course A and course B meet
at different times
• If no student in course A is also in
course B, then their exams could be simultaneous
• Maybe exam period can be
compressed!
• (Assuming no simultaneous
enrollment)
Trang 14Map Coloring
Trang 15Planar Four Coloring
any planar map is 4-colorable.
1850’s: false proof published
(was correct for 5 colors).
1970’s: proof with computer
1990’s: much improved
Trang 17Pick any vertex as “root.”
if (unique) path from root is
even length:
odd length:
Trees are colorable
2-root
Trang 18Simple Cycles
χ (Ceven) = 2
χ (Codd) = 3
Trang 19Bounded Degreeall degrees ≤ k , implies
very simple
algorithm…
χ(G) ≤ k+1
Trang 20“Greedy” Coloring
…color vertices in any
order next vertex gets a color different from its
neighbors.
≤ k neighbors, so
k+1 colors always
work
Trang 21coloring arbitrary graphs
Trang 22Finis