GED102-1 Module 3 Topic 2 Lesson 2 Eulerian, Hamiltonian and Weighted Graphs
GED102-1 Module 3 Topic 2 Lesson 2 Eulerian, Hamiltonian and Weighted Graphs
Module 3 – Topic 2
Graph Theory
Lesson 2: Eulerian, Hamiltonian Graphs
and the Weighted Graphs
Introduction
In the case of the Konigsberg graph, all vertices are of odd degree; A
is of degree 5, B is of degree 3, C is of degree 3 and D is of degree
3. Indeed, it will be impossible to go around the area without crossing
any bridge twice. More so, it is not even possible to walk through the
area from one land area to all the other land areas without crossing a
bridge more than once.
Eulerian Graphs
Is this Eulerian?
Exercise
Which graph is Eulerian? Which graph is not Eulerian but contains an
Eulerian path?
Example
Is it possible to walk through the warehouse so that you pass through every doorway once
but not twice?
Is it possible for you to return to the starting point?
Hamiltonian Graphs
Recall:
A graph is Hamiltonian if it contains a Hamiltonian cycle.
A Hamiltonian cycle is a closed path that traverses all the
vertices of the graph, with each vertex being traversed only
once.
Hamiltonian?
Remark
The graph is of order 6 and half of this number is 3. The minimum degree of the
graph is only 2 (at vertices A and E).
By this, Dirac’s Theorem is no longer applicable and so we cannot test the
Hamiltonicity on the basis of the said theorem.
By trial and error, we can trace a Hamiltonian cycle: A-B-E-F-D-C-A. Thus,
the graph is Hamiltonian.
Exercise: Which Graph is Hamiltonian?
Application
A large law firm has offices in seven major cities. The firm has overnight document deliveries
scheduled every day between certain offices. In the graph below, an edge between vertices
indicates that there is delivery
service between the
corresponding offices.
Use Dirac’s theorem to
answer the following
question:
Using the law firm’s
existing delivery service,
is it possible to route a
document to all the offices
and return the document
to its originating office
without sending it through the same office twice?
Weighted Graphs : Introduction
In many applications, you can use the edges or the vertices of a graph to
represent real-life metrics. In navigation, for example, the vertices may
mean destinations while the edges may mean the distance or cost of
traveling from one point to another. In communication network, the edges
may indicate loading capacity. Informally, any value that is assigned to
the edges is called weight. In such cases, the question of whether the
graph is Eulerian or Hamiltonian should no longer be constrained to
utilizing the vertices or edges of the graph, but to make the process more
efficient by optimizing the weights in the graph.
Assigning weights to the edges of a graph is the labeling aspect of a
graph. Graph labeling has become one rich area of graph theory in terms
of research opportunities because of the unlimited areas where this
concept can be applied.
Learning Outcomes
Weighted K4
Illustration
One problem that can be addressed with A 8 B
weighted graphs is to traverse all the vertices
through the least total weights possible. 2
D 5 C
Weighted K4
The Greedy Algorithm
A 8 B A 8 B A 8 B A 8 B
2 2 2 2
6 3 6 3 6 3 6 3
4 4 4 4
D 5 C D 5 C D 5 C D 5 C
2 + 3 + 4 + 6 = 15
Example
Egay is tasked to distribute examination papers during the quarterly
examination of the mathematics department. From the office, he has
to bring the test papers and answer sheets to four examination areas
in the campus: North Building, South Building, West Building, and
Southwest Building. The table below summarizes the roaming time
from one area to other areas. Determine the roaming route that gives
the least time for the distribution of the examination materials.
Example
Example
Possible routes:
Office-South-Southwest-West-North-Office
Office-North-West-Southwest-South-Office