0% found this document useful (0 votes)
559 views17 pages

CM 10 - Graphs, Paths and Circuit

The document provides an overview of graph theory concepts including: - A graph consists of vertices connected by edges and can model real-world connections. - Key terms like degree, directed/undirected graphs, planar graphs, and Euler circuits are introduced. - Examples of graphs are used to illustrate graph construction and identifying properties like planarity and Euler circuits. - Graph theory can be applied to problems involving modeling relationships and connections between objects.

Uploaded by

Loeynahc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
559 views17 pages

CM 10 - Graphs, Paths and Circuit

The document provides an overview of graph theory concepts including: - A graph consists of vertices connected by edges and can model real-world connections. - Key terms like degree, directed/undirected graphs, planar graphs, and Euler circuits are introduced. - Examples of graphs are used to illustrate graph construction and identifying properties like planarity and Euler circuits. - Graph theory can be applied to problems involving modeling relationships and connections between objects.

Uploaded by

Loeynahc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Mathematics in

the Modern
World
Course Material in Mathematics

Jenette C. Pangilinan
Course Instructor
2 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

GRAPH THEORY
10
LEARNING OUTCOMES

Here’s what I will teach you in this course material:


LESSON OUTLINE
• Define and apply key terms of graph theory.
• Graphs, Paths • Apply graph theory in problem solving and sound reasoning using
and Circuits graphs, paths, circuits and graph theoretical techniques.
Unit Outline • Use technology for problem solving in graph theory using graphs, paths,
circuits and graph theoretical techniques.

RESOURCES NEEDED
For this lesson, you would need the following resources:

• Textbook:

• Video:

• Website:
MATHEMATICS IN THE MODERN WORLD • NU 3
LAGUNA

PRE-TEST
Before you start, try answering the following.

1. For each of the following undirected graphs, identify the following:


a. Vertices
b. Edges
c. Degree of each vertex

2. Refer to the figures below. Then answer the questions that follow.
a. Determine whether the graph is Eulerian. If it is, find an Euler circuit. If it is not,
explain why.
b. If the graph does not have an Euler circuit, does it have an Euler path? If so, find
one. If not, explain why.
4 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

PRE-ACTIVITY
Make a research on “ The Konigsberg Bridge Problem”, then answer the following
questions:

1. Is it possible to start a walk at any point and cross each bridge exactly once,
without retracing your steps? See figures below:

Fig 1.

Fig 2.

2. Why study graphs?


MATHEMATICS IN THE MODERN WORLD • NU 5
LAGUNA

INTRODUCTION TO GRAPHS
Think of all the various connections we experience in our lives—
friends are connected on Facebook, cities are connected by roads, computers
CONTENT AND are connected across the Internet. A branch of mathematics called graph

DISCUSSION
theory illustrates and analyzes connections such as these.

Example: Fig.1

Key Point The diagram in Figure1 represent friends that are connected on Facebook. Each
dot represents a person, and a line segment connecting two dots means that
those two people are friends on Facebook. This type of diagram is called a
The study of mathematics graph.
involves the concept of
graphs. This is known as
GRAPH
Graph Theory.
Graph theory deals with
A graph is a set of points called vertices and line segments or curves called
connections and edges that connect vertices. These edges may be ordered or unordered. If a
relationships. graph has ordered pairs of vertices, then the graph is directed. Otherwise, it is
called undirected graph.
The degree of a vertex is the number of edges connected to it.

Example:
Fig.2 Fig.3

The graph shows that they are the same, equivalent graphs because they have
the same set of vertices and edges. There are 5 vertices in the graph: A, B, C,
D, and E and there are four edges: A,B, B,C, , B,D, and B,E. The
graph is undirected because A,B= B, A. The degree of each vertex is
shown below:

Vertex A B C D E
Degree 1 4 1 1 1
6 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

Directed graph is shown below:


Fig 4.

It can be seen in Fig.4 that (B,A) is an ordered pair. The edge from A to B is called the indegree
of the vertex A. The edge from B to A is called the outdegree of the vertex B. The indegree and
outdegree of the vertices are shown below.

Vertex Indegree Outdegree


A 2 0
B 0 2
C 1 1
D 0 2
E 2 0
F 0 3
G 3 0

Note: The sum of the indegree and outdegree of each vertex is the total number of edges connected
to that vertex.

In general, a graph can include vertices that are not joined to any edges (null graph), but all edges
must begin and end at vertices. 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.

A graph is called connected if any vertex can be reached from any other vertex by tracing along
edges. (Essentially, the graph consists of one “piece.”) A connected graph in which every possible
edge is drawn between vertices (without any multiple edges) is called a complete graph.

Examples:
Fig. 5 Fig. 6 Fig. 7 Fig. 8
MATHEMATICS IN THE MODERN WORLD • NU 7
LAGUNA

Example of Equivalent graphs:

Fig.9 Fig.10 Fig.11

The three graphs shown above (Fig.9, Fig.10, Fig.11) are considered equivalent graphs because
the edges form the same connections of vertices in each graph.

