Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Discrete Mathematics: Jemsheena P S Assistant Professor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 68

DISCRETE MATHEMATICS

JEMSHEENA P S
ASSISTANT PROFESSOR
Module III

Graph Theory
Remark:

We shall assume throughout that both the sets V and E of a


graph are finite.
It would be convenient to write a graph G as (V, E), or simply
as G.

If an edge x∈ E is associated with an ordered pair


(u, v) or an unordered pair (u, v) where u, v ∈V, then
we say that the edge connects or joins the nodes u
and v.
Adjacent nodes

Any pair of nodes which are connected by an edge in a graph is


called adjacent nodes.
TYPES OF GRAPH

There are different types of graphs


Null Graph
In a graph a node which is not adjacent to any
other node is called an isolated node. A graph
containing only isolated nodes is called a null
graph. In other words, the set of edges in a null
graph is empty .

A trivial graph is a graph with only one vertex.


Directed or Digraphs / Undirected Graph. / Mixed Graph
A city map showing only the one-way streets is an
example of a directed graph in which the nodes are
the intersections and the edges are the streets.

A map showing only the two-way streets is an


example of an undirected graph.

A map showing all the one-way and two-way


streets is an example of a mixed graph
Incident
Let (V, E) be a graph and let x∈E be a directed edge associated with the ordered pair of
nodes (u, v). Then the edge x is said to be initiating or originating in the node u and
terminating or ending in the node v. The nodes u and v are also called the initial and
terminal nodes of the edge x .An edge x∈ E which joins the nodes u and v, whether it
be directed or undirected, is said to be incident to the nodes u and v.

LOOP
An edge of a graph which joins a node to itself is called a loop (sling) . The direction of
a loop is of no signifi cance; hence it can be considered either a directed or an
undirected edge.

Parallel edges
In some directied as well as undirected graphs, we may have certain pairs of nodes
joined by more than one edge, Such edges are called parallel.
In Fig. 5-1.2a there are two parallel edges joining the nodes 1 and 2,
two parallel edges joining the nodes 2 and 3, while there are two
parallel loops at 2.
In 5-1.2b there are two parallel edges associated with the ordered pair
(v₁,v₂).
Note that there are no multiple edges in the graph of Fig. 5-1.2c.
Simple Graph
A graph is called simple graph/strict graph if the graph
is undirected and does not contain any loops or
multiple edges.
Multi-Graph
If in a graph multiple edges between the same
set of vertices are allowed, it is called Multigraph.
In other words, it is a graph having at least one
loop or multiple edges.
Degree

Degree of a Vertex − The degree of a vertex V of a graph G (denoted


by deg (V) I s the number of edges incident with the vertex V.

Degree of a Graph − The degree of a graph is the largest vertex


degree of that graph.
A simple result involving the notion of the degree of nodes of a graph in this
the sum of the degrees (or total degrees in the case of a directed graph) of
all the nodes of a graph must be an even number which is equal to twice
the number of edges in the graph
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.

The total degree of an isolated node is 0.

The Handshaking Lemma − In a graph, the sum of all the degrees


of all the vertices is equal to twice the number of edges.
WEIGHTED GRAPH

A graph in which weights are assigned to every edge is called


a weighted graph.where weight is the value that assigned to
every edge.
Sometimes weight is called length or cost of the edge

A graph representing a system of pipelines in which the weights


assigned indicate the amount of some commodity transferred
through the pipe is an example of a weighted graph.
Similarly, a graph of city streets may be assigned weights according
to the traffic density on each street,
ISOMORPHISM

If two graphs G and H contain the same number of vertices connected in the
same way, they are called isomorphic graphs (denoted by G≅H).
You can say given graphs are isomorphic
if they have:
Equal number of vertices.
Equal number of edges.
Same degree sequence
Same number of circuit of particular length
Show that the digraphs given in Fig. 5-1.5a and b are isomorphic.
Show that the digraphs given in Fig. 5-1.6 a and b are isomorphic.
Show that the digraphs in Fig. 5-1.7 are not isomorphic.
Subgraph

A subgraph is a graph whose vertices and edges are included in


the vertices and edges of another graph (the supergraph).
If a simple digraph G (V, E) is reflexive, symmetric, and transitive, the
the relation E must be an equivalence relation on V, and hence V can
be partitioned into equivalence classes. If we consider any such
equivalence class of nodes along with the edges that join these
nodes, we have subgraphs of G. These subgraphs are such that every
node in the subgraph is adjacent to every other node of the subgraph.
However, no node of any one subgraph is adjacent to any node of
another subgraph. In this sense the graph G is partitioned into
subgraphs which are disjoint
Complete Graph (Kn)
Complete Graph (Kn)
Self Complimentary Graph
Self Complimentary Graph
The Handshaking Lemma − In a graph, the sum of all the degrees
THEOREMS of all the vertices is equal to twice the number of edges.
PROOF
PROOF
THEOREMS
Show that the Sum of indegrees of all the nodes of a simple digraph is equal to
the sum of outdegrees of all its nodes and that this sum is equal to the number
of edges of the graph.

Proof:
In a simple digraph every edges have exactly one terminal node and
one initail node. That means the indegree of terminal vertex is equal
to the outdegree of initial vertex
Similarly we can say that all outdegree of initial vertices is equal to all
indegree of terminal vertices. IE the sum of indegrees of all the nodes
of a simple digraph is equal to the sum of outdegrees of all its nodes .

By Hand shaking lemma, we have − In a graph, the sum of


all the degrees of all the vertices is equal to twice the
number of edge
and also we have
indegree of vertex + outdegree of vertex= 2(Number of edges)
,here indegree of all nodes = out degree of all nodes=say q
Then by handshaking lemma
q+ q =2( Number of edges)
2q =2( Number of edges)
ie q = Number of edges
Hence Indegree of all nodes = Out degree of all nodes=
Number of edges
Show that a complete digraph with n nodes has the
maximum number of edges viz., n(n- 1) edges, assuming
that there are no loops
Proof
THANK YOU

You might also like