Professional Documents
Culture Documents
GRAPH THEORY
OBJECTIVES
At the end of the lecture, the student must
be able to:
Understand graph theory which includes
paths and cycles.
Represent graphs through adjacency
matrices.
Identify the isomorphism of graphs.
Identify and characterize trees.
GRAPH THEORY
HISTORY:
Konigsberg Bridge
Konigsberg is a city which was the capital of East
Prussia but now is known as Kaliningrad in Russia.
People tried to find a way to walk all seven bridges
without crossing a bridge twice. Can you find one?
GRAPH THEORY
From landmass and bridges to points and
edges:
GRAPH THEORY
Konigsberg Bridge:
Can we walk through town, crossing each bridge
exactly once, and return to start?
{1,4}
GRAPH THEORY
Example:
{1,2}
1 2
{1,4}
ANSWER:
The number of pairs in V
= C (n,2) = n · (n -1) / 2
GRAPH THEORY
QUESTION:
How many possible graphs are there for the
same set of vertices V ?
ANSWER:
The number of subsets in the set of possible
edges. There are n · (n -1) / 2 possible edges,
therefore the number of graphs on V is 2n(n -1)/2
GRAPH THEORY
MULTIGRAPH:
If computers are connected via internet
instead of directly, there may be several routes
to choose from for each connection.
Depending on traffic, one route could be better
than another.
Makes sense to allow multiple edges, but still no
self-loops:
GRAPH THEORY
MULTIGRAPH:
e1
1 e2 2
e3 e4 e5
3 e6 4
e1 e6
1 e2 2
e3 e4 e5 e7
3 4
Now edges may be associated with a single
vertex, when the edge is a loop.
e1 {1,2}, e2 {1,2}, e3 {1,3},
e4 {2,3}, e5 {2}, e6 {2}, e7 {4}
GRAPH THEORY
PSEUDOGRAPH:
A pseudograph G = (V,E,f ) consists of a non-
empty set V of vertices (or nodes), a set E
(possibly empty) of edges and a function f
with domain E and codomain the set of pairs
and singletons in V.
GRAPH THEORY
UNDIRECTED GRAPHS TERMINOLOGY:
The order of a graph is the number of its
vertices, i.e. |V(G)|.
The size of a graph is the number of its
edges, i.e. |E(G)|.[
e3 e4 e5
3 e6 4
e3 e4 e5
3 e6 4
1 is adjacent to 2 and 3
2 is adjacent to 1 and 3
3 is adjacent to 1 and 2
4 is not adjacent to any vertex
GRAPH THEORY
UNDIRECTED GRAPHS TERMINOLOGY:
A vertex is incident with an edge (and the edge
is incident with the vertex) if it is the endpoint
of the edge..
e1
1 e2 2
e3 e4 e5
3 e6 4
e3 e4 e5
3 e6 4
1 3
4
(4,4)
ANSWER:
The same as the number of relations on V,
which is the number of subsets of V V so
2n·n.
GRAPH THEORY
DIRECTED MULTIGRAPH:
If also want to allow multiple edges in a
digraph, get a directed multigraph (or multi-
digraph).
1 3
GRAPH THEORY
DIRECTED MULTIGRAPH:
QUESTION: How to use sets and functions
to deal with multiple directed edges, loops?
e3
2
e1 e4 e6
e2 e5
1 3
e7
GRAPH THEORY
ANSWER:
Have function with domain the edge set and
codomain V V .
e3
2
e1 e4 e6
e2 e5
1 3
e7
e1 e6
1 e2 2
e5
e3 e4
3
GRAPH THEORY
GRAPHS TERMINOLOGY:
The degree of a vertex counts the number of
edges that seem to be sticking out if you
looked under a magnifying glass:
e1 e6
1 e2 2
e5
magnify
e3 e4
3
e1 e6
1 e2 2
e5
magnify
e3 e4
3
1 3
GRAPH THEORY
QUESTION:
What are in-degrees and out-degrees of all the vertices?
ANSWER:
1 3
deg-(1) = 0
deg-(2) = 3
deg-(3) = 4
deg+(1) = 2
deg+(2) = 3
deg+(3) = 2
GRAPH THEORY
HANDSHAKING THEOREM:
e1 e6
1 e2 2
e3 e4 e5 e7
3 4
1
| E | deg(e)
2 eE
In a directed graph:
|E| ( e)
deg
eE
(e)
deg
eE
GRAPH THEORY
QUESTION:
A group member presented in class that in
their group of 5 people, each member is
collaborating with exactly three others. How
is this so?
GRAPH THEORY
QUESTION:
In a party of 5 people can each person be
friends with exactly three others?
GRAPH THEORY
ANSWER:
Imagine a simple graph with 5 people as
vertices and edges being undirected edges
between friends (simple graph assuming
friendship is symmetric and irreflexive).
Number of friends each person has is the
degree of the person.
Handshaking would imply that
|E | = (sum of degrees)/2 or
2|E | = (sum of degrees) = (5·3) = 15.
Impossible as 15 is not even. In general:?
GRAPH THEORY
HANDSHAKING THEOREM:
Lemma: The number of vertices of odd
degree must be even in an undirected graph.
K1 K2
K3
K4 K5
GRAPH THEORY (Graph Patterns)
Cycles - Cn
The cycle graph Cn is a circular graph with V =
{0,1,2,…,n-1} where vertex i is connected to i +1
mod n and to i -1 mod n. They look like
polygons:
C2
C1
C3
C4 C5
GRAPH THEORY (Graph Patterns)
Wheels - Wn
The wheel graph Wn is just a cycle graph with
an extra vertex in the middle:
W2
W1
W3
W4 W5
GRAPH THEORY (Bipartite Graphs)
Bipartite Graphs
A simple graph is bipartite if V can be partitioned
into V = V1 V2 so that any two adjacent vertices
are in different parts of the partition.
Another way of expressing the same idea is
bichromatic: vertices can be colored using two
colors so that no two vertices of the same color
are adjacent
COLORABILITY
Definition: A coloring of a simple graph is the
assignment of a color to each vertex of the
graph so that no two adjacent vertices are
assigned the same color.
COLORABILITY
Definition: A coloring of a simple graph is the
assignment of a color to each vertex of the
graph so that no two adjacent vertices are
assigned the same color.
COLORABILITY
Definition: A vertex coloring of G is a map f :
V (G) → C, where C is a set of distinct colors;
it is proper if adjacent vertices of G receive
distinct colors of C; that is, if [u,v] ∈ E(G)
then f(u) ≠ f(v).
1 2 V 1 red
V 2 blue
V 3 red
4 3
V 4 blue
COLORABILITY
Definition: A vertex coloring of G is a
mapping Φ : V (G) → Z, satisfying the
conditions that Φ(x) ≠ Φ(x) if [x,y] ε E(G).
1 2 V1 1
V2 2
V3 1
4 3
V4 2
COLORABILITY
Definition: A k-coloring of a graph G is a
vertex coloring of G that uses k colors.
2 coloring
3 coloring
COLORABILITY
Definition: A k-coloring of a graph G is a
coloring Φ : V (G) → Z, such that the range of
Φ is contained in {1,2,3,…,k}.
2 coloring
range 1,2
3 coloring
range 1,2 ,3
COLORABILITY
Definition: A graph G is k-colorable if it has
k-coloring.
2 coloring
2 colorable
3 coloring
3 colorable
COLORABILITY
Remarks: If a graph is k-colorable, then it is
also r-colorable for each r≥k.
2 colorable
3 colorable 4 colorable
COLORABILITY
Remarks: If a graph is k-colorable, then it is
also r-colorable for each r≥k.
3 coloring
3 colorable
4 coloring
4 colorable
COLORABILITY
The chromatic number of a graph is the least number
of colors needed for a coloring of the graph. The
chromatic number is denoted by X(G). If X(G) = k,
G is said to be k-chromatic.
The chromatic number is 2.
X(G) = 2
4 colorable
3 colorable
2 colorable
COLORABILITY
What is the chromatic number of the graph
shown below?
b e
The chromatic number must be
a d g at least 3 since a, b, and c must
be assigned different colors. So
lets try 3 colors first.
c f
b e
3 colors work, so the chromatic
a d g
number of this graph is 3.
c f
COLORABILITY
What is the chromatic number of the graph
shown below?
Green Yellow
Yellow White
X(C2n) = 2
X(C2n+1) = 3
vertex coloring
Chromatic Numbers for Common Graph
Families
2. Wheel graphs
4a. Even wheel graphs
X(W2n) = 3
X(W2n+1) = 4
vertex coloring
Chromatic Numbers for Common Graph
Families
3. Complete graphs
X(K4) = 4
X (Kn) = n
X(K5) = 5
vertex coloring
Chromatic Numbers for Common Graph
Families
4. Bipartite graphs
X(G) = 2
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 67
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 68
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 69
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 70
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 71
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 72
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 73
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 74
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 75
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 76
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
L23 77
GRAPH THEORY (Bipartite Graphs)
EG: C4 is a bichromatic:
Answer:
Cn is bipartite when n is even. For even n color all
odd numbers red and all even numbers green so
that vertices are only adjacent to opposite color.
If n is odd, Cn is not bipartite. If it were, color 0
red. So 1 must be green, and 2 must be red. This
way, all even numbers must be red, including vertex
n-1. But n-1 connects to 0 .
GRAPH THEORY (Bipartite Graphs)
Example:
Is the graph Bipartite?
Example:
K2,3
K4,5
GRAPH THEORY (Bipartite Graphs)
Example:
Are the graphs complete bipartite graphs between
the colored and circles?
GRAPH THEORY (Bipartite Graphs)
Answer:
Yes, all of them.
GRAPH THEORY (Planar Graphs)
Planar Graphs:
A planar graph is one that can be drawn on a plane
in such a way that there are no "edge crossings,"
i.e. edges intersect only at their common vertices.
C4 C5
GRAPH THEORY (Planar Graphs)
Planar Graphs:
Understanding planar graph is important:
Any graph representation of maps/
topographical information is planar.
Circuits usually represented by planar graphs.
GRAPH THEORY (Planar Graphs)
Planar Graphs:
Common Misunderstanding:
Just because a graph is drawn with edges crossing
doesn’t mean its not planar.
QUESTION: Why can’t we conclude that the
following is non-planar?.
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
92
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
93
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
94
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
95
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
96
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
97
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
98
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
99
GRAPH THEORY (Planar Graphs)
A: Because it is isomorphic to a graph which
is planar:
100
GRAPH THEORY (Planar Graphs)
Planar Graphs:
To prove that a graph is planar amounts to
redrawing the edges in a way that no edges will
cross. May need to move vertices around and the
edges may have to be drawn in a very indirect
fashion.
GRAPH THEORY (Planar Graphs)
Example:
Show that the 3-cube is planar.
GRAPH THEORY (Planar Graphs)
The four color problem:
Also known as Guthrie's Problem:
Given any map, can the regions can be colored using
at most four colors so that no two adjacent regions
have the same color?
GRAPH THEORY (Planar Graphs)
Four color problems as planar graphs :
GRAPH THEORY (Planar Graphs)
Four color problems as planar graphs:
Is it possible for this outline? Ans.: Yes!
GRAPH THEORY (Planar Graphs)
The four color problem:
GRAPH THEORY (Planar Graphs)
The Three Utilities problem:
Suppose there are three
cottages on a plane and
each needs to be
connected to the gas,
water, and electric
companies. Sending any of
the connections through
another company or
cottage are disallowed.
Layout a way to make all
nine connections without
any of the lines crossing
each other?
GRAPH THEORY (Planar Graphs)
Three utilities problem :
The problem is part of the mathematical field of
topological graph theory which studies the
embedding of graphs on surfaces.
In more formal graph-theoretic terms, the problem
asks whether the complete bipartite graph K3,3 is
planar.
GRAPH THEORY (Planar Graphs)
Example:
The smallest graphs that are not planar.
K3,3
K5
GRAPH THEORY (Planar Graphs)
Remarks:
A graph is planar if and only if it does not contain
the K5 and the K3,3 as a homeomorphic subgraph.
K3,3
K5
GRAPH THEORY (Planar Graphs)
Two graphs G and H are homeomorphic if they can be
made isomorphic by inserting new vertices (of degree
2) into their existing edges.
GRAPH THEORY (Adjacency Matrix)
Adjacency Matrix:
A way of representing relations on a set is with a
Boolean matrix:
R digraph(R) MR
1 1 2 1 1 1 1
2 2 0 1 1 1
3 3 1 3 0 0 1 1
4 4 0 0 0 1
4
GRAPH THEORY (Adjacency Matrix)
Adjacency Matrix:
For a digraph G = (V,E ) define matrix AG by:
Rows, Columns –one for each vertex in V
Value at i th row and j th
column is
1 if i th vertex connects to j th
vertex (i j )
0 otherwise
GRAPH THEORY (Adjacency Matrix)
Adjacency Matrix:
For a digraph G = (V,E ) define matrix AG by:
Rows, Columns –one for each vertex in V
Value at i th row and j th
column is
1 if i th vertex connects to j th
vertex (i j )
0 otherwise
GRAPH THEORY (Adjacency Matrix)
Adjacency Matrix for Multigraphs:
Can easily generalize to directed multigraphs by
putting in the number of edges between vertices,
instead of only allowing 0 and 1:
For a directed multigraph G = (V,E ) define the
matrix AG by:
Rows, Columns –one for each vertex in V
Value at i th row and j th column is the number of
edges with source the i th vertex and target the
j th vertex
GRAPH THEORY (Adjacency Matrix)
Example:
What is the adjacency matrix?
1 4 3
Answer:
0 3 0 1
0 1 2 0
0 1 2 0
0 0 0 0
GRAPH THEORY (Adjacency Matrix)
Adjacency Matrix for Undirected Graphs:
Undirected graphs can be viewed as directed graphs
by turning each undirected edge into two oppositely
oriented directed edges, except when the edge is a
self-loop in which case only 1 directed edge is
introduced.
1 2 1 2
3 4 3 4
GRAPH THEORY (Adjacency Matrix)
Example:
What is the adjacency matrix?
1 2
3 4
Answer:
0 2 1 0
2 2 1 0
1 1 0 0
0 0 0 1
GRAPH ISOMORPHISM
Graph Isomorphism:
Various mathematical notions come with their own
concept of equivalence, as opposed to equality:
Equivalence for sets is bijectivity:
{ , , } {8, 12, 16}
GRAPH ISOMORPHISM
Graph Isomorphism:
Intuitively, two graphs are isomorphic if you can
bend, stretch and reposition vertices of the first
graph, until the second graph is formed.
Etymologically, isomorphic means “same shape”. :
Can twist or relabel:
to obtain:
GRAPH ISOMORPHISM
Graph Isomorphism Definition:
Suppose G1 = (V1, E1 ) and G2 = (V2, E2 ) are
pseudographs. Let f :V1V2 be a function such that
f is bijective
for all vertices u,v in V1, the number of edges
between u and v in G1 is the same as the
number of edges between f (u) and f (v ) in G2.
Then f is called an isomorphism and G1 is said to be
isomorphic to G2.
GRAPH ISOMORPHISM
Example: Prove that
is isomorphic to .
2 2
1 3 1 3
5 4
5 4
GRAPH ISOMORPHISM
Next, set f (1) = 1 and try to walk around
clockwise on the star.
2 2
1 3 1 3
5 4
5 4
GRAPH ISOMORPHISM
Next, set f (1) = 1 and try to walk around
clockwise on the star. The next vertex seen
is 3, not 2 so set f (2) = 3.
2 2
1 3 1 3
5 4
5 4
GRAPH ISOMORPHISM
Next, set f (1) = 1 and try to walk around
clockwise on the star. The next vertex seen
is 3, not 2 so set f (2) = 3. Next vertex is 5 so
set f (3) = 5.
2 2
1 3 1 3
5 4
4
5
GRAPH ISOMORPHISM
Next, set f (1) = 1 and try to walk around
clockwise on the star. The next vertex seen
is 3, not 2 so set f (2) = 3. Next vertex is 5 so
set f (3) = 5. In this fashion we get f (4) = 2
2 2
1 3 1 3
5
4 5 4
GRAPH ISOMORPHISM
Next, set f (1) = 1 and try to walk around
clockwise on the star. The next vertex seen
is 3, not 2 so set f (2) = 3. Next vertex is 5 so
set f (3) = 5. In this fashion we get f (4) = 2, f
(5) = 4.
2 2
1 3 1 3
5 4 5 4
GRAPH ISOMORPHISM
Next, set f (1) = 1 and try to walk around
clockwise on the star. The next vertex seen
is 3, not 2 so set f (2) = 3. Next vertex is 5 so
set f (3) = 5. In this fashion we get f (4) = 2, f
(5) = 4. If we would continue, we would get
back to f (1) =1 so this process is well defined
and f is a morphism.
2 2
1 3 1 3
5 4
5 4
GRAPH ISOMORPHISM
Next, set f (1) = 1 and try to walk around clockwise
on the star. The next vertex seen is 3, not 2 so set f
(2) = 3. Next vertex is 5 so set f (3) = 5. In this
fashion we get f (4) = 2, f (5) = 4. If we would
continue, we would get back to f (1) =1 so this
process is well defined and f is a morphism. Finally
since f is bijective, f is an isomorphism.
2 2
1 3 1 3
5 4
5 4
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
GRAPH ISOMORPHISM
Properties of Isomorphism:
Since graphs are completely defined by their vertex
sets and the number of edges between each pair,
isomorphic graphs must have the same intrinsic
properties. I.e. isomorphic graphs have the same…
…number of vertices and edges
…degrees at corresponding vertices
…types of possible subgraphs
…any other property defined in terms of the
basic graph theoretic building blocks!
GRAPH ISOMORPHISM
Negative Examples:
Once you see that graphs are isomorphic, easy to
prove it. Proving the opposite, is usually more
difficult.
To show that two graphs are non-isomorphic need to
show that no function can exist that satisfies
defining properties of isomorphism.
In practice, you try to find some intrinsic property
that differs between the 2 graphs in question.
GRAPH ISOMORPHISM
Negative Examples:
Why are the following non-isomorphic?
u2 v2
u1 u3 v3
v1
u5 u4 v4
u3 v1 v3
u1
u5 u4 v5 v4
u3 v1 v3
u1
u5 u4 v5 v4
u1 u2 u3 u4 u5 u6
u7 u8 u9
v1 v2 v3 v4 v5 v6
v7 v8 v9
u1 u2 u3 u4 u5 u6 v1 v2 v3 v4 v5 v6
u7 u8 v7 v8
GRAPH ISOMORPHISM
Q: Why are the following non-isomorphic?
??? None of the previous approaches work as there are
the same no. of vertices, edges, and same no. of
vertices per degree.
u1 u2 u3 u4 u5 u6 v1 v2 v3 v4 v5 v6
u7 u8 v7 v8
GRAPH ISOMORPHISM
LEMMA: If G and H are isomorphic, then any subgraph of
G will be isomorphic to some subgraph of H.
u1 u2 u3 u4 u5 u6 v1 v2 v3 v4 v5 v6
u7 u8 v7 v8
GRAPH ISOMORPHISM
Q: Why are the following non-isomorphic?
u1 u2 u3 u4 u5 u6 v1 v2 v3 v4 v5 v6
u7 u8 v7 v8
GRAPH ISOMORPHISM
Q: Why are the following non-isomorphic?
Q: Why not?
u1 u2 u3 u4 u5 u6 v1 v2 v3 v4 v5 v6
u7 u8 v7 v8
GRAPH ISOMORPHISM
Q.: Why is this subgraph is not a subgraph of the left graph?
A.: Deg. 3 vertices must map to deg. 3 vertices. Since
subgraph and left graph are symmetric, can assume v2
maps to u2. Adjacent deg. 1 vertices to v2 must map to
degree 1 vertices, forcing the deg. 2 adjacent vertex v3 to
map to u3. This forces the other vertex adjacent to v3,
namely v4 to map to u4. But then a deg. 3 vertex has
mapped to a deg. 2 vertex
u1 u2 u3 u4 u5 u6 v1 v2 v3 v4 v5 v6
u7 u8 v7 v8
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
GRAPH ISOMORPHISM
Theorem:
Two graphs G and H are isomorphic if and only if
they have a common adjacency matrix.
Moreover, two isomorphic graphs have exactly the
same set of adjacency matrices.
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
0 0 0 0 1 0 1 1
1 1 0 1 0 1 0 0
1 1 0 1 1 0 1 1
0 0 1 0 0 0 0 0
GRAPH ISOMORPHISM
Example:
Determine which letters are isomorphic.
GRAPH ISOMORPHISM
Example:
Are these graphs isomorphic?
Are these two graphs isomorphic?
L23 153
Are these two graphs isomorphic?
L23 154
Are these two graphs isomorphic?
L23 155
So these graphs are isomorphic…
L23 156
GRAPH ISOMORPHISM
Definition: Let G be a graph with vertices v and w.
A walk from v to w is a finite alternating sequence
of vertices and edges
v0e1v1e2v2…vn – 1en – 1vn
where v0 = v, vn = w, and each ei has endpoints vi – 1
and vi.
GRAPH ISOMORPHISM
Example:
A walk from A to F.
A D
B E
C F
GRAPH ISOMORPHISM
Definition: Let G be a graph with vertices v and w.
A path from v to w is a walk from v to w in which the
edges are distinct.
A simple path from v to w is a path from v to w in
which the vertices are distinct.
A closed walk is a walk that starts and ends at the
same vertex.
GRAPH ISOMORPHISM
Example:
A path from A to F.
A D
B E
C F
GRAPH ISOMORPHISM
Example:
A simple path from A to F.
A D
B E
C F
GRAPH ISOMORPHISM
Example:
A closed walk from A to A.
A D
B E
C F
GRAPH ISOMORPHISM
Definition: Let G be a graph with vertices v and w.
A circuit is a closed path.
A simple circuit is a circuit in which the vertices are
distinct, except for the first and last vertices.
GRAPH ISOMORPHISM
Example:
A circuit from A to A.
A D
B E
C F
GRAPH ISOMORPHISM
Example:
A simple circuit from A to A.
A D
B E
C F
GRAPH ISOMORPHISM
Definition:
An Euler circuit of a graph G is a circuit that
contains every vertex of G at least once and every
edge of G exactly once.
GRAPH ISOMORPHISM
Origin of Problem
In the town of Konigsberg there was an island in the river
connected by seven bridges to the rest of the city. The
question was whether you could find a path starting and ending
at the same spot, that crossed each bridge exactly once.
Solution of Problem
This problem was solved by Euler, who represented each
bridge as an edge, and each terminal point of a bridge as a
node in a graph. Then he found a necessary and sufficient
condition on each of the nodes: each node must have even
degree (even number of edges incident to it). All nodes have
odd degree. So it is impossible to find a closed path that uses
each edge exactly once.
GRAPH ISOMORPHISM
Euler's Theorem
Let G be a connected graph (every pair of nodes is joined by
some path). Then a necessary and sufficient condition for G to
have an Euler circuit is that each node of G has even degree.
So if a graph has an euler circuit, then every vertex of the
graph has even degree.
If some vertex of a graph has odd degree, then the graph
does not have an Euler circuit.
GRAPH ISOMORPHISM
Euler's Theorem
Repeated visits to a given node are allowed. Visit each node exactly once.
Traverse each edge exactly once (by defn Repeated traversals of a given edge are not
of problem). permitted, since that would result in
visiting a node more than once.
No node may be omitted (if so, one of the No node may be omitted (by defn of the
edges incident to the node would not be problem).
traversed).
No edges may be omitted (by defn of the Any edge may be omitted, as long as its
problem). endpoints can be reached via some other
path.
GRAPH ISOMORPHISM
Comparison:
GRAPH ISOMORPHISM
Theorem (Dirac’s Theorem):
A simple, connected graph is Hamiltonian if the number
of vertices is at least three and at most twice the degree of
each vertex. (Recall that a graph is simple if it has no
multiple edges or loops.)
GRAPH ISOMORPHISM
Example: Identify which are Hamiltonian Circuits.
Apply Dirac’s Theorem if possible.
Unlike the Euler circuit problem, finding Hamilton circuits is hard. There is no
simple set of necessary and sufficient conditions, and no simple algorithm. But
here is a list of conditions that must be satisfied:
Necessary conditions for Hamilton circuit
Assume G has more than 2 nodes.
1. No vertex of degree 1
If a has degree 1, then the other endpoint of the edge incident to a must be
visited at least twice in any circuit of G.
2. If a node has degree 2, then both edges incident to it must be in any Hamilton
circuit.
3. No smaller circuits contained in any Hamilton circuit (the start/endpoint of any
smaller circuit would have to be visited twice).
4. There must exist a subgraph H of G with the following properties:
5. H contains every vertex of G
6. H is connected
7. H has the same number of edges as vertices
8. H has every node with degree 2
9. The subgraph H is the Hamilton circuit in the graph G.
Page 634 Prop 11.2.6
(i) G is a tree.
Complete Graphs
A graph G is said to be complete if every vertex in G is
connected to every other vertex in G. Thus a complete
graph G must be connected. The complete graph with n
vertices is denoted by Kn.
Just a Review…
Regular Graphs
• A graph G is regular of degree k or k-regular if every
vertex has degree k. In other words, a graph is regular
if every vertex has the same degree.