CONSTRUCTING A GRAPH

The following table lists five students at a college. An “X” indicates that the two students
participate in the same study group this semester.
Table 1.

a. 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.
b. Use your graph to answer the following questions:
1. Which student is involved in the most study groups with the others?
2. Which student has only one study group in common with the others?
3. How many study groups does Laura have in common with the others?

Solution:

a. We draw five vertices (in any configuration) to represent the five students and connect vertices with
edges according to the table.
8 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

B. 1. The vertex corresponding to Amber is connected to more edges than the others, so she is involved
with more study groups (three) than the others.
2.Kayla is the only student with one study group in common, as her vertex is the only one
connected to just one edge.
3.Laura’s vertex is connected to two edges, so she shares two study groups with the others.

Planar graph is a graph such that no edges cross each other (except at vertices).

Example: Is this a planar drawing of a graph? Is the graph planar?

Solution:
The drawing is not planar because two edges cross.
The graph is planar because we can make an equivalent planar drawing of it as shown at the right.

EULER CIRCUITS

A path is a sequence of vertices such that they are connected by edges. A path in a graph can be thought
of as a movement from one vertex to another by traversing edges. We can refer to our movement
by vertex letters. For example, in the graph in fig.12, one path would be A–B–A–C.

Fig. 12

If a path ends at the same vertex at which it started, it is considered a closed path, or circuit. For
the graph in Figure 13, the path A–D–F–G–E–B–A is a circuit because it begins and ends at the
same vertex. The path A–D–F–G–E–H is not a circuit, as the path ends at a different vertex than
the one it started at.
MATHEMATICS IN THE MODERN WORLD • NU 9
LAGUNA

Fig.13

Euler Circuit is circuit that uses every edge, but never uses the same edge twice (although the
path may cross through vertices more than once). If we are going to use Figure 13 above, then the
path B–D–F–G–H–E–C–B–A–D–G–E–B is an Euler circuit.

The path A–B–C–E–H–G–E–B–D–A is not an Euler circuit: The path begins and ends at the
same vertex but it does not use edges DF, DG, or FG. The path A–B–C–E–H–G–F–D–
A–B–E–G–D–A begins and ends at A but uses edges AB and AD twice, so it is not an Euler
circuit.

EULARIAN GRAPH THEORY

A connected graph is Eulerian if and only if every vertex of the graph is of even degree.

Example 1: Which of the following graphs has an Euler circuit?

Solution:
a. Vertices C and D are of odd degree. By the Eulerian graph theorem, the graph does
not have an Euler circuit.
b. All vertices are of even degree. By the Eulerian graph theorem, the graph has an Euler
circuit.
10 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

Example 2: Determine whether the graph shown below is Eulerian. If it is, find an Euler circuit.
If it is not, explain how you know.

Solution:

Each vertex is of even degree (2, 4, or 6), so by the


Eulerian graph theorem, the graph is Eulerian.
There are many possible Euler circuits in this
graph. We do not have a formal method of locating one, but by trial and error, one Euler circuit
is B–A–F–B–E–F–G–E–D–G–B–D–C–B.

Example 3: The subway map below shows the tracks that subway trains traverse as well as the
junctions where one can switch trains. Suppose an inspector needs to travel the full length
of each track. Is it possible to plan a journey that traverses the tracks and returns to the starting
point without traveling through any portion of a track more
than once?

Solution:
We can consider the subway map a graph, with a vertex at each junction. An edge represents a
track that runs between two junctions. In order to find a travel route that does not traverse the
same track twice, we need to find an Euler circuit in the graph.
Note, however, that the vertex representing the Civic Center junction has degree 3. Because a
vertex has an odd degree, the graph cannot be Eulerian, and it is impossible for the inspector
not to travel at least one track twice.

EULER PATH THEOREM

Euler Path is a path that includes every edge of a graph exactly once.

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.
MATHEMATICS IN THE MODERN WORLD • NU 11
LAGUNA

Practical Application 1:
A photographer would like to travel across all of the roads shown on the following map.
The photographer will rent a car that need not be returned to the same city, so the trip can begin
in any city. Is it possible for the photographer to design a trip that traverses all of the roads
exactly once? See figure at the right.

Solution:
Looking at the map of roads as a graph, we see that a route that includes all the roads but does
not cover any road twice corresponds to an Euler path of the graph. Notice that only two vertices
are of odd degree, the cities Alameda and Dover. Thus, we know that an Euler path exists, and so
it is possible for the photographer to plan a route that travels each road once. Because
(abbreviating the cities) A and D are vertices of odd degree, the photographer must start at one of
these cities. With a little experimentation, we find that one Euler path is A–B–C–D–B–F–A–G–
F–E–D.

Practical Application 2:
The following figure depicts the floor plan of an art gallery. Draw a graph that represents
the floor plan, where vertices correspond to rooms and edges correspond to doorways. Is it
possible to take a stroll that passes through every doorway without going through the same
doorway twice? If so, does it matter whether we return to the starting point?

