Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

University of the East

Mathematics in the Modern World

Mathematics of Graphs (Additional Topic)


Student’s handouts

Graph Preliminaries

Definition 1: A graph, say 𝐺, is an ordered pair 𝐺 = < 𝑉(𝐺), 𝐸(𝐺) >, where 𝑉(𝐺) is the a non-
empty finite set and 𝐸(𝐺) is a set of unordered pairs of elements of 𝑉(𝐺). The elements of 𝑉(𝐺)
are called vertices while the elements of 𝐸(𝐺) are called the edges of 𝐺.

If 𝑥, 𝑦 are vertices in a graph 𝐺 and the unordered pair formed by 𝑥 and 𝑦 belongs to 𝐸(𝐺), we
use the notation [𝑥, 𝑦] for this ordered pair. Since the pair is unordered pair, then [𝑥, 𝑦] = [𝑦, 𝑥].

Definition 2: A graph is a set of points called vertices and line segments or curves called edges
that connects vertices.

Illustration 3: Below is a picture of a graph with six vertices – James, Heather, Juan, Amy, Lisa
and Jared. The set of edges contains seven elements – [James, Heather], [James,Jared], [James-
Lisa], [Amy,Heather], [Lisa- Heather], [Juan, Heather] and [Juan, Jared].

Page 1 of 13
Exercise 4: The following table lists five students at a college. An “X” indicates that the two
students participate in the same study group this semester.

Rene Madz Allan Norma Kiko

Rene --- X X X

Madz X --- X X

Allan X X --- X

Norma X ---

Kiko X X ---

Draw a graph that represents this information where each vertex represents a student and an edge
connects two vertices if the corresponding students study together.

Definition 5: In general, graphs can contain vertices that are not connected to any edges.
Moreover, if two or more edges connect the same vertices, they are called multiple edges. If an
edge begins and ends at the same vertex, it is called a loop.

Definition 6: A graph is connected if any vertex can be reached from any other vertex by tracing
along edges. A connected graph in which every possible edges is drawn between vertices is called
complete graph.

Illustration 7: Below are examples of complete graphs.

Page 2 of 13
Definition 8: A graph is simple if it has no loops and there is at most one edge between any two
vertices in the graph.

Definition 9: Two or more are called equivalent graphs if the edges form the same connections
of vertices in each graphs.

Exercise 10: Determine whether the two graphs are equivalent.


1.

2.

Definition 11: A path in a graph can be thought of as a movement from one vertex to another by
traversing edges. If a path ends at the same vertex at which it started, it is considered a closed
path, or circuit. The number of edges that meet at a vertex is called the degree of a vertex.

Page 3 of 13
Exercise 12: Consider the graph below.

1. Give three paths from vertex A to E.


2. Give three circuit that starts with B.
3. What is the degree of vertex C?

Euler Circuit and Path

Definition 13: A circuit that uses every edge, but never uses the same edge twice, is called an
Euler circuit. A graph that contains an Euler circuit is called a Eulerian graph.

Remark 14: The path may cross through the vertices more than once.

Exercise 15: Consider the graph below.

Give an example of an Euler circuit for the given graph.

Page 4 of 13
Theorem 16 (Eulerian Graph Theorem):
A connected graph is Eulerian (has an Eulerian circuit) if and only if each vertex of the
graph is of even degree.

Exercise 17: Determine whether the given graph is Eulerian or not.

Theorem 18 (Euler Path Theorem):


A connected graph contains 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 and end at
the other.

Example 19: The floor plan of an art gallery is pictured below.

Page 5 of 13
Draw a graph that represents the floor plan, where vertices correspond to rooms and edges
correspond to doorways.
1. Is it possible to take a stroll that passes through every doorway without going through the
same doorway twice?
2. If so, does it matter whether we return to the starting point?

Hamiltonian Circuit

Definition 20: A Hamiltonian circuit is a circuit that uses each vertex of a graph exactly once. A
graph that contains a Hamiltonian circuit is called Hamiltonian.

Example 21: Consider the graph below.

An example of Hamiltonian circuit from the given graph is A-G-F-E-C-D-B-A.

Theorem 22 (Dirac’s Theorem):


Consider a connected graph with at least three vertices and no multiple edges. Let 𝑛 be the
𝑛
number of vertices in the graph. If every vertex has a degree of at least , then the graph must be
2

