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

graph

In discrete mathematics, particularly in graph theory, a graph is a structure consisting of a set of objects where some pairs of the objects are in some sense "related". The objects are represented by abstractions called vertices (also called nodes or points) and each of the related pairs of vertices is called an edge (also called link or line).

Uploaded by

btechcseamar2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

graph

In discrete mathematics, particularly in graph theory, a graph is a structure consisting of a set of objects where some pairs of the objects are in some sense "related". The objects are represented by abstractions called vertices (also called nodes or points) and each of the related pairs of vertices is called an edge (also called link or line).

Uploaded by

btechcseamar2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

properties.

developed into
a
graph theory has
In the past few decades,
a variety of fields
in
analyzing problems
tool for
Systematic
including combinatorics. areas
theory is employed in many
times Graph
In modern physical sciences,
engineering,
such as communications,and other fields.
social sciences models in computer
linguistics, useful
are also some
ofthe most
Graphs
science.

BASIC PROPERTIES

VDefinitions of two types of


graph is composed vertices
a simple
VA graph or
are called
elements
a finite set V, whose called edges.
objects. It
has vertices
E of pairs ofdistinct
or nodesand
a set by
V and edge set E is denoted

with vertex set


A graph

G (V,E)
|
355
AD
ATHEMATIcs
356

Adjacent nodes
which are joined by an edge in a
Any pair of vertices graph
an adjacent notes.
is known as

Asolated nodes
In a graph a node which is not adjacent to any othernode:
called an isolated node.

Note
1. Graphs may be represented pictorially using points or

dots for vertices and curved or straight lines for edoes


between the vertices.

2. Edge joining two vertices is said to be incident on both

the vertices.

Order of the graph


The number of elements in the vertex set V of graph

G(V, E)is called order of the graph.

If e= (a, b) be edge between a and b then e i


vertices
incident on both nodes a and b which are end vertices for the
edge e.

Vertices a and b are adjacent vertices.

Self-loop is an edge incident on same vertex twice.

eg Let V={a, b, c ,d}


E= {(a, b).(a,
c), (b,c). (c,d), (b, d ),(d, b)}
is a self-loop, then graph G= (V,E} has pictorit
representation as follow :

d C

Figure 9.1
TO GRAPH THEORY
INTRODUCTION
357

The pictorial representation


of a graph is not unique.
The number of vertices and
edges in a graph are denoted as

IM and \El respectively.

l. GGive the various types


Question graphs. of

Solution.
Following are

Graph
the various types of graphs :
Directed
A graph in which every edge is directed is called a directed
graph or digraph.
In case of a directed graph an edge (u,v) e E is said to be

from vertex u to vertex V, and joins u to v.

Every edge in a directed graph is directed.

The directed graphs are given as follows :

2 3 2 3

Figure 9.2

In 2nd Ngure edges x,X, X are associated with ordered

pairs (1, 2), (2, 3) and (3,1)respectively.

Undirected Graph
undirected is
every edge is
A graph G=<V,E> inwhich
known as undirected graph.
to
E E is said
In case of undirected graph, and edge (u, v)
join u and v.

The undirected graphs are given below:


358 ADVANCED DISCRETE
MATHEMATICS

talogab

2 X2 3 bobi
() (üi)

Figure 9.3

In the figure (ii) the edges x y and X3 are associated with

the unordered points (1, 2), (2, 3)


and (3, 1) respectively.
In figure (ii) node l is adjacent to

Mixed graph
the nodes 2 and 3.
A graphG=<V, E> in which some edges are directed and
some are undirected, is called a mixed graph.

Figure 9.4

The above figure represents the mixed graph.


This could be considered as either directed or
graph. undirected

Self loop

An edge of a graph which joins a


vertex to itself is known as
selfloop or sting.
That isan edge associated with the
unordered pair (v;, v) where
v;e Vof agraph G=(V,E) is called a self loop.
INTRODUCTION TO GRAPH
THEORY
359
Its
direction has no significance so it can be
or an undirected edge. taken as directed
Thefigure given
below represents a
loop incident on the
3 vertex

2 3
Figure 9.5

Note

Incase of directed edges,the two possible edges between a


pair of vertices or nodes which are opposite in direction are taken
as distinct.

Símple Graph
Ifthere more than one edge between a pair of vertices
is no
(no more thanone directed edge in the case of a directed graph)

hen such a graph is known as simple graphs.

2
3 4
Figure 9.6
360 ADVANCED DISCRETE
MATHEMATICS

Non-simple graph
graph which not a simple is called a
A is non-simple
graph.

