You are on page 1of 16

PHILIPPINE STATE COLLEGE OF AERONAUTICS

INSTITUTE OF LIBERAL ARTS AND SCIENCES


Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021

Learning Module 5
The Mathematics of Graphs

Service.math.duke.edu

1
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
Srmist.edu.in

Course Learning Outcome Module Learning Outcome Topic Learning Outcome


CLO 4: Use variety of MLO 2: Advocate the use of TLO 4. Use variety of statistical
statistical tools to process statistical data n making important tools to process and manage
and manage numerical decision numerical data and correct way of
data; interpreting the data

CLO 5: Use mathematics in


other area such as finance
and business, researches
and recreation;

CLO 6: Appreciate the


nature and uses of
mathematics in everyday
life.

Content
Title Page Time Allotment
Mathematics of Graph

Graphs and Euler Path and


Circuit
• Hamiltonian Path and Circuit
• Weighted Graph
• Euler Formula
• Graph Coloring
Honesty Clause
“As members of the Academic Community, students are expected to recognize and uphold standards of
intellectual and academic integrity. Philippine State College of Aeronautics assumes, as a basic and minimum
standard of conduct in academic matters, that students should be honest and that they submit for credit only
the products of their own efforts.”

_________________________________________
Name and Signature

2
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021

Mathematics of Graphs
In this lesson, we will introduce the graph theory in the field of mathematics that approximately 300 years ago to
solve problems such as finding the shortest path between two location. In the modern world, planning efficient routes is
essential for business and industry, with applications as varied as product distribution, laying new fiber optic lines for
broadband internet, and suggesting new friends within social network websites like Facebook as well as for chemistry,
operational research, social sciences and computer science.

Unlike in algebra, calculus, and statistics, the graph theoretic context is much simplified consisting of points and
lines and has no regards to coordinates and distances and the focus is the way points are connected.

Here are some of the uses of graphs:

• Social Network

• Brain Activity

3
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
• Electronics

• Biochemistry

• Stock Market

4
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021

Historical Background: The Konigsberg Bridge Problem


One of the first mathematicians to think the graphs and networks was Leonhard Euler. Euler was
intrigued by an old problem regarding the town of Königsberg near the Baltic Sea.

The river Pregel divides Königsberg into four separate parts, which are connected by seven bridges. Is it
possible to walk around the city crossing all of the bridges exactly once – but not more than once? (You can
start and finish anywhere, not necessarily in the same place.)

Graph and Euler Circuit

Definition:
Graphs
A graph is a connected if there is a path connecting all the vertices
Two vertices are adjacent if there is an edge joining them. If every pair
of vertices of a graph is adjacent, the graph is complete. A complete
graph with n vertices is denoted by Kn
The degree of a vertex is the number of edges attached to it.
Complete Graph

Euler Circuit
A path is an alternating sequence of vertices and edges. It can be seen
as a trip from one vertex to another using the edges of the graph.

If path begins and ends with the same vertex, it is closed path or
circuit/cycle

A circuit that uses every edges, but never uses the same edge twice is
called an Euler circuit

The number of edges that meet at vertex is called the degree of


vertex.

5
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
E.g.
1. If the graph is a Eulerian Circuit, show the course that you take and determine the number of edges,
vertices and degree of vertex.

Assuming that we will start from point A for us to prove that the graph is a Eulerian Circuit.

a) Route: A-B-C-E-H-G-F-D-B-E-G-A
b) Edges: 12
c) Vertices: 8
d) Degree of vertex: 2
Take note that there will another possible answer can be generate if we start from different starting point.

Eulerian Graph Theorem


• A connected graph is Eulerian if and only if each vertex of the graph is of even degree.
• Note that Eulerian Graph Theorem only guarantees that if the degree of all the vertices in a graph are
even an Euler circuits exists, but does not tell us how to find one.

Is this graph Eulerian?

For us to determine if the figure is a Eulerian Circuit or Eulerian Path. Let’s try to transform the figure in
to simple graph as shown below:

