You are on page 1of 24

14 Nov 2019

The Mathematics of Graphs

GE 112
Mathematics in the Modern World

Math & Stat Department


College of Arts & Sciences
University of Southeastern Philippines

Introduction

In this chapter, you will learn how to analyze


and solve a variety of problems, such as how
to find the least expensive route to travel on a
vacation, how to determine the most efficient
order in which to run errands, and how to
schedule meetings at a conference so that no
one has two required meetings at the same
time.

Page 2

1
14 Nov 2019

Introduction
The methods we will use to study these
problems can be traced back to an old
recreational puzzle. In the early eighteenth
century, the Pregel River in a city called
Königsberg (located in modern-day Russia
and now called Kaliningrad) surrounded an
island before splitting in two. Seven bridges
crossed the river and connected four different
land areas, similar to the map drawn below.

Page 3

Introduction

Page 4

2
14 Nov 2019

Introduction

Many citizens of the time attempted to take a


stroll that would lead them across each bridge
and return them to the starting point without
traversing the same bridge twice. None of
them could do it, no matter where they chose
to start.

Page 5

Introduction

In 1736 the Swiss mathematician Leonhard


Euler (1707–1783) proved that it is, in fact,
impossible to walk such a path. His analysis
of the challenge laid the groundwork for a
branch of mathematics known as graph
theory.

Page 6

3
14 Nov 2019

Introduction

Page 7

Graphs and Euler Circuits


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.

Definition 1
A graph is a set of points called vertices and
line segments or curves called edges that
connect vertices.
Page 8

4
14 Nov 2019

Graphs and Euler Circuits

Illustration 1

Each vertex represents a baseball team, and


an edge connecting two vertices might mean
that the two teams played against each other
during the current season.
Page 9

Graphs and Euler Circuits

Illustration 2

It shows the computer network of a small


business. Each vertex represents a computer,
and the edges indicate which machines are
directly connected to each other.
Page 10

10

5
14 Nov 2019

Graphs and Euler Circuits

Illustration 3

The graph represent the flights available on a


particular airline between a selection of cities;
each vertex represents a city, and an edge
connecting two cities means that there is a
direct flight between the two cities.
Page 11

11

Graphs and Euler Circuits

Example 1

The following table lists five students at a


college. An “X” indicates that the two students
participate in the same study group this
semester.

Page 12

12

6
14 Nov 2019

Graphs and Euler Circuits

Example 1

Matt Amber Oscar Laura Kayla


Matt - X X
Amber X - X X

Oscar X - X

Laura X X -

Kayla X -

Page 13

13

Graphs and Euler Circuits

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

Page 14

14

7
14 Nov 2019

Graphs and Euler Circuits


Answer

We draw five vertices (in any


configuration we wish) to represent
the five students, and connect vertices
with edges according to the table.

Page 15

15

Graphs and Euler Circuits


Answer
Amber

Matt Oscar

Kayla Laura

Page 16

16

8
14 Nov 2019

Graphs and Euler Circuits

Example 1
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?

Page 17

17

Graphs and Euler Circuits


Answer
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.
Page 18

18

9
14 Nov 2019

Graphs and Euler Circuits


Example 2
The table below lists five mobile phone
companies and indicates whether they have
agreements to roam onto each other’s
networks. Draw a graph that represents this
information, where each vertex represents a
phone company and an edge connects two
vertices if the corresponding companies have
a roaming agreement. Then use the graph to
answer the questions:
Page 19

19

Graphs and Euler Circuits

Example 2

MobilePlus TalkMore SuperCell Airwave Lightning

MobilePlus - No Yes No Yes

TalkMore No - Yes No No

SuperCell Yes Yes - Yes No

Airwave No No Yes - Yes

Lightning Yes No No Yes -

Page 20

20

10
14 Nov 2019

Graphs and Euler Circuits

Example 2

a. Which phone company has


roaming agreements with the most
carriers?
b. Which company can roam with
only one other network?

Page 21

21

Graphs and Euler Circuits

Answer TalkMore

MobilePlus SuperCell

Lightning Airwave

Page 22

22

11
14 Nov 2019

Graphs and Euler Circuits

