Graph Theory Graph Coloring Map Coloring: When coloring a map

Graph Theory
Graph Coloring
Map Coloring: When coloring a map, regions with a common border must be different
colors. Regions that meet at a point only can be the same color.
4-Color Thm. – Coloring a map can be done in less than or equal to 4 colors.
Goal: Color the map with as few colors as possible.
Creating a Graph from a Map:
A vertex is created for each region.
Regions with a common border are connected by an edge.
Coloring a Graph: Vertices connected by a single edge must be different colors.
Chromatic Number: Smallest number of colors needed to color a graph.
Applications of Graph Coloring:
Map Coloring,
Scheduling,
Assignment,
Conflict Resolution
Graph Theory
Graph Coloring
Planar Graph: Edges do not cross (except at a vertex).
Planar graphs can be used to represent maps.
Examples:
Planar Graph Chromatic Number: Less than or equal to 4
Complete Graph: Each vertex connected to every other vertex by an edge.
Examples:
Complete Graph Chromatic Number: Equals number of vertices
Cycle Graph:
Examples:
Cycle Graph Chromatic Number: 2 colors if # vertices is even
3 colors if # vertices is odd
Graph Theory
Graph Coloring
Graphs and Matices:
The information from a graph can be put in a matrix where the matrix values show the
number of edges.
Example:
A
C
B
D
The information from
this graph would be
represented by this
Adjacency Matrix.
A B C
D
E
F
A
0
1
0
0
0
0
B
1
0
0
1
1
0
AC
0
0
0
0
1
0
D
0
1
0
0
1
0
E
0
1
1
1
0
1
F
0
0
0
0
1
0
E
F

Squaring the Matrix: If you square this matrix, the resulting (A2) matrix shows the
number of paths of length 2 between the two vertices.
Cubing the Matrix: A3 shows the number of paths of length 3 between the vertices.
Digraphs: Digraphs are directed graphs – this means that some (or all) of the edges
are one way only. When representing a digraph with a matrix, edges are given a value
of one only if the arrow goes from that row to that column.
to
Example:
A
C
B
D
E
F

A B C
D
E
F
A
0
0
0
0
0
0
B
1
0
0
0
0
0
from C
0
0
0
0
1
0
D
0
1
0
0
0
0
E
0
1
0
1
0
0
F
0
0
0
0
1
0
Graph Theory
Graph Coloring
Graphs, Matrices and Tournaments:
Graphs and Matrices can be used to rank players in a tournament. If the players/teams
are the vertices of the graph, directed edges (arrows) are drawn from the winner to the
loser.
In the adjacency matrix, the sum of each row is the number of wins for the player.
In the square of the adjacency matrix, each entry represents the number of times that
the team (row) beat a team that beat the given team (column). These are referred to as
2nd stage wins or indirect wins. The sum of each row represents to the total number of
indirect wins.
The combination of wins (from the adjacency matrix) and indirect wins (from the square
of the adjacency matrix) can be used to rank the teams (other ranking rules would also
be possible).
Example:
In a series of Chess Club Games…
 Alexis beat Ben, Dave, Felix
 Ben beat Elena and Dave
 Clyde beat Elena and Ben
 Dave beat Clyde
 Elena beat Alexis
 Felix beat Clyde, Dave, Elena
Adjacency Matrix
Adjacency Matrix Squared
loser
winner
loser
A B C
D
E
F
A
0
0
2
2
2
0
B
1
0
1
0
0
0
0
C
1
0
0
1
1
0
0
0
D
0
1
0
0
1
0
0
0
0
E
0
1
0
1
0
1
1
1
0
F
1
1
1
0
1
0
A B C
D
E F
A
0
1
0
1
0
1
B
0
0
0
1
1
0
C
0
1
0
0
1
D
0
0
1
0
E
1
0
0
F
0
0
1
Wins
 (sum rows)
nd
2 Stage Wins (sum rows)
Total
Rank
Alexis
3
6
9
1
winner
Ben
Clyde
2 
2
2
3
4
5
4
3
Dave
1
2
3
6
Elena
1
3
4
5
Felix
3
4
7
2
Though Alexis and Felix each had 3 wins, Alexis would win the tournament since each
of the players she beat, beat two other players. These count as indirect wins for Alexis.
Graph Theory
Graph Coloring
Ben and Elena each have a total of 4. It might make sense to place Ben ahead of
Elena since he had 2 wins and Elena had 1.