Project 8: Graph Coloring and Scheduling

A coloring of a graph, sometimes called a vertex coloring, is an assignment of colors to the vertices of a graph such that no edge in the graph Sorry, your browser does not support inline SVG. has the same-colored endpoints. The coloring of the graph on the left is a valid coloring, as each of the five edges has different colored endpoints, but the coloring of the graph on the right is not a valid coloring, since the diagonal edge connects two yellow vertices.

The chromatic number of a graph G is the smallest number of colors required to construct a valid coloring of the graph, designated by χ(G) (a lowercase Greek letter chi, pronounced “kai”). Notice that the chromatic number of a bipartite graph will always be two, as long as the graph has at least one edge.

Part 1 – Colorings

Determine the chromatic number for the following graphs, and find a valid coloring using that number of colors.

1 2 3 4 Sorry, your browser does not support inline SVG.    
   

1 2 3 4 Sorry, your browser does not support inline SVG.    
   

1 2 3 4 5 Sorry, your browser does not support inline SVG.    
   


1 2 3 4 5 6 Sorry, your browser does not support inline SVG.    
   
   

CourseStudents
MathematicsAlex, Beth, Doug
NursingAlex, Emma, Fred
PsychologyBeth, Doug, Emma
Quantum PhysicsAlex, Beth, Cara
RussianAlex, Cara, Fred
SociologyCara, Doug
Consider a scheduling problem where you have v classes to schedule and n different time slots during the week. Each class has an enrollment of students, and most students take multiple classes. No student may be in two classes at the same time, so the challenge is to schedule the classes in a way that no student has a conflict. For example, consider the following six classes to the left.

To model this is a graph coloring problem, create a node for each course. In this case, label the courses, M, N, P, Q, R, and S. Then, for each pair of courses that have at least one student in common, add an edge between the two course nodes.
M N P Q R S Sorry, your browser does not support inline SVG.
Since Alex is in Mathematics and Nursing, we need to add an edge between nodes M and N.

Now, find a valid coloring for the graph. Each color corresponds to a different time slot, and a valid graph coloring will make sure that no two courses connected by an edge will have the same color, meaning that no two classes that have the same student will be scheduled at the same time. This example requires four colors, so therefore, four different time periods are needed to create a conflict-free schedule for the students.

Of course, if the chromatic number for the graph is higher than n, the number of different time slots available during the week, there will be no way of finding a schedule to satisfy every student.
Part 2 – Scheduling

Create a graph, and then find a good coloring for the scheduling problems.

Science CourseStudentsColor
AnthropologyJacquie, Kevin, Mike
BiologyJacquie, Lynn, Oscar
ChemistryLynn, Nell, Patricia
DynamicsKevin, Mike, Patricia
EcologyKevin, Oscar
Language CourseStudentsColor
FrenchPhil, Qi, Sky, Walt, Zazu
GermanQi, Rob, Ted, Xena, Yule
HindiRob, Uri, Walt, Yule
ItalianQi, Sky, Xena
JapanesePhil, Ted, Yule
KoreanSky, Vicki, Xena, Zazu
LatinPhil, Vicki, Zazu

For large graphs, determining the best (fewest possible colors) coloring of a graph is a very difficult problem to solve. While not guaranteed to lead to the best possible coloring, what advice might you give someone trying to find a good coloring in a graph?

[Tricky] How could you modify your graph to handle constraints like “Course A cannot be scheduled in time slot 2”? Assume you know how many time slots (number of colors) are available in the problem.

Once completed, this page to a pdf document; then hand it in through your course's Learning Management System.


 Neil Simonetti

 Back to Intro to QR Worksheets Page

 Back to Neil's Intro to QR Page