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

Info icon This 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
Image of page 1

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

View Full Document Right 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 on the left and all the white vertices in a clump on the right.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern