Document 7253350

Download Report

Transcript Document 7253350

Applied Combinatorics, 4th ed.
Alan Tucker
Section 2.3
Graph Coloring
Prepared by Sarah Walker and Steve Nerland
5/22/2016
Tucker, Sec. 2.3
1
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 ) .
5/22/2016
Tucker, Sec. 2.3
2
The chromatic number of this graph is 3.
X
It doesn’t work!
X
3 is the minimum number of colors required to color this graph
To verify that the chromatic number of a graph is k, we must show
that the graph cannot be (k-1) colored.
Try coloring with 2 colors
5/22/2016
Tucker, Sec. 2.3
3
Coloring a Wheel
A graph of this form is called a wheel.
 (G )  3
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.
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.
(G )  4
5/22/2016
Tucker, Sec. 2.3
4
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 = Committees
Edges = Overlap in membership
Colors = Different meeting times
5/22/2016
Tucker, Sec. 2.3
5
Solution to Example 1
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.
5/22/2016
Tucker, Sec. 2.3
6
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.
5/22/2016
Tucker, Sec. 2.3
7
If we consider this part of the graph as a
wheel with 6 spokes, we know it must be 3colored.
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.
5/22/2016
Tucker, Sec. 2.3
8
Chromatic Polynomials
The chromatic polynomial Pk (G )of a graph G
gives a formula for the number of ways to properly
color G with k colors.
Example
What is the chromatic
polynomial of a complete
graph k5 on five vertices?
5/22/2016
Tucker, Sec. 2.3
9
Solution
In a complete graph, each vertex must be a different color. Thus
Pk (k5 )  k (k  1)(k  2)(k  3)(k  4) 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.
k 1
k
k 4
5/22/2016
Tucker, Sec. 2.3
k 2
k 3
10
Deletion Contraction Method
Pk (G)  Pk (G  e)  Pk (G \ e)
-
=
Delete an edge
k
5/22/2016
2
Tucker, Sec. 2.3
Combine
-
k
11
Deletion Contraction Cont.
Example:
Use deletion contraction method to find the chromatic
polynomial of the following graph.
5/22/2016
Tucker, Sec. 2.3
12
-
=
-
=
=
-
-(
-(
-
)
-
- -( - ))
)-(
k  k  (k  k )  (k  k  (k  k ))
4
5/22/2016
3
3
2
3
 k (k  1)
Tucker, Sec. 2.3
2
2
3
13
Exercise Set up
A 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 graphcoloring problem
5/22/2016
Tucker, Sec. 2.3
14
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
5/22/2016
Tucker, Sec. 2.3
15
Solution
B
E
D
A
C
G
F
The chromatic number is 4, so there are 4
observatories needed.
5/22/2016
Tucker, Sec. 2.3
16