You are on page 1of 22

Graph Theory

Part I
Think – Pair - Share
With your seatmate, determine what graph theory is
based on the following images.
(3 minutes)
Think – Pair – Share
Königsberg Bridge Problem (5 minutes)
In the early 18th 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 on the
right.
Copy the map and try to plan
your journey in such a way that you
cross each bridge and return to the
starting point without traversing the
same bridge more than once.
Königsberg Bridge Problem
In 1736 the Swiss mathematician Leonhard Euler proved the answer to the problem. His
analysis of the challenge laid the groundwork for a branch of mathematics known as
graph theory.

C
Let the islands be represented by the points
(A, B, C and D), and all possible paths by the
curves.
A
D

B
Königsberg Bridge Problem
C

A
D

Euler concluded that it is impossible to travel the bridges in the city of Königsberg once
and only once.
Graph Theory
• is the study of lines and points
• is the sub-field of mathematics which deals with graphs:
diagrams that involve points and lines and which often
pictorially represent mathematical truths
• is the study of the relationship between edges and vertices
Graph Theory Terminologies
Graph – a set of points called vertices (nodes) and line segments or
curve called edges that connect vertices

Vertex – fundamental unit out of which graphs are formed

Edge or Arc or Link – gives the relationship between two


vertices

In general, a graph can include vertices that are not joined


to any edges, but all edges must begin and end at vertices.
Graph Theory Terminologies
Multiple edges – if two or more edges connect the same vertices
This graph has 5
vertices but no
Loop – if an edge begins and ends at the same vertex
edges. It is not
connected.
Connected graph - if any vertex can be reached from any other
vertex by tracing along edges

This graph is not


This is a connected connected; it
graph. No vertex in consist of 2
the intersection, then different sections
edges just pass over and a loop.
each other.
Example 1
Matt Amber Oscar Laura Kayla
Matt - X X
Amber X - X X
Oscar X - X
Laura X X -
Kayla X -

X indicates that the two students participate in the same study group this semester.
a. Which student is involved in the most study groups with the others?
b. Which student has only one study group in common with the others?
Example 1
Matt Amber Oscar Laura Kayla
Matt - X X
Amber X - X X
Oscar X - X
Laura X X -
Kayla X -

a. Which student is involved in the most study groups with the others?
Amber
b. Which student has only one study group in common with the others?
Kayla
Graph Theory Terminologies
Complete graph – a connected graph in which every possible edge
is drawn between vertices
This is a complete
graph with five
Equivalent graphs – graphs that form the same connection of vertices.
vertices in each graph

A A C
The graphs are
B equivalent. Vertex B
B has an edge connecting
C E D E to each of the other 4
D vertices.
Example 2
Determine whether the following two graphs are equivalent.

Both graphs have six edges and the same connections among the vertices, they are
equivalent.
Euler Circuits
A path in a graph can be thought of as a movement from one vertex to another by
traversing edges. One of the paths from the Königsberg bridge
problem is A–B–A–C.
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.
Euler Circuits
A circuit that uses every edge, but never uses the same edge twice is called an Euler
circuit.

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
because the path does not use edges DF, DG, or FG.

The path A-B-C-E-H-G-F-D-A-B-E-G-D-A uses edges AB and AD twice so it is not an Euler


circuit.
Euler Circuits
Euler essentially proved that the graph of the Königsberg bridge
problem could not have an Euler circuit. He accomplished this
by examining the number of edges that met at each vertex. The
number of edges that meet at a vertex is called the degree of a
vertex. He made the observation that in order to complete the
desired path, every time you approached a vertex you 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. 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.
Example 3
Which of the following graphs has an Euler circuit?

a. Vertices C and D are of odd degree. The graph does not have an Euler circuit.
b. All vertices are of even degree. The graph has an Euler circuit.
Example 4
Determine whether the graph shown below is Eulerian. If it is find an Euler circuit. If it is
not, explain how you know.

All vertices are of even degrees. One path is B-A-F-B-E-F-G-E-D-G-B-D-C-B.


Example 5
The subway map on the right 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 traverse the tracks and
returns to the starting point without
traveling through any portion of a track
more than once?

No, Civic Center junction has degree 3. The graph is not Eulerian.
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 with odd degree and end at the other.
Example 6
A photographer would like to travel across
all of the roads shown on the map. She 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?

2 cities are of odd degree, Alameda and Dover. Thus, a Euler path exist. One Euler path is
A-B-C-D-B-F-A-G-F-E-D.
Example 7
Draw a graph that represents the art gallery
floor plan where the vertices corresponds
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?
Example 7

Two vertices are of odd degree (C & D) and the others are of even degree. So, an
Euler path exist. One of the path is C-B-F-B-A-F-E-D-C-F-D.

You might also like