Then count each degree of vertices to apply the theorem:


Degree of Vertices:
A. 3 E. 3
B. 5 F. 5
C. 3 G. 3
D. 4
Take note that only the vertex of D has an even number for degree of vertex therefore we can conclude that
the graph is not a Eulirean.
6
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
Eulerian Path
Determine whether the following graph is eulerian. If it is, find an Eulerian circuit. If it is not, can you
find an Euler Path?

Using the Eulerian Graph Theorem, this graph is not Eulerian since vertices A and J both have odd
degrees. But the path A-B-C-D-E-F-G-H-I-J-D-G-A-L-K-J use every edge without duplication; hence the graph
contains an Euler path. Furthermore, it can be noted that the path starts at A but ends at J, the vertices having
odd degrees.

To generalize, we can say that:


• An Euler path is a path that uses every edge of the graph exactly once.
• An Euler circuit is circuit that uses every edge of a graph exactly once.
• An Euler path starts and ends at different vertices
• An Euler circuit starts and ends at the same vertex.

Exercise 1.
a) Determine whether the graph below is Eulerian. If it is, find the Eulerian Circuit. If not, expalin why.

b) Below is the map of all trails in a national park. A biker would like to traverse all the trails exactly once.
• Is it possible for the biker to plan trip that traverses all the trails exactly once?
• Is it possible for him to traverse all the trails and return to the starting point without repeating any trail
in the trip?

7
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
Hamiltonian Path and Circuit

A Hamiltonian path and circuit is named after by Sir William Rowan


Hamilton who is famous for his contribution to mathematics and
metaphysics such as quaternion algebra and optics.

Definition:
A Hamiltonian path is a path that visits each vertex of the graph exactly
once.
A Hamiltonian circuit is a path that uses each vertex of a graph exactly
once and returns to the starting vertex. A graph that contains a
Hamiltonian circuit is called Hamiltonian.

Eulerian vs Hamiltonian

❑ In Euler circuit, we looked at closed paths that use every edge exactly once, possibly visiting a vertex
more than one.
❑ On the contrary, in Hamiltonian circuits, we loo at the paths that visits each vertex exactly once,
possibly not passing of the edges.
❑ But unlike the Euler circuit, where the Eulerian Graph Theorem is used to determine whether it
contains an Euler circuit or not, we do not have a straightforward criterion to determine whether or
not a Hamiltonian circuits exists in a graph.

Dirac’s Theorem
Consider a connected graph with at least three vertices and no multiple edges. Let n be the number of
vertices in the graph. If every vertex has degree of at least n/2, then the graph must be Hamiltonian

Note: If the graph does not meet the requirements of the Dirac’s Theorem, it still might be Hamiltonian

8
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
Weight Graph
A weight graph is a graph which each edge is associated with value, called weight and usually has no
negative values.

E.g.
1. The travelling salesman problem (TSP) asks the following questions: “Given a list of cities and the
distances between each pair cities. What is the shortest possible route that visits each city exactly once
and returns to the origin city?

The travelling salesman problem consists of salesman and set of cities. The salesman has to visit each
one of the cities starting from a certain one (e.g. the hometown) and returning to the same city. The
challenge of the problem is that the travelling salesman wants to minimize the total length of the trip.

The table below lists down the distances (miles) between cities having direct routes as well as the
corresponding distances between them.

Manila Cebu Cagayan de Oro Davao Palawan Ozamis

Manila - 355 485 589 358 477

Cebu 355 - 137 240 354 148

Cagayan de Oro 485 137 - 118 414 64

Davao 589 240 118 - 495 133

Palawan 358 354 414 495 - 363

Ozamis 477 148 64 133 363 -

9
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
As shown in the table, we can transform this to a graph as shown below along with the weight of the
edges:

• One Hamiltonian circuit is Ozamis – Cagayan de Oro – Cebu – Palawan – Manila – Davao then back to
Ozamiz. The total distance travelled is 64+137+354+589+133+589+133=1635 miles.

