100% found this document useful (1 vote)
1K views20 pages

Module 3 Topic 3 Lesson 3 Graph Coloring

Graph coloring involves assigning colors to vertices of a graph such that no two adjacent vertices have the same color. The minimum number of colors needed is the chromatic number. Graph coloring has applications in scheduling exams without conflicts and determining the minimum number of traffic light stages to avoid collisions. It can be used to model problems from map coloring to frequency allocation in networks.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (1 vote)
1K views20 pages

Module 3 Topic 3 Lesson 3 Graph Coloring

Graph coloring involves assigning colors to vertices of a graph such that no two adjacent vertices have the same color. The minimum number of colors needed is the chromatic number. Graph coloring has applications in scheduling exams without conflicts and determining the minimum number of traffic light stages to avoid collisions. It can be used to model problems from map coloring to frequency allocation in networks.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 20

Mathematics in the Modern World

Module 3 – Topic 3
Graph Theory
Lesson 3: Graph Coloring
Introduction
Graph coloring is another aspect of graph labeling. Here, the main
objective is to color the vertices of the graph with the least possible
number of colors such that no two adjacent vertices share the same
color. Although this may appear just yet another tricky mathematical
problem, graph coloring has found its way into countless applications
of practical values.
The accelerated interest in graph theory can be attributed to graph
coloring. In fact, it took almost a hundred years for a classical
problem to be settled—the Four Color Theorem. It states that if a
graph can be drawn such that its edges do not intersect, then it takes
no more than four colors for its vertices to be colored (again, no two
adjacent vertices share the same color).
Learning Outcomes

At the end of the section, students should be able to:


1. define graph coloring;
2. illustrate proper coloring of a graph;
3. specify the conditions and procedures of implementing
proper coloring of graphs; and
4. use the concept of graph coloring to solve real-life
problems.
Preliminary: Planar Graphs

Graph coloring traces direct links to


planar graphs.

A graph is said to be planar if it can


be drawn such that no edge intersect
each other (except at the vertices).

Planarity of graphs was also


conceived as a puzzle-type problem.
Preliminary: Planar Graphs

Three utility companies each need to run pipes to three houses. Can
they do so without crossing over each other’s pipes at any point? The
puzzle is illustrated in the figure below. Go ahead and try to draw
pipes connecting each utility company to each house without letting
any pipes cross over each other.
Preliminary: Planar Graphs
When modelled as a graph, we can configure the following:

The graph on the right is called the Utility Graph, usually


denoted as K3,3.
Planar Graphs

The Utility Graph is NOT PLANAR…………………and so is the complete graph K5.


Euler’s Formula

In a connected planar graph drawn with no intersecting


edges, let 𝑣 be the number of vertices, 𝑒 the number of
edges, and 𝑓 the number of faces. Then
𝑣+𝑓 =𝑒+2
Graph Coloring
Graph coloring is the process of assigning colors to
the vertices of a graph. The coloring is said to be
proper if no two adjacent vertices are assigned the
same color. The minimum number of colors for a
proper coloring to be possible is called the
chromatic number of the graph G, denoted by χ(G) .
If the chromatic number of a graph is k, then the
graph is said to be k-colorable. Note that if a graph
is k-colorable, then it can also be colored by more
than k colors.
Example
Let us try to exhibit a (proper) coloring of A
the graph shown on the right. First, color
vertex A with red. This forces a different C
color to the vertices B, C, E, and F since B
these 4 vertices are all adjacent to A.
D

E F
Example
Let us try to exhibit a (proper) coloring of A
the graph shown on the right. First, color
vertex A with red. This forces a different C
color to the vertices B, C, E, and F since B
these 4 vertices are all adjacent to A.
D

E F
Example
Let us try to exhibit a (proper) coloring of the graph shown
on the right. First, color vertex A with red. This forces a A
different color to the vertices B, C, E, and F since these 4
vertices are all adjacent to A. C
B
Let us assign blue to B.
This also permits C to be assigned blue also (why?). D
A new color, say green, has to be assigned to E since it is
adjacent to C. Similarly, F may be assigned a green color.
Finally, since D is not adjacent to A, this vertex can also
use red. E F
Thus, we need only 3 colors to exhibit a coloring of the
graph.
This shows that 𝜒(G) = 3, or that the graph is 3-colorable.
Remarks

1. A graph is 2-colorable if and only if it does not


contain a cycle that has odd number of vertices.
2. The chromatic number of a planar graph is at
most 4. Otherwise, more colors are needed to
implement proper coloring.
Application: Scheduling
During the final examination, each
subject is allotted 2 hours for students
to finish. The available slots are 8-10
a.m., 10 a.m.12 noon, 1-3 p.m., and 3-5
p.m. The table below summarizes the
possible conflicts for students to take
simultaneous examinations. A mark “X”
indicates that the subjects have common
students.
Can all final examinations be
administered in one day?
Which examination can be taken by
students at the same time slot?
Application: Scheduling

M15 M21 M15 M21

M30 M22 M30 M22

M24 M23 M24 M23


Application: Scheduling
The result of the graph coloring indicates that there should be four
time slots for the 6 subjects. A possible schedule would then be:
8:00 AM – 10 AM ---------Math 15
10:00 AM – 12:00 PM ------Math 30 and Math 21
1:00 PM – 3:00 PM --------Math 23
3:00 PM – 5:00 PM --------Math 24 and Math 22
M15 M21

Thus, all examinations can be administered


in just one day. M30 M22

M24 M23
Application: Traffic Light

Graphs can be used to


represent traffic patterns
using the traffic paths as
vertices of the graph. Two
vertices are adjacent if a
collision is possible when the
corresponding paths are open.
By coloring the resulting
graph using the least possible
number of colors, determine
the least number of turns that
the traffic light can allow to
avoid collision.
Application: Traffic Light

A B

F C

E D
Application: Traffic Light

A B

F C

E D
Application: Traffic Light

The colors indicate that the traffic light needs to have 4


stages.
Stage 1 (Red): Paths A and B are open.
Stage 2 (Green): Path C is open.
A B
Stage 3 (Blue): Paths D and F are open.
Stage 4 (Yellow): Path E is open.
F C

E D

You might also like