Professional Documents
Culture Documents
Objectives
(i) Define and understand some basic concepts of graphs.
(ii) Define an Eulerian circuit and Eulerian graph.
(iii) Identify an Eulerian graph and determine its Eulerian circuit.
(iv) Define Hamiltonian circuit and Hamiltonian graph.
(v) Identify an Hamiltonian graph and determine its Hamiltonian circuit.
(v) Apply Dirac’s Theorem
(vi) Apply the concept of graph coloring in a given situational problems.
For example, the diagram below could represent friends that are connected
on Facebook. Each dot represents a person, and a line segment connecting
two dots means that those two people are friends on Facebook.
John
Paul Matthew
Ezekiel
1
Mathematics in the Modern World
CMU STUDENTS
NAMES Justine Darwin Darlene Develin Leocint
Justine - X X X X
Darwin X -
Darlene X - X X
Develin X X -
Leocint X X X -
a. Draw a graph that represents the above information where each vertex
represents the students and an edge connects two vertices if the
corresponding students do research together.
b. Use your graph to answer the following questions: Which student
involved in most of the research groups with others? Which student has
only one study group? How many study groups does Leocint have in
common with the others?
Solution: For a. we have the following graph below:
Justine
Leocint
Darwin
Develin
Darlyn
Definition 6.1.1.3. If two or more edges connect the same vertices, they are
called multiple edges. If an edge begins and ends at the same vertex, such
edge is called loop. A graph which contains multiple edges, loops, or both
multiple edges and loops, it is called a multigraph.
Example 6.1.1.4. Below are some examples of a multigraph.
The graph (on the left) in Figure 6.3 is a disconnected graph while the
graph (on the right) is a connected graph.
D E
F G H
The sequence of vertices A-B-C along with the edges connecting them is a
path. The path A-D-F-G-E-B-A is a circuit since it begins and ends at the
same vertex.
Definition 6.1.2.5. A circuit that uses every edge in a connected graph, but
never uses the same edge twice, is called an Eulerian circuit. A connected
graph containing an Eulerian circuit is an Eulerian graph.
Note: The definition of an Eulerian circuit implies that we can actually
repeat vertices as long as each edge in the path is distinct. Eulerian circuit
is not unique.
Example 6.1.2.6. The path B-D-F-G-H-E-C-B-A-D-G-E-B in Figure 6.4 is
an Eulerian circuit.
Definition 6.1.2.7. The number of edges that meet at a vertex is called the
degree of a vertex, denoted by deg(v).
Example 6.1.2.8. The following are the degree of each vertices in the graph
shown in Figure 6.4:
E F G
Solution: The graph in Figure 6.5 is not an Eulerian graph since the vertices
B,C,E,F,G each have a degree 3. Consequently, the graph do not have an
Eulerian circuit.
Example 6.1.2.11 (Application of Eulerian Circuits). The subway map
below shows the tracks that subway trains traverse as well as the junctions
where one can switch trains. Suppose an inspector needs to travel the full
length of each track. Is it possible to plan a journey that traverses the
tracks and returns to the starting point without traveling through any
protion of a track more than once?
Solution: We will first represent the above image into a graph, specifically,
a multigraph and denote the following vertices: Northpark (NP), Riverdate
(R), Park Center (PC), Museums (M), Civic Center (CC), Train Station (TS),
Shopping Town (ST), Lakeside (L), South End (SE), Main Plaza (MP).
NP
TS
PC R
ST M
CC MP
SE
In order to find a travel route that does not traverse the same track twice,
we need to find an Euler circuit in the graph. However, the vertex
representing the Civic Center (CC) has degree 3. By Euler’s Graph
Theorem, the graph cannot be Eulerian, hence, no Eulerian circuit can be
found. Thus, it is impossible for the inspector not to travel at least one
track twice.
If someones priority is to visit each city, he/she can travel along the route
Alameda-Burley-Caldwell-Dover-Evanston-Fairmont-Grangeville-Alameda.
This path visits each vertex once and returns to the starting vertex without
visiting any vertex twice. This type of path is called a Hamiltonian circuit.
Phoenix Atlanta
Figure 6.6:
In case of distances between cities, we can label each edge with number of
miles between the corresponding cities, illustrated below:
Cagayan De Oro
99 km
Malaybalay
114 km 44 km
Valencia
93 km
Wao 147 km
132 km Davao
115 km
Kidapawan
Figure 6.7:
Note: The length of an edge does not necessarily correlate to its weight.
For each Hamiltonian circuit in the weighted graph, the sum of the weights
along the edges traversed gives the total distance traveled along that route.
We can compare different routes and find the one that requires the shortest
total distance.
Example 6.2.2.2. A tourist visiting San Francisco is staying at a hotel
near Moscone Center. The tourist would like to visit five locations by bus
tomorrow and then return to the hotel. The number of minutes spent
traveling by bus between locations is given in the table below. Find two
different routes for the tourist to follow and compare the total travel times.
The Tourist
Moscone Civic Union Embark Farmers Coit
Center Center Square Plaza Wharf Tower
Moscone - 18 6 22 N/A N/A
Center
Civic 18 - 14 N/A 33 N/A
Center
Union 6 14 - 24 28 26
Square
Embark 22 N/A 24 - N/A 18
Plaza
Farmers N/A 33 28 N/A - 14
Wharf
Coit N/A N/A 36 18 14 -
Tower
Solution: We draw a graph in which the vertices represent locations and the
edges indicate available bus routes between locations. Each edge is given a
weight corresponding to the number of minutes for the bus ride.
Civic Center
18 14
6
Moscone Center Union Sqare
33
22
24
36
18
Coit Tower Embark Plaza
14 28
Farmers Wharf
A route that visits each location and returns to the Moscone Center
corresponds to a Hamiltonian circuit. Using the graph in Figure 6.8, we find
that one of the route is
Moscone Center - Civic Center - Union Square - Farmers Wharf - Coit
Tower - Embark Plaza - Moscone Tower,
with a total weight of 18 + 14 + 28 + 14 + 18 + 22 = 114. Another route is
Moscone Center - Union Square - Embark Plaza - Coit Tower - Farmers
Wharf - Civic Center - Moscone Tower,
with a total weight of 6 + 24 + 18 + 14 + 33 + 18 = 113. The travel time is
one minute less for the second route.
D
C
G F
Now can we give each vertex of the graph a color such that no two vertices
connected by an edge share the same color? How many different colors will
be required? If this can be accomplished with using four colors, for instance,
we will say that he graph is 4-colorable. The graph in Figure 6.9 is a
3-colorable,i.e., only three colors are necessary,with its corresponding map
coloring, which is show below:
D
C
G F
Solution: We first label our country by letters given below. Then, we draw
a vertex in each letters and then connect two vertices with an edge if the
corresponding countries are neighbors.
D
I
A
H
E J
F
G
Now try to color the vertices of the resulting graph so that no edge connects
two vertices of the same color. Obviously we need at least two colors, so one
way is to simply pick a starting vertex, give it a color, and then assign colors
to the connected vertices one by one. Reuse the same colors, and use a new
color only when there is no other option. Below is one such coloring that can
be made on the graph and its corresponding map.
D
I
A
H
E J
F
G
Solution: There are 2 ways in the graph at which three edges form a triangle,
one of it is the following;
Since a triangle is a circuit with an odd number of vertices, the graph is not
2-colorable. Rather, the graph is 3-colorable, as shown below:
Film A Film C
Film E Film D
This means that four different time slots will be required to show the fims,
and the earliest that the festival can end is 8:00 PM. A schedule can be set
using he coloring in the graph. From 12 to 2, the films labeled blue, Film A
and Film B, can be shown in two different rooms. The remaining films are
represented by unique colors and so will require their own viewing times.
Film C can be shown from 2 to 4, Film D from 4 to 6, and E from 6 to 8.
Practice Exercise 6.4.0.3. Use Dirac’s Theorem to verify that the graph
is Hamiltonian. Then find a Hamiltonian Circuit.