• Another node route is Ozamis – Davao – Cagayan de Oro – Palawan – Cebu – Manila then back to
Ozamis. This circuit has a total distance of 64+133+118+414+354+355+477=1851 miles.

Obviously, the first node route is shorter than the second.

Greedy Algorithm
Another way of finding the shortest route is using the greedy algorithm. It is method of finding a
Hamiltonian circuit in a complete weight graph is given by the following greedy algorithm.

1. Choose a vertex to start at then travel along the connected edge that has the smallest weight.
2. After arriving at the next vertex, travel along the edge of smallest weight that connects not yet visited.
Continue this process until you have visited vertices
3. Return to the starting vertex
4.
E.g.
Aaron, Belle, Carol, Donna, Eric and Fe are best friends. The figure below shows the distances (km) from a
friend’s place to another, If Aaron want to visit each of his friend’s houses, exactly once, what is the shorter
route that he must take using greedy algorithm?

10
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
For us to answer to determine the shortest route using the greedy algorithm, we will start from Aaron location
since he will be the one to visit his friends and we will take the shortest route as he passing through each
location.

Greedy Algorithm: 1+2+3+9+6+12 = 33

Exercise 2:

1. A tourist representative problem has the following questions: “Given a list of cities and the
distances between each pair countries.
a. What is the shortest possible route that visits each country exactly once and returns to
the origin country?
b. What is the possible route if the Greedy Algorithm is used?

The table below lists down the distances (kilometers) between countries having direct routes as
well as the corresponding distances between them. Show your graph and solutions.

Los
Manila Hongkong Sydney London New York Angeles
California
Manila - 1116 6260 10760 11740 13700
Hongkong 1116 - 7400 9646 12960 11656
Sydney 6260 7400 - 17020 16020 12078
London 10760 9646 17020 - 5585 8760
New York 11740 12960 16020 5585 - 3944

Los Angeles California 13700 11656 12078 8760 3944 -

11
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
Planar Graph
A planar graph is one in which the edges have no intersection or common points except at the edges. (It should
be noted that the edges of a graph need not be straight lines.) Thus a nonplanar graph can be transformed into an
equivalent, or isomorphic, planar graph. Planar graphs have proved useful in the design of electrical networks.

Platonic Solids
Here are some examples of planar solids.

Euler’s Formula
In connected planar graph drawn with no intersecting edges, let v be the number of vertices, e the number for
edges, and f the number of faces. The v + f = e + 2

12
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
e.g
Platonic Solids

Graph Coloring
There is a connections between the map coloring and graph theory. Maps can be modeled by graphs
using the countries as the vertices and two vertices (coutries) are adjacent if they share a common boundary.
In graph theory, each vertex of graph will be assigned one color in such a way that no two adjacent vertices
have the same color. The interesting idea here is to determine the minimum number of color each vertex of a
graph with no two adjacent vertices have the same color.

Four Color Theorem


The minimum number of colors needed to color a graph so that no edge connects vertices of the same color is
called chromatic number.

Four-Color Theorem: The chromatic number of planar graphs is utmost 4

13
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
e.g.

1) We can use two or more color, but in our example we used two.

2) Using four-color theorem.

14
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021

Exercise 3:

1. Use the four-color theorem to show that teach country has no same color adjacent to them.

15
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City

Institute of Liberal Arts and Sciences


Mathematics Department
First Semester-A.Y 2020–2021
References

https://www.coursehero.com/file/44136237/Module-6-Mathematics-of-Graphs-1pptx/
https://www.coursehero.com/file/51761461/Mathematics-in-Modern-World-1ppt-GRAPH-THEORYpdf/
https://courses.lumenlearning.com/math4libarts/chapter/graph-theory/
https://mathigon.org/course/graph-theory/introduction
https://www.britannica.com/topic/number-game/Graphs-and-networks
https://www.mathsisfun.com/geometry/eulers-formula.html
https://www.mathsisfun.com/activity/coloring.html

Images
researchgate.net
sematicscholar.org
jonathankinlay.com

16

You might also like