0% found this document useful (0 votes)
73 views

Module 6 DSGT

The document discusses various graph theory concepts: 1) It defines degree of a vertex, even/odd vertices, and degree of a graph. It also discusses the Handshaking Lemma. 2) It discusses types of graphs like weighted graphs, non-planar graphs, and bipartite graphs. 3) It defines walks, trails, paths, circuits, and cycles in graphs and the differences between them. 4) It discusses cut sets, cut vertices, cut edges, connectivity, and Euler graphs, paths, and circuits. It provides criteria to determine if a graph has an Euler path or circuit.

Uploaded by

thakur.sami2804
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Module 6 DSGT

The document discusses various graph theory concepts: 1) It defines degree of a vertex, even/odd vertices, and degree of a graph. It also discusses the Handshaking Lemma. 2) It discusses types of graphs like weighted graphs, non-planar graphs, and bipartite graphs. 3) It defines walks, trails, paths, circuits, and cycles in graphs and the differences between them. 4) It discusses cut sets, cut vertices, cut edges, connectivity, and Euler graphs, paths, and circuits. It provides criteria to determine if a graph has an Euler path or circuit.

Uploaded by

thakur.sami2804
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 89

Module -6

Graph Theory
Degree of a Vertex − The degree of a vertex V of a graph G (denoted by deg (V)) is the number of edges incident
with the vertex V.

Vertex Degree Even / Odd

a 2 even

b 2 even

c 3 odd

d 1 odd
• Even and Odd Vertex − If the degree of a vertex is even, the vertex is called an
even vertex and if the degree of a vertex is odd, the vertex is called an odd
vertex.
• Degree of a Graph − The degree of a graph is the largest vertex degree of that
graph. For the above graph the degree of the graph is 3.
• The Handshaking Lemma − In a graph, the sum of all the degrees of all the
vertices is equal to twice the number of edges.

• The sum of the degrees of the vertices of a graph G=(V, E) is equal to twice the
number of edges in G. That is, ∑v ∈ Vd(v)=2 |E|
• TYPES OF GRAPH
Weighted Graphs
• Non-planer graph: A given graph will be known as the non-planer graph if it is
not drawn in a single plane, and two edges of this graph must be crossed each
other. The diagram of a non-planer graph is described as follows:

• Bipartite Graph
• A bipartite graph is a graph in which the vertex set can be partitioned into two
sets such that edges only go between sets, not within them.
• A graph G (V, E) is called bipartite graph if its vertex-set V(G) can be
decomposed into two non-empty disjoint subsets V1(G) and V2(G) in such a
way that each edge e ∈ E(G) has its one last joint in V1(G) and other last point
in V2(G).
• The partition V = V1 ∪ V2 is known as bipartition of G
• Example 1

Example 2
• Complete Bipartite Graph
• A complete bipartite graph is a bipartite graph in which each vertex in
the first set is joined to each vertex in the second set by exactly one
edge.
• A complete bipartite graph is a bipartite graph which is complete.
Walks, Trails, Path, Circuit and Cycle in Discrete
mathematics
• Walk:
• A walk can be defined as a sequence of edges and vertices of a graph. When
we have a graph and traverse it, then that traverse will be known as a walk. In
a walk, there can be repeated edges and vertices. The number of edges which
is covered in a walk will be known as the Length of the walk. In a graph, there
can be more than one walk.

• So for a walk, the following two points are important, which are described as
follows:
• Edges can be repeated
• Vertex can be repeated
• For example: In this example, we have a graph, which is described as follows:

• Types of Walks

• There are two types of the walk, which are described as follows:
1.Open walk
2.Closed walk

• Open Walk:
• A walk will be known as an open walk in the graph theory if the vertices at
which the walk starts and ends are different. That means for an open walk, the
starting vertex and ending vertex must be different. In an open walk, the length
of the walk must be more than 0.
• Closed Walk:
• A walk will be known as a closed walk in the graph theory if the
vertices at which the walk starts and ends are identical. That means
for a closed walk, the starting vertex and ending vertex must be the
same. In a closed walk, the length of the walk must be more than 0.

• Note: There are some important points which we should learn:


• The walk will be known as the Trivial walk if length of the walk = 0.
• In case of the open walk and closed walk, the edges and vertices can
be repeated.
• Suppose there is a graph, which is described as follows:

