MMW Module 5 Mathematics of Graph
MMW Module 5 Mathematics of Graph
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
Content
Title Page Time Allotment
Mathematics of Graph
_________________________________________
Name and Signature
2
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
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.
• Social Network
• Brain Activity
3
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
• Biochemistry
• Stock Market
4
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
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.)
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
5
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
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.
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:
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.
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
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
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.
9
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
• 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.
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
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
11
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
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
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.
13
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
1) We can use two or more color, but in our example we used two.
14
PHILIPPINE STATE COLLEGE OF AERONAUTICS
INSTITUTE OF LIBERAL ARTS AND SCIENCES
Piccio Garden, Villamor, Pasay City
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
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