Mini Lesson - Avon Community School Corporation

advertisement
1
Discrete Math A
Mini Lesson – Graph Coloring Techniques
History:
In the mid 1800’s, Francis Guthrie was trying to make a map of the
counties of England. He wanted to color each adjacent county a different
color and wanted to use as few colors as possible. After trial-and-error,
he discovered that he could color the map in 4 colors. (The map at the
right uses 5 colors). Guthrie conjectured that any planer map could be
colored using only four colors.
For almost 100 years, mathematicians attempted to prove that any planer
map could be colored using only four colors.
In 1976, the Four-color Theorem was proven by Kenneth Appel and
Wolfgang Haken. However, many refused to accept the theorem as fact
because Appel and Haken used a computer to help them with the proof.
The Four-color Theorem is noteworthy because it was the first significant computer-aided proof.
Graph coloring is still study today as a special for of graph labeling.
Vertex Coloring
Vertex coloring is a type of graph labeling where no two adjacent (connected) vertices are the same
color.
Example: Color the vertices of the following graphs so that no two adjacent vertices are the same color.
2
Chromatic Coloring
A graph that can be colored using at most k-colors is called a k-coloring.
A graph’s chromatic number is the smallest number k for which a graph can be k-colored.
Example 1:
Find a 3-coloring.
Find a 2-coloring.
Find a 1-coloring.
What is the chromatic number of this graph? _____
Example 2:
Find a 4-coloring
Find a 3 coloring.
Find a 2-coloring.
What is the chromatic number of this graph? ______
Example 3: COMPLETE GRAPHS (From Ch 6 – Hamilton Circuits)
Complete Graphs – Since in a complete graph each vertex is connected to every other vertex,
the chromatic number of any KN = N.
What is the Chromatic number of K4?
What is the chromatic number of K24?
Example 4: CIRCUITS
Circuits: The graph consisting of a single circuit with n vertices is denoted by CN.
C4
What is the chromatic number? _____
C5
What is the chromatic number? _____
3
Circuits (continued)
If N is even – the chromatic number = 2
If N is odd – the chromatic number = 3
Greedy Algorithm for Graph Coloring
Basic Strategy:
 Make a list of your colors.
 Make a list of your vertices.
 Color the first vertex with the first color.
 Color the second vertex with the first color if possible. If you can’t, use the second
color.
 For each “next” vertex start at the top of your list of colors.
 Starting with the vertex of highest degree can help sometimes.
Sudoku
Sudoku is an application of graph coloring
Sudoku rules:
Fill in each box with the digits 1 to 9. Each row, column, and 3x3 box
should contain each digit from 1 to 9 exactly once.
3 7
4
8
9
2
The computer programs used to design these puzzles see this as graph
coloring problem with 9 colors and 81 vertices. Each box is a vertex
connected to all the other vertices in its row, column, and 3x3 box. It
would be very difficult to draw.
9
6 3
4
6
Like these? www.conceptispuzzles.com has new puzzles each week!
6
5
8 2
5 7
3
3
7
1 9
9
8
1
8 4
6
1
2 1
3
4
4
7
9 5
4
Real Life Situations—Graph Coloring

Scheduling problems that require some tasks that have shared resources: interviews, air traffic
control, etc.

Computer Programming: Register Allocation for compiler programs

Bandwidth Allocation to radio stations
Example: The Federal Communications Commission (FCC) monitors radio stations to make sure that
their signals do not interfere with each other. They prevent interference by assigning appropriate
frequencies to each station. How many frequencies are needed for the six stations located at the
distances shown in the table, if two stations cannot use the same channel when they are within 150
miles of each other?
WQAA WQBB WQCC WQDD WQEE WQFF
WQAA
25
202
77
375
106
Before you start, think:
WQBB
25
175
51
148
222
What will each vertex represent? What will each
WQCC
202
175
111
365
411
edge represent? What should your coloring goal
WQDD
77
51
111
78
297
be?
WQEE
375
148
365
78
227
WQFF
106
222
411
297
227
-
Map Coloring Rules
When coloring a PLANER MAP (not vertices with edges), regions who share a common edge cannot be
the same color. If the graph touches at a corner (1 point) only, the regions may share a color.
Download