Professional Documents
Culture Documents
Unit 11 - Mathematics of Graph (JCSercenia)
Unit 11 - Mathematics of Graph (JCSercenia)
Overview
The origin of graphs was first introduced in the 18th century by Swiss mathematician Leonhard Euler. His
attempts & eventual solution to the famous Königsberg bridge problem quoted as the origin and evolution of graph theory.
From there, graph theory has developed into one of the richest branches of mathematics in terms of application and
theory. Graph theory is a branch of mathematics concerned with networks of points connected by lines. It is usually the
study of the relationships and it focuses on the way points are connected. Unlike other “graph” that you have encountered
in algebra or calculus, “graph” in graph theory concept is much simplified as consisting of points, lines, and has no regard
to coordinates and distances.
This unit provides you basic concept and application of the graph theory. Many practical problems can be easily
represented in graphs. This also gives you essential knowledge on planning efficient routes, networking, and suggesting
new friends within social network websites.
Learning Objectives:
Jan Flor
Kat
Emy
Sam
Claire
Jona
James
Lesson Proper
A graph is a set of points called vertices and line segments called edges that connect vertices. It is usually a
diagram that contains information and depicts the connection and relationship between the various parts of a diagram. A
graph can include vertices that are not joined to any edges, but all edges must begin and end at vertices. A graph can be
used to depict road maps, bridges, transportation routes, electric networks, football teams, and other situations.
113
Illustration:
Example:
The table below lists five individuals with a facebook account. An “X “in the table below indicates that the two individuals
are Facebook friends
Ana Emily Jen Kyla Cloei
Ana x x
Emily x x x
Jen x x
Kyla x x
Cloei x
a) Draw a graph that represents this information where each vertex represents an individual and an edge connects two
vertices. If the corresponding individuals are friends.
b) Using the graph, who has the most number of friends? How many friends does Jen have in common with the others?
Solution:
a. We will draw the five vertices to represents the five individuals. We connect the vertices with edges according to the
table.
Ana
Emily
Jen
Kyla
Cloei
b. By observing the figure, we can see that Emily has 3 Facebook friends . The vertex corresponds to Emily are
connected to two or more edges than the other. Jen’s vertex is connected to two edges, hence she has two
Facebook friends.
A graph with 6 vertices This is a connected graph This is a graph which This is a complete
but no edge. This is not with pair of multiple edges contains loop graph with 6 vertices.
an example of connected
graph
Illustration:
B
A A
D
D
B C
C
The two graphs are equivalent graphs with edges AB, BC, AC and AD.
Euler Circuit
Leonhard Euler first introduced and used Euler paths and circuits in 1736. He used it to find a way to visit every
edge of graph once and only once. This would be useful for checking parking meters along the street of the city, patrolling
the streets of a city, or delivering mail. Take note of the following terms.
114
l Path in a graph theory is a sequence of edges. A movement from one vertex to another by traversing edges. A path
can repeat edges and the length of a path refers to the number of edges connected.
l Closed path or circuit is a path that ends at the same vertex at which it started. A closed path is said to be closed
path if the first and last vertices of its vertex sequence are the same.
Path
1. a-b-c-d-a Closed path
2. b-a-e Not a closed path
3. e-a-d-c-b-a Not a closed path
l Euler Circuit is a closed path in a graph that uses each of the edges exactly once. Is a path that uses every edge
but does not use any edge more than once and begins and ends at the same vertex.
l Eulerian graph theorem states that the graph has a Euler circuit if the graph is connected and the degree of the
vertices must be even.
Solution: Figure 1 Figure 2
a. All vertices of figure 1 are of even degree and a connected graph, hence the graph has a Euler circuit. The
Eulerian circuit is a-b-e-c-d-a.
b. Figure 2 B does not have Eulerian circuit since vertices a and d are of odd degree.
l Euler path is a path that uses every edge of a graph exactly once and does not use any edge more than once.
l Euler Path Theorem states that a connected graph has an Euler path if and only if the graph has two vertices of
odd degree with all other vertices of even degree. Furthermore, every Euler path must start at one of the vertices of
odd degree.
A
In the given graph, vertices C and E are
E odd degree, while A, D and B are even
degree, hence this graph is an example
of Euler path but not a Euler circuit
B
C
D
Weighted graph and Hamiltonian circuit
Imagine you are a delivery man and you are about to deliver packages in a certain town. You are planning a
route that takes you in each of the houses just once and takes you back to where you started. This type of route is called
Hamiltonian circuits. Hamiltonian Circuits is a path that begins and ends at the same vertex and passes through each
vertex of a graph at exactly once. This circuit was named after Sir William Rowan Hamilton (1805-1865). His problem is to
visit each city exactly once by travelling along the edges and be able to return to the starting city. He solved this problem
in the form of dodecahedron that contains the name of a city in each corner.
To verify that the graph is Hamiltonian use Dirac’s Theorem.
l 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.
115
Example:
l Weighted graph is a graph whose edges are assigned with a value called weight. The value can represent every
value we desire. Weight may represent mileage, time, cost, or some other quantities.
Illustration:
Consider the given graph with corresponding weights. Find a hamiltonian circuit of different total weights starting in vertex
A in a weighted graph.
A 10 B
15 12 A hamilton circuit is A-D-B-E-C-A.
20 21 24 5 Add the corresponding weights of each edge
C 7 6 D in the circuit.
E
15+5+24+7+20 = 71, The total weight is 71.
Example: Find the Hamiltonian circuit of the given weighted graph using greedy algorithm. Start with A.
The edge Picking Algorithm is another method of finding Hamiltonian circuit in a complete weighted graph is
given by the following steps.
1. Mark the edge of the smallest weight in the graph. (if two or more edges have the same weight, pick only one)
2. Mark the edge of the next smallest weight in the graph, as long as it does not complete a circuit does not add a
third marked edge to a single vertex.
3. Continue this process until you can no longer mark any edges. Then mark the final edge that completes the
Hamiltonian Circuit.
116
Example: Find the Hamiltonian circuit of the given weighted graph using edge picking algorithm.
Eulers Formula
Planarity
Is it possible to draw a graph so that none of the edges cross? If this is possible then the graph is called a planar
graph. A Planar graph is a graph that can be drawn so that no edge intersects each other (except at vertices). Look at
the following examples;
Illustration:
Figure 1 Figure 2
The first figure might not seems like a planar graph since it cross one of the edges but if you redrew it into a
equivalent planar (figure2) the graph becomes a planar representation. Take note that the figure1 and the figure 2 are
equivalent graphs.
While looking at the planar graph you will notice some features. The edges and the vertices divides the graph into
different regions called face. The region surrounding the graph or the exterior, is also considered a face, called the infinite
face.
Illustration:
Infinite face
face In this example there are 3 faces
face including the infinite face.
There is a relationship between the number of vertices, edges and faces of a given connected planar graph and
that is the Euler formula.
l Eulers Formula states that in any connected planar graph drawn with no intersecting edges. Let v be the number of
vertices, e the number of edges and f the number of faces. Then,
v+f=e+2
Illustration: Lets verify the Euler’s formula for the given graph
Graph Coloring
The study of graph coloring was first introduced by Francis Guthrie on 1850. He tried to color the map with at
most four colors such that no pair of neighboring countries get the same color. He attempts to answer this so that he can
easily distinguish countries. The concept was known as graph coloring. A graph coloring is an assignment of labels,
called colors to the vertices of a graph such that no two adjacent vertices share the same color.
117
Four color theorem
The four color theorem states that every planar graph is 4 colorable. This indicates that every map in the plane
consisting of connected regions without a hole can be colored with four different colors without coloring two adjacent
regions with the same color. Adjacent mean that two regions share a common boundary curve segment, not merely a
corner where three or more regions meet. This theorem was proved in 1976 by Wolfgang Haken and Kenneth Appel,
Mathematician at University of Illinois. The four color theorem guarantees that we need only four colors to color a planar
graph. However, if we want to color a nonplanar graph we need more than four colors.
Source: https://geoawesomeness.com/why-19th-century-mathematicians-were-obsessed-with-
coloring-maps/four-color-map-2/
The minimum number of colors needed to color a graph so that no edge connects vertices of the same color is
called the chromatic number of graph. In general there is no efficient method of finding the chromatic number of a graph
but there is a theorem that can tell whether a graph is 2-colorable.
Two- colorable graph theorem statest that a graph is 2-colorable if and only if it has no circuits that consist of an odd
number of vertices.
References
Books:
Reyes, J. et.al. (2018).Mathematics in the Modern World. Panday Lahi Publishing House, Muntinlupa City, p. 143-149
Rodriguez, M.,et.al., (2018). Mathematics in the Modern World. Niemie Publishing House, Quezon City, p.151-162
Websites
https://towardsdatascience.com/graph-theory-history-overview-f89a3efc0478
https://courses.lumenlearning.com/wmopen-mathforliberalarts/chapter/introduction-euler-paths/
https://study.com/academy/lesson/assessing-weighted-complete-graphs-for-hamilton-circuits.html
https://study.com/academy/lesson/assessing-weighted-complete-graphs-for-hamilton-circuits.html
https://math.libretexts.org/Bookshelves/Applied_Mathematics/Book%3A_College_Mathematics_for_Everyday_Life_(Inigo
_et_al)/06%3A_Graph_Theory/6.04%3A_Hamiltonian_Circuits
https://math.libretexts.org/Courses/Saint_Mary's_College%2C_Notre_Dame%2C_IN/SMC%3A_MATH_339_Discrete_Mat
hematics_(Rohatgi)/Text/5%3A_Graph_Theory/5.3%3A_Planar_Graphs
https://brilliant.org/wiki/graph-coloring-and-chromatic-numbers/
https://arxiv.org/ftp/arxiv/papers/1804/1804.04658.pdf
https://stackoverflow.com/questions/37288693/canonical-algorithm-for-visit-each-door-once-problems
118
Assessing Learning (Unit 11-A)
Directions: Determine whether the graph below is Eulerian. If it is, find a Eulerian circuit.
119
Direction: Prepare a list of the names of your 10 friends and your mutual friends on Facebook. Construct a graphical
representation of your friends and mutual friends. Who among you has the most number of friends?
120
Assessing Learning (Unit 11-C)
B C D
A E
J I G
K F
H G
B. Draw the map of Central Luzon and divide the map into its province. Use the four colored theorem to color the
different province of Cental Luzon.