0% found this document useful (0 votes)
67 views7 pages

Simple Graphs: Coloring: Flights Need Gates, But Times Overlap. Gates Needed?

This document discusses graph coloring and its applications. Graph coloring involves assigning colors to vertices of a graph such that no two adjacent vertices share the same color. This can be used to model problems like scheduling airline flights to different gates or assigning exam time slots to courses with conflicting schedules. The minimum number of colors needed for a graph is called its chromatic number and relates to properties of the graph like its maximum degree. While determining whether a graph is 3-colorable is computationally difficult, there are simple algorithms like greedy coloring that provide upper bounds on a graph's chromatic number.

Uploaded by

Divij
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views7 pages

Simple Graphs: Coloring: Flights Need Gates, But Times Overlap. Gates Needed?

This document discusses graph coloring and its applications. Graph coloring involves assigning colors to vertices of a graph such that no two adjacent vertices share the same color. This can be used to model problems like scheduling airline flights to different gates or assigning exam time slots to courses with conflicting schedules. The minimum number of colors needed for a graph is called its chromatic number and relates to properties of the graph like its maximum degree. While determining whether a graph is 3-colorable is computationally difficult, there are simple algorithms like greedy coloring that provide upper bounds on a graph's chromatic number.

Uploaded by

Divij
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Mathematics for Computer Science Flight Gates

MIT 6.042J/18.062J

flights need gates, but


Simple Graphs: times overlap.
Coloring how many gates needed?

Albert R Meyer, April 5, 2013 coloring.1 Albert R Meyer, April 5, 2013 coloring.2

Airline Schedule Conflicts Among 3 Flights

Needs gate at same time


time 145
122
145
Flights 67
257 306
306
99 99

Albert R Meyer, April 5, 2013 coloring.3 Albert R Meyer, April 5, 2013 coloring.4

1
Model all Conflicts with a Graph Color the vertices

257 122 145 Color vertices so that adjacent


vertices have different colors.
min # distinct colors needed =
67 min # gates needed
306

99

Albert R Meyer, April 5, 2013 coloring.5 Albert R Meyer, April 5, 2013 coloring.6

Coloring the Vertices Better coloring

257 122 145 257 122 145

assign
gates:
67 67
306 257, 67
306
122,145
4 colors 99 99
306
3 colors 99
4 gates Albert R Meyer, April 5, 2013 coloring.7
3 gates Albert R Meyer, April 5, 2013 coloring.8

2
Final Exams Model as a Graph

8.02
subjects conflict if student
takes both, so 6.042
18.02
need different time slots. assign
times:
how short an exam period? 3.091 M 9am
4 time slots M 1pm
(best possible) 6.001 T 9am
T 1pm
Albert R Meyer, April 5, 2013 coloring.9 Albert R Meyer, April 5, 2013 coloring.10

Conflicting Allocation Problems Map Coloring

# separate habitats to house


different species of animals, some
incompatible with others?
# different frequencies for radio
stations that interfere with each
other?
# different colors to color a map?

Albert R Meyer, April 5, 2013 coloring.11 Albert R Meyer, April 5, 2013 coloring.12

3
Countries are the Vertices Planar 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

Albert R Meyer, April 5, 2013 coloring.13 Albert R Meyer, April 5, 2013 coloring.14

Chromatic Number
Simple Cycles

min #colors for G is


χ(Ceven) = 2
chromatic number

χ(G) χ(Codd) = 3

Albert R Meyer, April 5, 2013 coloring.15 Albert R Meyer, April 5, 2013 coloring.18

4
Complete Graph K5
The Wheel Wn

W5
χ(Wodd) = 4
χ(Kn) = n
χ(Weven) = 3
Albert R Meyer, April 5, 2013 coloring.19 Albert R Meyer, April 5, 2013 coloring.20

Bounded Degree “Greedy” Coloring

all degrees ≤ k, implies …color vertices in any order.


next vertex gets a color
χ(G) ≤ k+1 different from its neighbors.

very simple algorithm… ≤ k neighbors, so


k+1 colors always work

Albert R Meyer, April 5, 2013 coloring.21 Albert R Meyer, April 5, 2013 coloring.22

5
coloring arbitrary graphs

2-colorable? --easy to check

3-colorable? --hard to check


(even if planar)
find χ(G)? --theoretically
no harder than 3-color, but
harder in practice
Albert R Meyer, April 5, 2013 coloring.25

6
MIT OpenCourseWare
http://ocw.mit.edu

6.042J / 18.062J Mathematics for Computer Science


Spring 2015

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms .

You might also like