• Path:
• A path is a type of open walk where neither edges nor vertices are
allowed to repeat. There is a possibility that only the starting vertex
and ending vertex are the same in a path. In an open walk, the length
of the walk must be more than 0.
• So for a path, the following two points are important, which are
described as follows:
• Edges cannot be repeated
• Vertex cannot be repeated
• Circuit
• A circuit can be described as a closed walk where no edge is allowed to repeat. In
the circuit, the vertex can be repeated. A closed trail in the graph theory is also
known as a circuit.
• So for a circuit, the following two points are important, which are described as
follows:
• Edges cannot be repeated
• Vertex can be repeated
• Cycle:
• A closed path in the graph theory is also known as a Cycle. A cycle is a type of
closed walk where neither edges nor vertices are allowed to repeat. There is a
possibility that only the starting vertex and ending vertex are the same in a
cycle.
• So for a cycle, the following two points are important, which are described as
follows:

• Edges cannot be repeated


• Vertex cannot be repeated
Cut Set and Cut Vertex and Cut Edge of Graph
• Connectivity
• A graph is said to be connected if there is a path between every pair of vertex. From
every vertex to any other vertex, there should be some path to traverse. That is called
the connectivity of a graph. A graph with multiple disconnected vertices and edges is
said to be disconnected.

• Cut Vertex
• Let 'G' be a connected graph. A vertex V ∈ G is called a cut vertex of 'G', if 'G-V'
(Delete 'V' from 'G') results in a disconnected graph. Removing a cut vertex from a
graph breaks it in to two or more graphs.

• Note − Removing a cut vertex may render a graph disconnected.

• A connected graph 'G' may have at most (n–2) cut vertices.


Cut Edge (Bridge)
• A cut- Edge or bridge is a single edge whose removal disconnects a graph.
• Let G be a connected graph. An edge e of G is called a cut edge of G, if G-e (Remove e
from G) results a disconnected graph.
• When we remove an edge from a graph then graph will break into two or more graphs.
This removal edge is called a cut edge or bridge.
• Note: Let G be a graph with n vertices:
• A connected graph G may have at most (n-1) cut edges.
• Removing a cut edge may leave a graph disconnected.
• Removal of an edge may increase the number of components in a graph by at most
one.
• A cut edge 'e' must not be the part of any cycle in G.
• If a cut edge exists, then a cut vertex must also exist because at least one vertex of a
cut edge is a cut vertex.
• If a cut vertex exists, then the existence of any cut edge is not necessary.
After removing the cut set from
Cut Set the above graph, it would look
like as follows:
Edge Connectivity
The edge connectivity of a connected graph G is the minimum number of edges whose removal makes G
disconnected. It is denoted by λ(G).
When λ(G) ≥ k, then graph G is said to be k-edge-connected.
Vertex Connectivity
• The connectivity (or vertex connectivity) of a connected graph G is the
minimum number of vertices whose removal makes G disconnects or reduces
to a trivial graph. It is denoted by K(G).
• The graph is said to be k- connected or k-vertex connected when K(G) ≥ k. To
remove a vertex we must also remove the edges incident to it.
Euler Graph-Euler Path-Euler Circuit-
• An Euler graph may be defined as
• Any connected graph is called as an Euler Graph if and only if all its vertices are of even degree.
• OR
• An Euler Graph is a connected graph that contains an Euler Circuit.
• Euler Graph Example-

• Here,
• This graph is a connected graph and all its vertices are of even degree.
• Therefore, it is an Euler graph.

• Alternatively, the above graph contains an Euler circuit BACEDCB, so it is an Euler graph.
• Euler path is also known as Euler Trail or Euler Walk.
• If there exists a Trail in the connected graph that contains all the edges of the
graph, then that trail is called as an Euler trail.
• OR
• If there exists a walk in the connected graph that visits every edge of the graph
exactly once with or without repeating the vertices, then such a walk is called
as an Euler walk.
▪ Euler circuit is also known as Euler Cycle or Euler Tour.
• If there exists a Circuit in the connected graph that contains all the edges of the graph, then that circuit is called as
an Euler circuit.
• OR
• If there exists a walk in the connected graph that starts and ends at the same vertex and visits every edge of the
graph exactly once with or without repeating the vertices, then such a walk is called as an Euler circuit.
• OR
• An Euler trail that starts and ends at the same vertex is called as an Euler circuit.
• OR
• A closed Euler trail is called as an Euler circuit.
• NOTE -A graph will contain an Euler circuit if and only if all its vertices are of even degree
• Euler paths and circuits :

• An Euler path is a path that uses every edge of a graph exactly once.
• An Euler circuit is a circuit that uses every edge of a graph exactly once.
• An Euler path starts and ends at different vertices.
• An Euler circuit starts and ends at the same vertex.
Example – Which graphs shown below have an Euler path or Euler circuit ?