Hamiltonian.

Page 6 of 13
Example 23: Consider the graph below.

Obviously, the graph is connected and has 7 vertices. It should be clear that all vertices are of
degree at least 3.5, therefore, the graph is Hamiltonian.

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

Example 25: The graph below illustrates remark 24.

Page 7 of 13
Weighted Graph

Definition 26: A weighted graph is a graph in which each edge is associated with a value, called
a weight. An example of weighted graph is presented below.

Application 27: Travelling Salesman Problem

The travelling salesman problem asks the following question: "Given a list of cities and the
distances between each pair of cities, what is the shortest possible route that visits each city exactly
once and returns to the origin city?“

The traveling salesman problem consists of a salesman and a 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 traveling salesman wants to minimize the
total length of the trip.

Page 8 of 13
Exercise 28: (Aufmann, 2018) The table below lists the distances in miles between six popular
cities that a particular airlines flies to. Suppose a traveller would like to start in Chicago, visit the
other five cities this airlines flies to, and return to Chicago. Find three different routes that the
traveller could follow, and find the total distance flown from each route.
Chicago New York Washington Philadelphia Atlanta Dallas

Chicago - 713 597 665 585 803

New York 713 - No flights No flights 748 1374

Washington 597 No flights - No flights 544 1185

Philadelphia 665 No flights No flights - 670 1299

Atlanta 585 748 544 670 - No flights

Dallas 803 1374 1185 1299 No flights -

Definition 29: The Greedy Algorithm


A method of finding the Hamiltonian circuit in a complete weighted 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 to
a vertex not yet visited. Continue this process until you have visited all vertices.
3. Return to the starting vertex.

Remark 30: In finding a Hamiltonian circuit using the greedy algorithm, be guided of the
following.
 The degree of vertex in a Hamiltonian circuit is 2.
 The greedy algorithm attempts to give a circuit of minimal total weight, although it does
not always succeed.

Page 9 of 13
Exercise 31: Use the greedy algorithm to find a Hamiltonian circuit starting at vertex A in the
given weighted graph.

Definition 32. The Edge-Picking Algorithm


Another method of finding a Hamiltonian circuit in a complete weighted graph is given by the
following edge-picking algorithm.
1. Mark the edge of smallest weight in the graph.
2. Mark the edge of the next smallest weight in the graph, as long as it does not complete a
circuit and does not add a third marked edge to a single vertex.
3. Continue the process until you can no longer mark any edges. Then mark the final edge
that completes the Hamiltonian circuit.

Remark 33: In finding a Hamiltonian circuit using the edge picking algorithm, the following must
be observed.
 The degree of vertex in a Hamiltonian circuit is 2.
 The edge picking algorithm attempts to give a circuit of minimal total weight, although it
does not always succeed.

Page 10 of 13
Exercise 34: Use the edge-picky algorithm to find a Hamiltonian circuit in the given weighted
graph.

Planarity and Graph Coloring

Definition 35: A planar graph is a graph that can be drawn so that no edges intersect each other
(except at vertices).

Theorem 36 (Euler’s Formula):


In a 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 𝑣 + 𝑓 = 𝑒 + 2.

Definition 37: Graph Coloring


There is a connection between map coloring and graph theory. Maps can be drawn by
graphs using the areas as the vertices and two vertices (areas) are connected by an edge if they
share a common boundary.

In graph coloring, each vertex of a graph will be assigned one color in such away that no
two vertices connected by an edge share the same color. The goal is to determine the minimum

Page 11 of 13
number of colors needed so that we can color each vertex of a graph with no two vertices connected
by an edge have the same color.

Exercise 38: Consider the map. Find the minimum number of colors needed to color the map so
that no two countries that share boundary have the same colors.

Definition 39: 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.

Theorem 40: 2-Colorable Graph Theorem


A graph is 2-colourable if and only if it has no circuits that consist of an odd number of vertices.

Example 41: The graph

is not 2-colorable since it has a circuit that is consist of odd number of vertices (a circuit that
forms a triangle in the inner section of the graph).

Page 12 of 13
References:
 Aufmann R., et al (2018). Mathematical Excursions, Fourth Edition. USA: Cengage
Learning.
 First Generation Training the Trainors (2016). Philippines: Ateneo De Manila University.
 Photo credits: Google Images

Page 13 of 13

You might also like