(Non-simplegraphs)

Figure 9.7

Multigraph
Any graph which contains some parallel edges is called a

multigraph.

Inother words, a graph may be defined to be a multigraph


without multiple edges or loops.

3
(Multigraph)

Figure 9.8

Here G= {(1, 2). (2. 1). (2, 3). (3, 1)).


Weighted graph
Weighted graph is a graph in which weights are assigned u
every edge.
INTRODUCTION TO GRAPH THEORY
361

1.5

2.3
2.5

5.3
(Weighted graph)

Figure 9.9

Null graphs
A graph which contains only isolated nodes is called a null
graph.
In other words, the set of
edges in a null graph is empty.

V2
(Null graph)

Linear graph

lies
A graph
along
is

a line -
a linear graph if its

is
each edge joining
a linear graph.
vertices

Regular graph
Ifeach vertex of a graph has same degree, the graph
is called
a regular graph each vertex has degree
regular graph. If in
k, it
isknown as k-regular
graph. e.g.

Figure 9.10
AD TICS
362

graphs.
are regular 2 and the vertices
each vertex is of degree of
In first graph
have degree 3.
second graph
graph respectively.
These are 2-regular and 3-regular

Finite graph
A graph is said to be finite graph if its sets of vertices and

edges are finite sets.

Degree of vertex
defined as the number of edges
The degree of a vertex V is
the vertex v as an
incident on it or the number of edges having

end point.
Sometime valency word is also used for degree.
It is written as deg v and it cannot be negative.

Isolated vertex

Vertex of degree zero is called isolated vertex.

Pendent vertex
Vertex of degree one is called pendent vertex.
Degree of a self-loop is wo as it is twice incident on a vertex.

Odd vertex
A vertex is called an odd vertex if its degree is odd.lae
Even vertex

A vertex is called an even vertex if it has even degree.

d C

Figure 9.11

Here vertices a and c are even whereasb and d are odd.


The degree sequence of the general graph in the above
figure is

(6,5, 5, 5, 5, 5, 5, 3, 2,2, 1, 1, 1, 1).


Theoremn l.State and prove Euler's theorem.
Statement. LetG be a general graph and d, ,
d2 y.,d,be the

degrees of allthe vertices of G. Then the šum d, +d,t..td,


is an even number, Further the number of vertices of G with
odd degree is even.
Proof. Let G (V, E) be a general graph.
Each edge (x, y} in E contributes 1 to degree of x and l to
degree to y.
INTRODUCTION TO GRAPH THEORY 365

In the case of a loop, fx, x} contributes 2 to degree ol A

Therefore in each case an edge contributes 2 to the sum Ol

degrees.

Therefore +
sum of degrees d, d, +...+d,=2 X number OT
edges which is an even number.
Further, let V,be the set of vertices with even degrees and
V, be the set of vertices with odd degrees.

Then d +d,t.tdh= d, + X d,
d,e V, de V,
X d=(d +d, t.+d,)- S d,
d,e V

R.H.S of above equation is an even number as both

(d,+d,
t..+ d, ) )
and are even.
d,e V

Therefore) d, is even number.


de V,
This is possible only if number of terms in the summation
IS evenas sum of odd numbers is even only if number of integers
1S
even.

Therefore number of vertices with odd degree is even.


j
Example 1. At a party, alot hand shaking take place between
of

the
guests. Show that, atthe end the party, thenumber of guests
of

who have
shaken hands an odd nunber of times is even.
Solution. The hand shaking party can be modeled by a
at the
multigraph.
The are the guests. Each time two guests shakehands
We joinvertices
themby new The a multigraph to
which
Wecan edge. result is

apply Euler' s theorem.


Figure 9.18|