• There are simple criteria for determining whether a multigraph has a Euler path or a Euler circuit. For any multigraph to
have a Euler circuit, all the degrees of the vertices must be even.
• Theorem – “A connected multigraph (and simple graph) with at least two vertices has a
Euler circuit if and only if each of its vertices has an even degree.”
• Proof of the above statement is that every time a circuit passes through a vertex, it adds twice to its degree. Since it is a
circuit, it starts and ends at the same vertex, which makes it contribute one degree when the circuit starts and one when
it ends. In this way, every vertex has an even degree.
Since the konigsberg graph has vertices having odd degrees, a Euler circuit does not exist in the graph.
• Theorem – “A connected multigraph (and simple graph) has an Euler
path but not an Euler circuit if and only if it has exactly two
vertices of odd degree.”

• The proof is an extension of the proof given above. Since a path may
start and end at different vertices, the vertices where the path starts
and ends are allowed to have odd degrees.
Example 1: In the following image, we have a graph with 4 nodes. Now we have to determine whether this
.
graph contains an Euler path

The above graph will contain the Euler circuit


if the starting vertex and end vertex are the
same, and this graph visits each and every
edge only once. The Euler circuit can contain
the repeated vertex. If we begin our path
from vertex A and then go to vertices B, C, D,
and A, then in this process, the condition of
same starting and end vertex is satisfied, but
another condition of covering all edges is not
satisfied because there is one edge from
vertex D to B, which is not covered. If we try
to cover this edge, then the edges will be
repeated. So the above graph does not
contain an Euler circuit
• The above graph will contain the Euler circuit if the
starting vertex and end vertex are the same, and this
graph visits each and every edge only once. The Euler
circuit can contain the repeated vertex. So if we begin
our path from vertex A and then go to vertices B, C, D,
F, B, E, D and then A, in this process, the starting and
end vertex are the same. The path (A, B, C, D, F, B, E, D,
and A) also covers all the edges only once, and it does
not contain any repeated vertex except the starting
one. So the above graph contains an Euler circuit, which
is described as follows:
• Euler circuit = ABCDFBEDA
In the following image, we have a graph with 5 nodes. Now we have to determine whether this graph contains an Euler path and

.
circuit

• The above graph will contain the Euler circuit if the starting
vertex and end vertex are the same, and this graph visits each
and every edge only once. The Euler circuit can contain the
repeated vertex. If we begin our path from vertex A and then go
to vertices C, D or C, E, then in this process, the condition of
• The above graph will contain the Euler path if each edge of this same start and end vertex is not satisfied, but another
graph must be visited exactly once, and the vertex of this can be condition of covering all edges is not satisfied. This is because if
repeated. So if we begin our path from A, then we can only go to we follow the path (A, C, D or A, C, E), many edges are repeated
vertex A, C, D or B, C, E. That means this graph cannot visit all in this process, which violates the Euler circuit. So if we try to
the edges only once. So the above graph does not contain an cover all the edges and vertices, the edges will be repeated. So
Euler path the above graph does not contain an Euler circuit .
Hamiltonian Graph Example-
• The following graph is an example of a Hamiltonian graph.

Here,
This graph contains a closed walk ABCDEFA.
It visits every vertex of the graph exactly once except starting vertex.
The edges are not repeated during the walk.
Therefore, it is a Hamiltonian graph.

Alternatively, there exists a Hamiltonian circuit ABCDEFA in the above graph, therefore
it is a Hamiltonian graph
Hamiltonian Path
• If there exists a walk in the connected graph that visits every vertex of the graph exactly once without repeating the edges,
then such a walk is called as a Hamiltonian path.
OR
If there exists a Path in the connected graph that contains all the vertices of the graph, then such a path is called as a
Hamiltonian path.
• NOTE: In Hamiltonian path, all the edges may or may not be covered but edges must not repeat.
Hamiltonian Circuit
• Hamiltonian circuit is also known as Hamiltonian Cycle.
• If there exists a walk in the connected graph that visits every vertex of the graph exactly once (except starting vertex)
without repeating the edges and returns to the starting vertex, then such a walk is called as a Hamiltonian circuit.
OR
• If there exists a Cycle in the connected graph that contains all the vertices of the graph, then that cycle is called as a
Hamiltonian circuit.
OR
• A Hamiltonian path which starts and ends at the same vertex is called as a Hamiltonian circuit.
OR
• A closed Hamiltonian path is called as a Hamiltonian circuit.

You might also like