l9_graphs2 - 6.042/18.062J Mathematics for Computer Science...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
6.042/18.062J Mathematics for Computer Science March 3, 2005 Srini Devadas and Eric Lehman Lecture Notes Graph Theory II 1 Coloring Graphs Each term, the MIT Schedules Office must assign a time slot for each final exam. This is not easy, because some students are taking several classes with finals, and a student can take only one test during a particular time slot. The Schedules Office wants to avoid all conflicts, but to make the exam period as short as possible. We can recast this scheduling problem as a question about coloring the vertices of a graph. Create a vertex for each course with a final exam. Put an edge between two vertices if some student is taking both courses. For example, the scheduling graph might look like this: Next, identify each time slot with a color. For example, Monday morning is red, Mon- day afternoon is blue, Tuesday morning is green, etc. Assigning an exam to a time slot is now equivalent to coloring the corresponding ver- tex. The main constraint is that adjacent vertices must get different colors; otherwise, some student has two exams at the same time. Furthermore, in order to keep the exam period short, we should try to color all the vertices using as few different colors as possi- ble. For our example graph, three colors suffice: red green blue green blue
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Graph Theory II This coloring corresponds to giving one final on Monday morning (red), two Monday afternoon (blue), and two Tuesday morning (green). 1.1 k-Coloring Many other resource allocation problems boil down to coloring some graph. In general, a graph G is k -colorable if each vertex can be assigned one of k colors so that adjacent ver- tices get different colors. The smallest sufficient number of colors is called the chromatic number of G . The chromatic number of a graph is generally difficult to compute, but the following theorem provides an upper bound: Theorem 1. A graph with maximum degree at most k is ( k + 1) -colorable. Proof. We use induction on the number of vertices in the graph, which we denote by n . Let P ( n ) be the proposition that an n -vertex graph with maximum degree at most k is ( k + 1) -colorable. A 1-vertex graph has maximum degree 0 and is 1-colorable, so P (1) is true. Now assume that P ( n ) is true, and let G be an ( n + 1) -vertex graph with maximum degree at most k . Remove a vertex v , leaving an n -vertex graph G . The maximum degree of G is at most k , and so G is ( k + 1) -colorable by our assumption P ( n ) . Now add back vertex v . We can assign v a color different from all adjacent vertices, since v has degree at most k and k + 1 colors are available. Therefore, G is ( k + 1) -colorable. The theorem follows by induction. 1.2 Bipartite Graphs The 2-colorable graphs are important enough to merit a special name; they are called bipartite graphs . Suppose that G is bipartite. This means we can color every vertex in G either black or white so that adjacent vertices get different colors. Then we can put all the black vertices in a clump
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/08/2011 for the course EECS 6.042 taught by Professor Dr.ericlehman during the Spring '11 term at MIT.

Page1 / 12

l9_graphs2 - 6.042/18.062J Mathematics for Computer Science...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online