Solution:
We can represent the floor plan by a graph if we let a vertex represent each room. Draw an edge
between two vertices if there is a doorway between the two rooms, as shown in Figure 14.
Fig.14 Fig. 15
12 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

The graph in Figure 15 is equivalent to our floor plan. If we would like to tour the gallery and
pass through every doorway once, we must find a path in our graph that uses every edge once
(and no more). Thus, we are looking for an Euler path.
In the graph, two vertices are of odd degree and the others are of even degree. So, we know
that an Euler path exists, but not an Euler circuit. Therefore, we cannot pass through each
doorway once and only once if we want to return to the starting point, but we can do it if we end
up somewhere else. Furthermore, we know we must start at a vertex of odd degree—either room
C or room D. By trial and error, one such path is C–B–F–B–A–F–E–D–C–F–D.

REMEMBER:
1. An Euler Circuit is always an Euler Path, but an Euler Path may not be an Euler Circuit.
2. Euler Circuit is a circuit that includes each edge exactly once. Since a circuit it should
begin and end at the same vertex.
3. Euler’s Theorem:
a. If a graph has exactly two odd vertices then it has at least one Euler Path but no Euler
Circuit. Each Euler Path will begin at one of the odd vertex and end at the other one.
b. If a graph has all even vertices then it has at least one Euler Circuit (which is an Euler
Path). The Euler Circuit can start and end at any vertex.
c. If a graph has more than two odd vertices, then it will have no Euler Circuits or Euler
Paths.
4. Graphs Can represent many different scenarios such as:
a. Computer network of a small business
b. Flights available on a particular airline between selection of cities
c. Game match in a particular game

Hamiltonian Circuit

A Hamiltonian circuit is a path that begins and ends at the same vertex and passes through each
vertex of a graph exactly once. A graph that contains a Hamiltonian circuit is called
Hamiltonian.

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.

Example application:
The graph below shows the available flights of a popular airline. Apply Dirac’s theorem to verify
that the following graph is Hamiltonian. Then find a Hamiltonian circuit. What does the
Hamiltonian circuit represent in terms of flights?
MATHEMATICS IN THE MODERN WORLD • NU 13
LAGUNA

Solution:

There are six vertices in the graph, so n = 6, and every vertex has a degree of at least n/2 = 3. By
Dirac’s theorem, the graph is Hamiltonian. This means that the graph contains a circuit that visits
each vertex once and returns to the starting vertex without visiting any vertex twice. By trial and
error, one Hamiltonian circuit is Portland–Boise–Butte–Salt Lake City–Reno–Sacramento–
Portland, which represents a sequence of flights that visits each city and returns to the starting
city without visiting any city twice.

Weighted Graphs
A weighted graph is a graph in which each edge is associated with a value, called a weight. The
value can represent any quantity we desire.
14 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

HISTORICAL NOTE

CRITICAL THINKING

CRITICAL THINKING
Below is a a floor plan of a museum. Draw a graph
that represents the floor plan, where each vertex
represents a room and an edge connects two
vertices if there is a doorway between the two
rooms. Is it possible to walk through the museum
and pass through each doorway without going
through any doorway twice? Does it depend on
whether you return to the room you started at?
Justify your conclusion.
MATHEMATICS IN THE MODERN WORLD • NU 15
LAGUNA

ASSESSMENT ACTIVITY
Consider the graph below.

a. Draw two connected graphs.


b. Draw two Euler’s circuits.

Answer:
16 MATHEMATICS IN THE MODERN WORLD • NU LAGUNA

POSTTEST
Direction: Answer the following.
I. A group of friends is represented by the graph at the left. An edge connecting two
names means that the two friends have spoken to each other in the last week.
a. Have John and Stacy talked to each other in the last week?
b. How many of the friends in this group has Steve talked to in the last week?
c. Among this group of friends, who has talked to the most people in the last week?
d. Why would it not make sense for this graph to contain a loop?

II. For figures 1 and 2, (a) determine whether the graph is Eulerian. If it is, find an Euler
circuit. If it is not, explain why. (b) If the graph does not have an Euler circuit, does it
have an Euler path? If so, find one. If not, explain why.
Fig.1

Fig 2.
MATHEMATICS IN THE MODERN WORLD • NU 17
LAGUNA

ONLINE RESOURCES

VIDEO:
Graph Theory Overview: https://youtu.be/82zlRaRUsaY
Application of Graph Theory in Google Maps | Discrete mathematics (CSC 1707) (IIUM):
https://youtu.be/_AFqdsqIs-A

REFERENCES

Auffman, R., Lockwood, J., Nation, R., Clegg, D. (2018) Mathematical Excursions (4th ed).
Brooks/Cole, Cengage Learning
Auffman, R., Lockwood, J., Nation, R., Clegg, D. (2013) Mathematical Excursions (3rd ed).
Brooks/Cole, Cengage Learning
A Course Module for Mathematics in the Modern World (2019). Quezon City: Rex Bookstore,
Inc.

You might also like