sequence of
both G and G is (
(3,3, 3, 3,2, 2, 2, 2)
Degree
are not isomorphic.
but these graphs to one of
so 2
that a must correspond
Since a is of degree
only degree two vertices in
2,3, 6 and 7
because these are the

G. any of these, because all of

to
a cannot correspond
But

7 are adjacent to vertices of degree


which 3 is not
2, 3,6 and
true for a.
sequence
Definition.Let G= (V, E)be ageneral graphs. A of

m edges oftheformn

of length m, and this walk joins the vertices X


is calledawalk

and x,,.Walk can also be denoted by

A walk is said to be closed walk ifxo =m :


A walk is said tobe open walk if x +Xm
371
CS INTRODUCTION TO GRAPH THEORY

Trail

If a walk has distinct edges, then it is called a trail.


Path

VIfa walk has distinct vertices (except, possibly, x0 =m)»


then the walk is called a path.
A closed path is called a cycle or circuit.

Note

of a cycle in a graph (not general)is at least three.


Length

Erample 5. Consider the generalgraph shown in the figure below


and write itsstatements
372 ADVANCED
DISCRETE
MATHEMATICS
Connected graph
t Or
Define connected graph.
A general graph G is said to be connected
grraph,if f
pair of vertices x and y,there exists a for each
walk joining x
and
If a general graph is not connected then it is
called
graph. disconnected
In a disconnected general graph there is at least
least one pairof
vertices x and y such that there is no
walk with
starting and
points x and y. end

e.g. The following figures (), (1) represent the


and connected graph : disconnected

e
b C
f
() (i)
(Disconnected graph)
(Connected graplh)

Figure 9.20

The graph
drawn in figure (i) is There is no
disconnected.
walk from vertex a to vertex d.

Definition. Shortest length


of all walks joining xcand y isdenoted
byd (x,y) and is called the
distance between x and y.
d (x, x) =0foreach vertex x.
Note

A walk joining x and y of length d (x, y) is a pah.


Theoren 3. Prove thatthe edges Vertiees
of a trail.joining two
efth
Xo and Xm can be partitioned into parts so
that one ppart
theothet
partition determines a chain joining xo
and Xn and
ina
What is the relation ofadjacency and incidence
Ouestion 5.

graph G
?
representation
Solution.Adjacency matrix
G consists of n vertices then the
If an undirected graph

adjacency matrix of graphis ann Xnmatrix A =[a,] and defined

by
if;,v is an edge i.e v; is adjacent to v;
1,

0, if there is no edge between v; and v;

If there exists an edge between vertex V; and V;, where iis a

row and jis a column then value of a; 1. d loiue =


If there is no edge between vertex v;and v; ,then value of

aj=0.
Incidence matrix representation
If an undirected graph consists of n vertices and m edges, then

the incidence matrix is an m Xm matrix C= [C;l defined by


(1, if the vertex v, incident by edge e;
0,otherwise
There is a row for every vertex anda column for every edgein
the incidence matrix.

The number of one'sin an


incidence matrix of undirected graph
(withoutloops)is equalto the sum of
of degrees of
of all the vertiçes
the graph.
TO GRAPH THEORY 383
INTRODUCTION

Example
figurebelow
9.

:
.Findthe adjacency matrix

B
of graph G sshown in the

A C
Figure 9.25

Solution. Since the graph G consists of four vertices.

Therefore, the adjacency matrix will be a 4x4 matrix.


The adjacency matrix 1s as follows :t otosibA otolo
A B. C D

A 0
M= B 10 1. 1

C
ban D Lvsl-ll 0

Erample 10.Consider the undirected graph G as shown in the


igure. Find its incidence matrix.

V3

V2
es

VA
384
ADVANCED DISCRETE
MATHEMATICS
Solution. The undirected graph consists of four vertices
edges. andfve

Therefore, the incidence matrix is an 4X5


shown in the figure below : matrix, whick,

10 0 1 ()

M
01 1I 0 0
V3 11 0 0

V4 00 1

Question 6. Define adjacency and incidence matrix


representation ofdirected graph.
Solution. Adjacency matrix representation
Ifadirected graph Gconsists ofn vertices, then the
adjaceng
matrix of graph is an n X n matrix A a;] defined by =
1,ifv; , v; is an edgei.eif v;is initial vertex and

V;1s final vertex

0,if there is no edge between v; and v;


Note

The number of one's in the adjacency matrix of a directed


graph is equal to the number of edges.

Incidence matrix representation


If a directed graph consists of n vertices and m edges then
the incidence matrix is an n Xn matrix C= [c,, defined by

1if v;is initial vertex


of edgee;
Cj=-1if v is final vertex of edgee;
0if v; is not incident on edge e,
The numberrof one's in the
equal to
the
incidence matrix is

number of edges in the graph.


TOGRAPH THEORY
NTRODUCTION 305

I1. Consider the directed graph G


Erample shownin the figure
Find its incidence matrix M.
below.

V3

Figure 9.27

Solution. The directed graph consists of four vertices and five

edges.

Therefore, the incidence matrix is a 4x5 matrix which is

shown as follows:

e, e e ey eg

Vi f -1 0 00 -1

1 1 0 -1 0
M= 00
0 -1 1
V3
VA 00 11 -1

with four vertices and which is


Ekample 12. Draw a
multigraph

5-regulargraph.
is
with four vertices
Solution. Multigraph

You might also like