Graphs 1
Graphs 1
MODERN WORLD
Textbook: Aufmann, R., Lockwood, J., Nation, R., Clegg, D., Epp, S., Abad, E. Jr. Mathematics
in the Modern World. (Rex Book Store, Inc., Manila, Philippines). 2018.
VI. Graph Theory
Seven Bridges of Kӧnigsberg, Euler and Graph Theory
(Courtesy of google.com)
The problem was to devise a walk through
the city that would cross each of those
bridges once and only once.
Cebu City - X X X
Minglanilla - X
Mandaue City X - X X
Consolacion X - X
Talisay City X X -
Lapu-Lapu City X X X
Cordova X X -
• 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 a loop.
• A graph is called connected if any vertex can be reached from any other
vertex by tracing along edges.
• A connected graph in which every possible edge is drawn between
vertices and without any multiple edges is called a complete graph.
• Two graphs G=(V,E) and G'=(V',E') are isomorphic if there exists a one-to-
one and onto function β:V→V' such that for any x,y ϵ V:
{x,y} ϵ E if and only if {β(x), β(y)} ϵ E'.
• Example: Determine whether the following graphs are isomorphic.
B C
A B C D
A D
B B A
C E
C D E
Euler Circuits
• A path is a graph G=(V,E) such that V={x1, x2, x3, ... , xn-2, xn-1, xn} and
E={{x1,x2}, {x2,x3}, ... , {xn-2,xn-1}, {xn-1,xn}}.
• If a path ends at the same vertex at which it started, it is called a closed
path or a circuit.
• Note: a path or a circuit is sometimes useful when considered as a part of
a “bigger” graph (this is the concept of a “subgraph”).
• In a graph, a circuit that uses every edge but never uses the same edge
twice is called an Euler circuit.
• Example: Find an Euler circuit in the following graph.
A B C D
E F G H
• Example: Find an Euler circuit in the following graph.
A B
C D
D E
• A graph with an Euler circuit s called an Eulerian graph.
• Eulerian Graph Theorem:
A connected graph is Eulerian if and only if every vertex of the graph
is of even degree.
• Example: Use the Eulerian Graph Theorem to verify our two examples above on the
existence of Eulerian circuits.
• Example: Recalling the problem of 7 bridges of Kӧnigsberg, was it possible for the people to
take a stroll that would lead them across each bridge and return them to the starting point
without traversing the same bridge twice?
• In a graph, a path that uses every edge once and only once is called an
Euler path.
• Example: Determine if there exists an Euler path of the following graph.
A B
C D
• A Version of Euler Path Theorem:
Let G be a connected graph with two distinct vertices x and y of odd
degrees. G has an Euler path from vertex x to vertex y if and only
if x and y are the only vertices of odd degrees.
• Example: Verify our last example on the existence of an Euler path using this theorem.
• Example: Recalling the problem of 7 bridges of Kӧnigsberg, was it possible for the people to
take a stroll such that they start in one of the points and end up with a different point with the
condition that they cross each bridge without traversing the same bridge twice?
• Example: A bicyclist wants to mountain
bike through all the trails of a national park.
A map of the park is shown on the right.
Because the bicyclist will be dropped off in
the morning by friends and picked up in
the evening, she does not have a
preference for where she begins and ends
her ride. Is it possible for the cyclist to
traverse all of the trails without repeating
any portions of her trip?
• Example: The floor plan of a warehouse is
illustrated on the right. Use a graph to
represent the floor plan, and answer the
following questions: Is it possible to walk
through the warehouse so that you pass
through every doorway once but not twice?
Does it matter whether you return to the
starting point?