Answer
The vertex corresponding to SuperCell is
connected to more edges than the others, so
SuperCell has roaming agreements with the
most carriers. TalkMore can roam with only
one network because the corresponding
vertex is connected to only one edge.

Page 23

23

Graphs and Euler Circuits


In general, graphs can contain vertices that
are not connected to any edges, two or more
edges that connect the same vertices (called
multiple edges), or edges that loop back to
the same vertex. We will usually deal with
connected graphs, graphs in which any vertex
can be reached from any other vertex by
tracing along edges. (Essentially, the graph
consists of only one “piece.”) Several
examples of graphs are shown below.
Page 24

24

12
14 Nov 2019

Graphs and Euler Circuits

This is a connected graph that has a 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.
Page 25

25

Graphs and Euler Circuits

This graph is not connected; it consists of two


different sections. It also contains a loop.

Page 26

26

13
14 Nov 2019

Graphs and Euler Circuits

This is a connected graph in which every


possible edge is drawn between vertices
(without any multiple edges). Such a graph is
called a complete graph.
Page 27

27

Graphs and Euler Circuits

This graph has five vertices but no edges and


is referred to as a null graph. It is also an
example of a disconnected graph.

Page 28

28

14
14 Nov 2019

Graphs and Euler Circuits

To solve the Konigsberg bridges problem


presented earlier, 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 area.

Page 29

29

Graphs and Euler Circuits

Page 30

30

15
14 Nov 2019

Graphs and Euler Circuits

Page 31

31

Graphs and Euler Circuits

Before we can how examine how Euler


proved this task impossible, we need to
establish some terminology. A path in a graph
can be thought of as a movement from one
vertex to another by traversing edges.

Page 32

32

16
14 Nov 2019

Graphs and Euler Circuits

We can refer to our movement by vertex


letters. For example, in the given graph, one
path could be A-B-C-E.

Page 33

33

Graphs and Euler Circuits

If a path ends at the same vertex at which it


started, it is considered a closed path or
circuit.

The path A-D-F-G-E-B-A


is a circuit because it
begins and ends at the
same vertex while the
path A-D-F-G-E-H is not
a circuit, as it does not
begin and end at the
same vertex.
Page 34

34

17
14 Nov 2019

Graphs and Euler Circuits

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.) A graph that has an Euler
Circuit is called Eulerian.

Note that a connected graph is Eulerian if


and only if every vertex of the graph is of
even degree.
Page 35

35

Graphs and Euler Circuits

The path B-D-F-G-H-E-C-B-A-D-G-E-B is an


Euler Circuit. It begins and ends at the same
vertex and uses each edge exactly one.

Page 36

36

18
14 Nov 2019

Graphs and Euler Circuits

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 pass through all
the edges of the graph.
Page 37

37

An Application of Euler Circuits

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. It is 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?

Page 38

38

19
14 Nov 2019

An Application of Euler Circuits

Page 39

39

An Application of Euler Circuits


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.
Page 40

40

20
14 Nov 2019

Graphs and Euler Path

An Euler path is a path that uses every edge


of a graph exactly once. An Euler path starts
and ends at different vertices.

Note that 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.

Page 41

41

Graphs and Euler Circuits

The path D-C-B-D-E-F-B-A-D-F-A-E is an


Euler Path. The path begins and ends at the
different vertices but passes through all edges
exactly once.
Page 42

42

21
14 Nov 2019

An Application of Euler Path

The floor plan of an art gallery is pictured


below. 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?

Page 43

43

An Application of Euler Path

Page 44

44

22
14 Nov 2019

An Application of Euler Path


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

Page 45

45

An Application of Euler Path

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

Page 46

46

23
14 Nov 2019

An Application of Euler Path

Thus we are looking for an Euler Path. We can


pass through all doorway by following such
path: C-B-F-B-A-F-E-D-C-F-D. (Trial and
error)

Page 47

47

References

Aufman, R. N., Lockwood, J. S., Nation, R.


D., & Clegg, D. K. (2013). Mathematical
Excursions (3rd ed.). Belmont: Brooks/Cole,
Cengage Learning.

Measures of Central
Tendency Page 48

48

24

You might also like