Simple Graphs: timesoverlap. Coloring howmanygatesneeded? - - PowerPoint PPT Presentation

simple graphs
SMART_READER_LITE
LIVE PREVIEW

Simple Graphs: timesoverlap. Coloring howmanygatesneeded? - - PowerPoint PPT Presentation

Mathematics for Computer Science Flight Gates MIT 6.042J/18.062J flightsneedgates,but Simple Graphs: timesoverlap. Coloring howmanygatesneeded? AlbertRMeyer, April5,2013 AlbertRMeyer, April5,2013 coloring.1 coloring.2


slide-1
SLIDE 1

Albert R Meyer, April 5, 2013

Simple Graphs: Coloring

coloring.1

Mathematics for Computer Science MIT 6.042J/18.062J

Albert R Meyer, April 5, 2013

Flight Gates

flights need gates, but times overlap. how many gates needed?

coloring.2

Albert R Meyer, April 5, 2013

Airline Schedule 122 145 67 257 306 99 Flights time

coloring.3

Albert R Meyer, April 5, 2013

Conflicts Among 3 Flights

99 145 306 Needs gate at same time

coloring.4

1

slide-2
SLIDE 2

Albert R Meyer, April 5, 2013

Model all Conflicts with a Graph

257 67 99 145 306 122

coloring.5

Albert R Meyer, April 5, 2013

Color vertices so that adjacent vertices have different colors. min # distinct colors needed = min # gates needed

Color the vertices

coloring.6

Albert R Meyer, April 5, 2013

Coloring the Vertices

257, 67 122,145 99 306

4 colors 4 gates

assign gates: 257 67 99 145 306 122

coloring.7

Albert R Meyer, April 5, 2013

Better coloring

3 colors 3 gates

257 67 99 145 306 122

coloring.8

2

slide-3
SLIDE 3

Albert R Meyer, April 5, 2013

Final Exams subjects conflict if student takes both, so need different time slots. how short an exam period?

coloring.9

Albert R Meyer, April 5, 2013

Model as a Graph 6.042 6.001 18.02 3.091 8.02 M 9am M 1pm T 9am T 1pm assign times: 4 time slots (best possible)

coloring.10

Albert R Meyer, April 5, 2013

Conflicting Allocation Problems # separate habitats to house different species of animals, some incompatible with others? # different frequencies for radio stations that interfere with each

  • ther?

# different colors to color a map?

coloring.11

Albert R Meyer, April 5, 2013

Map Coloring

coloring.12

3

slide-4
SLIDE 4

Albert R Meyer, April 5, 2013

Countries are the Vertices

coloring.13

Albert R Meyer, April 5, 2013

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

coloring.14

Albert R Meyer, April 5, 2013

Chromatic Number

min #colors for G is

chromatic number

χ(G)

coloring.15

Albert R Meyer, April 5, 2013

Simple Cycles

coloring.18

χ(Ceven) = 2 χ(Codd) = 3

4

slide-5
SLIDE 5

Albert R Meyer, April 5, 2013

Complete Graph K5

coloring.19

χ(Kn) = n

Albert R Meyer, April 5, 2013

The Wheel Wn

coloring.20

χ(Weven) = 3 χ(Wodd) = 4 W5

Albert R Meyer, April 5, 2013

Bounded Degree

all degrees ≤ k, implies very simple algorithm…

coloring.21

χ(G) ≤ k+1

Albert R Meyer, April 5, 2013

“Greedy” Coloring

…color vertices in any order. next vertex gets a color different from its neighbors.

≤ k neighbors, so k+1 colors always work

coloring.22

5

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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.