Upload
terence-weaver
View
215
Download
2
Embed Size (px)
Citation preview
1
Graph Coloring
2
Definitions
• A coloring of a graph G assigns colors to the vertices of G so that adjacent vertices are given different colors.
• The minimal number of colors required to color a graph is called the chromatic number and denoted .( )G
3
The chromatic number of this graph is 3.
To verify that the chromatic number of a graph is k, we must show that the graph cannot be (k-1) colored.
3 is the minimum number of colors required to color this graph
Try coloring with 2 colors
It doesn’t work!
X
X
4
Coloring a Wheel
( ) 3G
A graph of this form is called a wheel.
In wheels with an odd number of spokes, it’s not possible to alternate colors on the outside, so there must be 3 colors on the outside and then an additional color for the center vertex, thus the chromatic number is 4.
In wheels with an even number of “spokes”, you can alternate colors on the outside, then add an additional color for the center vertex. As is seen in this wheel with 6 spokes, a wheel with an even number of spokes can be 3-colored.
( ) 4G
5
Example 1•State legislature many committees
•Meet one hour each week
•Schedule meetings that minimize number of hours
•Two committees cannot meet at the same time if they have overlapping membership
•10 committees
Vertices = CommitteesEdges = Overlap in membershipColors = Different meeting times
6
To model this problem, we can use a vertex for each of the committees and an edge joining 2 vertices if they represent committees with overlapping membership. Then we can color the graph with each color representing a different meeting time.
Solution to Example 1
7
The chromatic number of this graph is 4, thus 4 meeting times will suffice to schedule committee meetings
without conflict.
We can check this by trying to color the graph with n-1 colors, 3 colors, and it will not work.
8
If we consider this part of the graph as a wheel with 6 spokes, we know it must be 3-
colored.
Thus, these two vertices can’t be red or blue, but they also cannot be the same color as each other. The final vertex then can be red or blue.
9
Chromatic Polynomials
The chromatic polynomial of a graph G gives a formula for the number of ways to properly
color G with k colors.
What is the chromatic polynomial of a complete graph on five vertices?
( )kP G
5k
Example
10
Solution
In a complete graph, each vertex must be a different color. Thus
since there are k possible choices for the first vertex to be colored; then that color cannot be used again, and so the second vertex has k-1 choices, and so on.
5( ) ( 1)( 2)( 3)( 4)kP k k k k k k
k
1k
2k
3k 4k
11
Deletion Contraction Method
( ) ( ) ( \ )k k kP G P G e P G e
=
Delete an edge Combine
-
2k k-
12
Deletion Contraction Cont.
Example:
Use deletion contraction method to find the chromatic polynomial of the following graph.
13
=
-(
=
=
- -(
-
-
-- -( -4 3 3 2 3 2 2
3
( ) ( ( ))
( 1)
k k k k k k k k
k k
- )
)-( ))
14
Exercise Set upA set of solar experiments is to be made at observatories. Each experiment begins on a given day of the year and ends on a given day (each experiment is repeated for several years). An observatory can perform only one experiment at a time.
The problem is, What is the minimum number of observatories required to perform a given set of experiments annually? Model this scheduling problem as a graph-coloring problem
15
Problem• Vertices = Experiment
• Edges = Overlapping time interval
• Colors = Observatories needed
Experiment A Sept. 2 to Feb. 3
Experiment B Oct. 15 to April 10
Experiment C Nov 20 to Feb 17
Experiment D Jan. 23 to May 30
Experiment E April 4 to July 28
Experiment F April 30 to July 28
Experiment G June 24 to Sept. 30
16
Solution
A
B
C
D
E
F
G
The chromatic number is 4, so there are 4 observatories needed.