0% found this document useful (0 votes)
149 views31 pages

The Mathematics of Graphs 1

Uploaded by

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

The Mathematics of Graphs 1

Uploaded by

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

CHAPTE

5
The Mathematics
of Graphs

Copyright © Cengage Learning. All rights reserved.


Section 5.1 Graphs and Euler Circuits

Copyright © Cengage Learning. All rights reserved.


Introduction to Graphs

3
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 are connected across the
Internet.

A branch of mathematics called graph theory illustrates


and analyzes connections such as these.

For example, the diagram in


Figure 5.1 could represent
friends that are connected
on Facebook.
Figure 5.1
4
Introduction to Graphs
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 graph.

5
Example 1 – 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.

6
Example 1 – Constructing a Graph cont’d

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: Which


student is involved in the most study groups with the
others? Which student has only one study group in
common with the others? How many study groups does
Laura have in common with the others?

7
Example 1 – Solution
a. We draw five vertices (in any configuration we wish) to
represent the five students, and connect vertices with
edges according to the table.

8
Example 1 – Solution cont’d

b. 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.

Kayla is the only student with one study group in


common, as her vertex is the only one connected to just
one edge. Laura’s vertex is connected to two edges, so
she shares two study groups with the others.

9
Introduction to Graphs
In general, a graph can include vertices that are not joined
to any edges, 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 the 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.
10
Introduction to Graphs
Several examples of graphs are shown below.

This graph has five vertices but This is a connected graph that has a
no edges. It is not connected. pair of multiple edges. Note that two
edges cross in the center, but there is
no vertex there. Unless a dot is drawn,
the edges are considered to pass over
each other without touching.

11
Introduction to Graphs

This graph is not connected; it consists of two This is a complete graph with five vertices.
different sections. It also contains a loop.

12
Introduction to Graphs
Consequently, the three graphs shown below are
considered equivalent graphs because the edges form the
same connections of vertices in each graph.

13
Example 2 – Equivalent Graphs
Determine whether the following two graphs are equivalent.

Solution:
Despite the fact that the two graphs have different
arrangements of vertices and edges, they are equivalent.

14
Example 2 – Solution cont’d

To illustrate, we examine the edges of each graph. The first


graph contains six edges; we can list them by indicating
which two vertices they connect.

The edges are AC, AE, BD, BE, CE, and DE. If we do the
same for the second graph, we get the same six edges.

Because the two graphs represent the same connections


among the vertices, they are equivalent.

15
Euler Circuits

16
Euler Circuits
To solve the Königsberg bridges problem, we can represent
the arrangement of land areas and bridges with a graph. Let
each land area be represented by a vertex, and connect two
vertices if there is a bridge spanning the corresponding land
areas. Then the geographical configuration shown in Figure
5.3 becomes the graph shown in Figure 5.4.

Figure 5.3 Figure 5.4


17
Euler Circuits
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 Figure 5.4, one path would be A–B–A–C.

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 5.5, the path
A–D–F–G–E–B–A is a circuit
because it begins and ends at the
same vertex.
Figure 5.5

18
Euler Circuits
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.

A circuit that uses every edge, but never uses the same
edge twice, is called an Euler circuit. (The path may cross
through vertices more than once.)

The path B–D–F–G–H–E–C–B–A–D–G–E–B in Figure 5.5


is an Euler circuit. It begins and ends at the same vertex
and uses each edge exactly once. (Trace the path with
your pencil to verify!) The path A–B–C–E–H–G–E–B–D–A
is not an Euler circuit.
19
Euler Circuits
The path begins and ends at the same vertex but it does
not use edges DF, DG, or FG.

Euler essentially proved that the graph


in Figure 5.4 could not have an Euler
circuit. He accomplished this by
examining the number of edges that
met at each vertex.
Figure 5.4

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


degree of a vertex.

20
Euler Circuits
He made the observation that in order to complete the
desired path, every time you approached a vertex you
would then need to leave that vertex.

If you traveled through that vertex again, you would again


need an approaching edge and a departing edge.

Thus for an Euler circuit to exist, the degree of every vertex


would have to be an even number.

21
Euler Circuits
Furthermore, he was able to show that any graph that has
even degree at every vertex must have an Euler circuit.
Consequently, such graphs are called Eulerian.

22
Example 3 – Identifying Eulerian Graphs

Which of the following graphs has an Euler circuit?


a. b.

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. 23
Euler Circuits
The Eulerian Graph Theorem guarantees that when all
vertices of a graph have an even degree, an Euler circuit
exists, but it does not tell us how to find one.

Because the graphs we will examine here are relatively


small, we will rely on trial and error to find Euler circuits.

There is a systematic method, called Fleury’s algorithm,


that can be used to find Euler circuits in graphs with large
numbers of vertices.

24
Example 4 – Find an Euler Circuit
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.
25
Example 4 – Solution cont’d

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.

26
Euler Paths

27
Euler Paths
Perhaps the Königsberg bridges problem
would have a solution if we did not need
to return to the starting point. In this case,
what we are looking for in Figure 5.4 is
a path (not necessarily a circuit) that
uses every edge once and only once.

Figure 5.4

We call such a path an Euler path. Euler showed that even


with this relaxed condition, the bridge problem still was not
solvable.

28
Euler Paths
The general result of his argument is given in the following
theorem.

29
Example 6 – An Application of Euler Paths

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?
30
Example 6 – Solution
Looking at the map of roads as a graph, we see that a
route that includes all of 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.
31

You might also like