Cse Discrete 7
Cse Discrete 7
1
Euler circuit and Euler Path
Definition
An Euler circuit in a graph G is a simple circuit containing every edge of G.
An Euler path in G is a simple path containing every edge of G.
e1
V0 V1
e4
e2
e3
V3 V2
2
Euler circuit and Euler Path
Definition
An Euler circuit in a graph G is a simple circuit containing every edge of G.
An Euler path in G is a simple path containing every edge of G.
e1
V0 V1
e4 Euler Path
e2
e3
V3 V2
3
Euler circuit and Euler Path
Definition
An Euler circuit in a graph G is a simple circuit containing every edge of G.
An Euler path in G is a simple path containing every edge of G.
e1
V0 V1
Euler Path and
e4 e2 circuit
V3 V2
e3
4
Problem - 1
Which of the undirected graphs in Figure 3 have
an Euler circuit? Of those that do not, which have
an Euler path?
Graph Euler Path E. Circuit
G1 1 1
G2 0 0
G3 1 0
5
Problem - 2
Which of the undirected graphs in Figure 3 have
an Euler circuit? Of those that do not, which have
an Euler path?
Graph Euler Path E. Circuit
H1 0 0
H2 1 1
H3 1 0
6
Euler path and circuit
Theorem 1
A connected multigraph with at least two vertices has an Euler circuit if
and only if each of its vertices has even degree.
A D
B
7
Euler path and circuit
Theorem 2
A connected multigraph has an Euler path but not an Euler circuit if and
only if it has exactly two vertices of odd degree.
A D
B
8
Problem - 3
Which graphs shown in Figure 7 have an Euler path?
9
Hamilton path and circuit
Definition
A simple path in a graph G that passes through every vertex exactly
once is called a Hamilton path, and a simple circuit in a graph G that
passes through every vertex exactly once is called a Hamilton circuit.
10
Problem - 4
Which of the simple graphs in Figure 10 have a
Hamilton circuit or, if not, a Hamilton path?
G1 1 1
G2 1 0
G3 0 0
11
Shortest Path
Problem
12
Weighted Graph
Definition
Graphs that have a number assigned to each edge are called weighted
graphs.
5 V1
V0
8
3
6
V3 V2
13
Weighted Graph
14
Weighted Graph
15
Weighted Graph
16
Any Questions?
17