Upload
sanjeev-malik
View
213
Download
0
Embed Size (px)
DESCRIPTION
File
Citation preview
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:286
Unit13 DirectedGraphsStructure
13.1 Introduction
Objectives
13.2 DefinitionsandExamples
13.3 Binaryrelationasadigraph
13.4 EulersDigraphs
13.5 MatrixRepresentationofDigraphs
SelfAssessmentQuestions
13.7 Summary
13.8 TerminalQuestions
13.9 Answers
13.1Introduction
Thegraphssofarstudiedareundirectedgraphs(nodirectionwasassignedto
theedgeinagraph).Inthisunitweshallconsiderdirectedgraphs(graphsin
whichedgeshavedirections).Manyphysicalsituationsrequiredirectedgraphs.
Theapplicationsofdirectedgraphsareinthestreetmapofcitywithoneway
streets, flow networks with valves in the pipes, and electrical networks.
Directedgraphsintheformofsignalflowgraphsareusedforsystemanalysis
incontroltheory.Mostoftheconceptsandterminologyofundirectedgraphs
are also applicable to directed graphs. In this unit we see the some of the
propertiesofdirectedgraphsarenotsharedbyundirectedgraphs.
Objectives
Attheendoftheunitthestudentmustbeableto:
i) Writetheindegreeandoutdegreeofavertex.
ii) Observethedifferentmatrixrepresentationsofdigraphs.
iii) KnowthetournamentsandEulersdigraphs..
iv) Applythepropertiestoflows,networkandtrafficproblem.
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:287
13.2DefinitionsandExamples
13.2.1Definition:
A directed graph (or) a digraph D consists of a nonempty set V
(theelementsof V arenormallydenotedby v1,v2,)andaset E(the
elementsof Earenormallydenotedby e1,e2,.)andamapping y that
mapseveryelementof E ontoanorderedpair(vi,vj)ofelementsfrom V.
Theelementsof V arecalledasverticesornodesorpoints. Theelements
of E arecalledasedgesorarcsorlines.If e E and vi,vj V such
that y (e)=(vi,vj),thenwewrite e = jivv .Inthiscase,wesaythat e
isanedgebetween vi and vj.(Wealsosaythat e isanedgefrom vi to
vj).(Wealsosaythat e originatesat vi andterminatesat vj).(Anedge
from vi to vj isdenotedbyalinesegmentwithanarrowdirectedfrom vi
to vj).
13.2.2Note
i) Adirectedgraphisalsorefereedtoasanorientedgraph.
ii) LetD beadirectedgraphande =vu .
Then we say that e is incident out of the vertex v, and incident into the
vertex u.Inthiscase,wesaythatthevertex v iscalledtheinitialvertex
andthevertex u iscalledtheterminalvertexofe.
13.2.3 Example
ThegraphgiveninFigure13.2.3isadigraphwith5verticesandtenedges.
e9
v2
e10
e5
e7
v1
e8e6
v4
v3
v5
e1e4
e3 e2 Fig .13.2.3
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:288
Here v5 istheinitialvertexand v4 istheterminalvertexfortheedgee7.
Theedgee5 isaselfloop.
13.2.4Definition
i) The number of edges incident out of a vertex v is called the out
degree(or)outvalenceof v.Theoutdegreeofavertex v isdenoted
by d+(v).
ii) The number of edges incident into v is called the indegree (or) in
valanceof v. The indegreeofavertex v isdenotedby d(v).Note
thatthedegreeof v isequaltothesumofindegreeandoutdegreeof
v, foranyvertex v inagraph.(Insymbols, wecanwriteasd(v)=
d+(v)+d(v)forallvertices v).
13.2.5Example
ConsiderthegraphgiveninFig.13.2.3.
i) Here d+(v1)=3, d+(v2)=1, d+(v3)=1, d+(v4)=1, d+(v5)=4. d(v1)=1,
d(v2)=2, d(v3)=4,d(v4)=3, d(v5)=0.
ii) d(v1)=4=3+1=d+(v1)+d(v1) d(v2)=3=1+2=d+(v2)+d(v2),
andsoon.
13.2.6 Problem
Let D be a directed graph. Show that the sum of all indegrees of the
verticesof D, isequal tothesumofalloutdegreesof theverticesof D
andeachsumisequaltothenumberofedgesin D.
[Inotherwords, =
+ n
1ii )v(d =
=
- n
1ii )v(d =qwhereqisthenumber
ofedgesin D,and{v1,v2,,vn}isthesetofallverticesin D].
Solution:Let D beanydigraphwith n verticesandqedges.Whenthe
indegreesofverticesarecounted,eachedgeiscountedexactlyonce.
[Thisis,becauseeveryedgegoestoexactlyonevertex].
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:289
So =
- n
1ii )v(d =q ...(i)
Similarly, when the outdegrees of vertices are counted, each edge is
countedexactlyonce.[Thisis,becauseeachedgegoesoutofexactlyone
vertex].
So =
+ n
1ii )v(d =q .(ii).
From(i)and(ii),wegetthat =
+ n
1ii )v(d =
=
- n
1ii )v(d =q.
13.2.7Example
Consider thedigraph inFig.13.2.3.Here thenumberofvertices n = 5,
andthenumberofedgesq=10.
Now =
+ n
1ii )v(d = d
+(v1)+d+(v2)+d+(v3)+d+(v4)+d+(v5)=3+1+1+1
+4=10=q
Also =
- n
1ii )v(d = d
(v1)+ d(v2)+d(v3)+d(v4)+d(v5)=1+2+4+
3+0=10=q.
Therefore =
+ n
1ii )v(d =
=
- n
1ii )v(d =q=thenumberofedges.
13.2.8Definitions
i) Avertexvissaidtobeanisolatedvertexif theoutdegreeof v and
theindegreeof v areequaltozero.(Insymbols,d+(v)=0=d(v)).
ii) Avertex v inadigraph D issaid tobeapendentvertex if it isof
degree 1. (Inotherwords,avertex issaid tobeapendentvertex if
thedegreeof v = d+(v)+d(v)=1).
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:290
iii) Twodirectededgesaresaid tobeparalleledges if theyaremapped
ontothesameorderedpairofvertices.
iv) In other words, two directed edges e and f are said to be parallel
edges if both e and f originates at the same vertex, and also
terminatesatthesamevertex.(InthegraphgiveninFig.13.2.3,the
edges e8, e9,ande10 areparalleledges.Theedgese2 and e3 are
notparallel).
13.2.9Note
i) Let D be directed graph. If we disregard the orientation (that is,
direction)ofeveryedgein D, thenwegetanundirectedgraph.The
undirectedgraphobtained(inthisway)from D iscalledtheundirected
graphcorrespondingto D.
ii) SupposeHisanundirectedgraph.ToeachedgeofHwecanassign
adirection.ThenthedigraphobtainediscalledanorientationofH.(or
adirectedgraphassociatedwithH).
13.2.10Definition
Let D1and D2betwodigraphs.Thesetwographsaresaid tobe isomorphic if
i) thecorrespondingundirectedgraphsareisomorphic,and
ii) thedirectionsofcorrespondingedgesmustbesame.
13.2.11Example
i) Consider the directed graphs D1 and D2 given. The two digraphs D1
and D2 arenot isomorphic(becausethedirectionof theedgee4 in
D1 isdifferentfromthedirectionoftheedgee4 in D2).
e1 e4
e5
e2
e3
e6
e1 e4
e5
e2
e3
e6GraphD1 GraphD2
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:291
ii) Note that the undirected graphs corresponding to D1 and D2 are
isomorphic.
13.2.12Definition
Adigraph that hasneither selfloopsnorparallel edges is calleda simple
digraph.
Inotherwords, adirectedgraph D is said tobea simpledigraph if the
correspondingundirectedgraphisasimplegraph.Thetwodigraphsgiven
inExample13.2.11aresimpledirectedgraphs.
13.2.13Definition
i) Digraphs that have at most one directed edge between any pair of
vertices,butareallowed tohaveselfloopsarecalled theasymmetric
(or)antisymmetricdigraphs.
ii) AdigraphD issaidtobeasymmetricdigraphifforeveryedge(a,b)
in D thereisalsoanedge(b,a)in D.
iii) A digraph that is both simple and symmetric is called a simple
symmetricdigraph.
iv) A digraph that is both simple and asymmetric is called simple
asymmetricdigraph.
v) A simple digraph is said to be a complete symmetric digraph if it
satisfiesthefollowingcondition:"Givenanytwoverticesv1andv2 there
correspondexactlyoneedgedirectedfrom v1 to v2".
vi) A complete asymmetric digraph (or) tournament (or) a complete
tournament. is an asymmetric digraph in which there is exactly one
edgebetweeneverypairofvertices.
13.2.14Example
Inthefollowing,
i) ThegraphD1 isnotasymmetric since thereexist twodirectededges
between v1 and v2.
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:292
ii) ThegraphD2 isasymmetric.
iii) Anynullgraphisasymmetric.
iv) ThedigraphD3 isacompletesymmetricdigraph.
13.2.15Observation:
i) A tournament (means, complete asymmetric digraph) of n vertices
contains ( ) 2
1nn - edges.
Thedirectedgraphgivenin13.2.11isatournament.Inthisgraph,the
numberofverticesis n=4.
Thenumberedgesis6= ( ) 2
144 - =
( ) 2
1nn - .
ii) Acompletesymmetricgraphof n verticescontains n(n1) edges.
The digraph given in 13.2.14, D3 is a complete symmetric graph on
n =4vertices.
Inthisgraph,thenumberofedgesis12=4(41)= n(n1).
13.2.16Definition
Adigraph D issaidtobebalancedif the indegreeof v isequal totheout
degreeof v foreveryvertex v in D.Inotherwords,adigraph D issaidto
bebalancedifd+(v)= d(v)forallvertices v inthedigraph D.Abalanced
digraph isalsoknownas pseudosymmetricdigraph(or)anisograph.
v2v3
v1
G1 G2
G3
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:293
Abalanceddigraphissaidtobearegulardigraph if itsatisfythefollowing
twoconditions:
i) Theindegreesofalltheverticesof D areequaland
ii) Theoutdegreesofalltheverticesof D areequal.
13.3Binaryrelationasadigraph
Let X beaset.Representtheelementsof X bythesymbols x1,x2,
Supposethat R isarelationon X.Werepresenttheelementsof X as
verticesanddrawadirectededgefrom xi to xj if(xi,xj) R.Thenweget
adirectedgraphwhichrepresentsthegivenrelation R on X.
13.3.1Example:
Considertheset X={3,4,5,7,8}andtherelation(R,>)on X.
Then R={(8,3),(8,4),(8,5),(8,7),(7,3),(7,4),(7,5),(5,4),(4,3)}
={(x,y)/ x>y, x,y X}.
Thegraph D giveninbelowrepresentsthisrelation R on X.
Itisclearthat,everybinaryrelationonafinitesetcanberepresentedbya
directedgraphwithout parallel edges. Conversely, if a directed graph D
withoutparalleledgeswasgiven,thentherecorrespondsabinaryrelation
onthesetofvertices.
57
3
4
8
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:294
13.3.2Definition:
i) Let X beaset,and R arelationon X(thatis, R X X).If(x,y)
R, thenwealsowrite xRy.Therelation R issaidtobereflexive
relation ifxRx forall x X.
(Notethatthedigraphsofareflexiverelationhaveaselfloopatevery
vertex).
Wecalladirectedgraphrepresentingareflexivebinaryrelationonits
vertexsetasreflexivedigraph.
A digraph in which no vertex has a selfloop is called an irreflexive
digraph.
ii) Let X beaset,and R arelationon X.Wesaythat R is symmetric
if a,b X, aRb bRa. Notethatadirectedgraph representinga
symmetricrelationisasymmetricdigraph.
13.3.3 Example
ThegraphgiveninD1 isthedigraphofarelationwhichissymmetricbutnot
reflexive.Thisrelationisontheset{x1,x2,x3,x4}.Someauthorsrepresent
thisrelationbytheundirectedgraphgiveninD2.NotethatinthegraphD2
onlyoneundirectededgetakenbetweenapairofvertices(thatarerelated
undertherelationR).
13.3.4Definition:
Let X beaset, and R a relationon X.The relation R issaidtobe
transitive if a, b, c R, aRb, bRc aRc. A digraph representing a
transitive relation is called a transitive digraph. [Observe that the graph
x1 x2
x3 x4
GraphG1
x1 x2
x4 x3
GraphG2
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:295
givenin13.3.1isatransitivedigraph].
Let X beaset,and R arelationon X.
i) The relation R is said to be an equivalence relation if it is reflexive,
symmetricandtransitive.
ii) Adigraphrepresentinganequivalencerelationiscalledanequivalence
digraph.
13.3.5Example
ConsiderthebinaryrelationR(=Congruentmodulo3)definedontheset
X={10,11,12,13,14,15,16,17,18,19,20}.
Wecanobservethatthisrelation Ron X isanequivalencerelation.The
related equivalencegraphwas given.We are use undirected graph here.
Observe that the set of vertices is divided into three disjoint equivalence
classes.Eachofthesesetsformseparatecomponents.Eachcomponentis
anundirectedsubgraph(duetosymmetry, weareusingundirectedgraph
withaselfloopateachvertex).Alsonotethat(sinceanytwoelementsinan
equivalenceclassarerelated)anytwovertices insidethecomponentwere
joinedbyanedge.
13.3.6Definition
LetXbeaset,andRisabinaryrelationonX.ThisrelationRonXmaybe
representedbyamatrix.Thismatrix iscalledasrelationmatrix. It isa (0,1)
nnmatrix,where n isthenumberofelementsintheset X ={x1,x2,, xn}.
11 14
17 20
)3(mod2
10 13
16 19
)3(mod1
15
12
18
)3(mod0
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:296
Therelationmatrix( ija )isdefinedasfollows:
ija =1if xiRxj.
=0otherwise.
13.3.7 Example:
The relation matrix of the relation R (" usual grater than") on the set
X={3,4,5,7,8},istheMatrix
13.3.8Definition:
i) Apath v0e1v1e2v2envn issaidtobea directedpathifek isoriented
from vk1 to vk foreach1 k n.Apathwhichisnotadirected
pathiscalledasemipath.Inadirectedgraph,theword"path"refers
toeitheradirectedpathorasemipath.
ii) Let D beadirectedgraph.Adirectedwalk(in D)fromavertex v to
u isanalternatingsequenceofverticesandedgesbeginningwith v
andendingwith u such that eachoneof theedges isoriented (or
directed)fromthevertexprecedingittothevertexfollowingit.[Inother
words,awalk v0e1v1e2v2envn intheundirectedgraph D issaidto
beadirectedwalkif ek isorientedfrom vk1 to vk forall1 k n].
13.3.9Example:
ConsiderthegraphgivenintheFig13.2.3.
i) Thepath v5e8v3e6v4e3v1 isadirectedpathfrom v5 tov1.
ii) Ifwedisregardtheorientationin D,thenv5e7 v4e6 v3e1v1 isapath.
Observethatitisnotadirectedpath.Soitisa"semipath".
34758
34
7
5
8
01111
00011
01011
00001
00000
.
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:297
Sinceadirectedwalkisawalk,wehavethatnoedgeappearsmorethan
once(butavertexmayappearmorethanonce).
13.3.10Definition:
Let D beadigraph.
i) Awalkwhichisnotadirectedwalkiscalledassemiwalk.Weusethe
term"walk"tomeaneitheradirectedwalk(or)asemiwalk.
ii) Acircuit(inthecorrespondingundirectedgraph)v0e1v1e2v2envn issaid
tobea directedcircuit if ek isorientedfrom vk1 to vk forall1 k n.
iii) Acircuitwhichisnotadirectedcircuitisasemicircuit.
13.3.11Example:
Considerthedigraph D given13.2.3.
i) Thecircuit v1e1v3e6v4e3v1 isadirectedcircuit.
ii) Thecircuit v1e1v3e6v4e2v1 isnotadirectedcircuit.Soitisasemicircuit.
Inundirectedgraphs,wedefinetheconnectednessbyusingthenotion"path".
Astherearetwodifferenttypesofpaths(namelydirectedpath,semipath) in
digraphs,wehavetwodifferenttypesofconnectednessinthedigraphs.
13.3.12Definition
Let D beadigraph.
i) D issaidtobestronglyconnectedifthereexistsatleastonedirected
pathfromeveryvertextoeveryothervertex.
ii) D issaidtobeweaklyconnectedifitscorrespondingundirectedgraph
isconnected,but D isnotstronglyconnected.
iii) Wesaythat D isconnectediftheundirectedgraphcorrespondingto
D is connected. So the word "connected digraph" refers to both
stronglyconnecteddigraphandweaklyconnecteddigraph.
iv) If D isnotconnected,thenwesaythat D isadisconnectedgraph.
13.3.13Example:
ConsiderthedigraphsD1 and D2 giveninthefollowing.
i) ThegraphD1 isastronglyconnectedgraph.
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:298
ii) In the graphD2, there is no directed path from v1 to v4 so it is a
weaklyconnecteddigraph.
Since there are two types of connectedness in a digraph, we define two
typesofcomponents.
13.3.14Definition
Let D beadirectedgraph.
i) Eachmaximal connected (weakly or strongly) subgraph of a digraph
D,issaidtobeacomponentof D.
ii) With in each component of D, the maximal strongly connected
subgraphs are said to be the fragments (or) strongly connected
fragmentsof D.
13.3.15Example:
ConsiderthedigraphgivenintheFig13.3.15.
ThisgraphconsistsoftwocomponentsH1andH2.
e2 e2
v4
v1
e1 e4
e5
e3
e6
e1 e4
e5
e3
e6GraphD1 GraphD2
v1
e9
e13
e12
e14
e11
Fig13.3.15
e10
e1
e2
e5
e3 e4
e6e7
e8
H1
g2
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:299
i) ThecomponentH1 containsthreefragments:{e1,e2}{e5, e6, e7, e8}
and{e10}.
ii) ThecomponentH2 containsafragment {e11, e12, e13}.
iii) Itcanbeobservedthat e3, e4 and e9 donotappearinanyfragment
ofH1.
13.3.6Definition:
Let Dbeadigraph.Thecondensation Dc of D isadigraphobtainedby
usingthefollowingmethod:
i) Eachstronglyconnectedfragmentistobereplacedbyanewvertex,and
ii) Foranytwostronglyconnectedcomponentsc1 andc2,thesetofall
thedirectededgesfromc1 toc2 istobereplacedbyasingledirected
edge(fromc1 toc2).
iii) Let D beadirectedgraphand v, u areverticesin D.Then v said
tobeaccessible(or)reachablefromthevertex u,ifthereisadirected
pathfrom u to v.
13.3.7Example:
Considerthegraph D givenintheFig13.3.15.
i) Thecomponentsof D areg1,g2.
ii) Thefragmentsof D areC1={e1,e2}
C2={e5,e6,e7,e8}C3={e10}andC4={e11,e12,e13}.
iii) ThefragmentsC1,C2,C3 andC4 aretobeconsideredasvertices.
iv) Therearetwoedges e3 and e4 fromC1 toC2.
Thesetwoedges e3 and e4 aretobereplacedbyanedge(sayf1)
fromtheverticesC1 toC2.
v) Thereisonlyoneedge e9 fromthefragmentC2 toC3.Sothisedge
e9 istobedrawnfromthevertexC2 toC3.
vi)Thereisonlyoneedge(e14)fromthefragmentC4 tothevertexv1. So
thisedgeistobedrawn(inthecondensation)fromthevertexC4 to v1.
vii)Finallywegetthecondensation Dc thatwasgivenintheFig13.3.7.
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:300
13.3.8Observations
i) Thecondensation Dc ofastronglyconnecteddigraph D isavertex.
ii) Thecondensation Dc ofadigraph D containsnodirectedcircuits.
Itisclearthatadigraph D isstronglyconnected "v isaccessiblefrom
u"forallvertices v and u in D.
13.4EulersDigraphs
13.4.1Definition:
LetDbeadirectedgraph.
i) A directed walk that starts and ends at the same vertex is called a
closeddirectedwalk.
ii) Acloseddirectedwalkwhichtraverseseveryedgeof D exactlyonce,
iscalledadirectedEulerline.
iii) D issaidtobeanEulerdigraphifitcontainsadirectedEulerline.
13.4.2 Example:
Considerthegraphgiveninthefollowing.
e9
v1 Fig. 13.3.7
C4
e14
C3
C2
f1
C1
a
fc
e
c
1
2
b
dc
4
3
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:301
Theedgesequencef,a,b,c,d,e formsadirectedEuler line.Hencethis
graphisaEulerdigraph.
13.4.3Theorem:
Let D be a digraph. Then D is an Euler digraph if and only if D is
connectedandbalanced.
[thatis, d+(v)=d(v)foreveryvertex v in D].
13.4.4Definition:
A connected digraph containingno circuit (neither a directed circuit nor a
semicircuit)issaidtobeatree.
13.4.5Note:
i) Atreeon n verticescontain n1edges(directed).
ii) Treesindigraphshaveadditionalproperties(thanthoseinundirected
graphs) and variations resulting from the relative orientations of the
edges.
13.4.6Definition:
A digraph D is said to be an arborescence if it satisfy the following two
conditions:
i) Dcontainsnocircuit(neitheradirectedcircuitnorasemicircuit).
ii) Thereexistsexactlyonevertex v ofzeroindegree(thisvertex v is
calledtherootofthearborescence).
13.4.7 Example:
Thegraphgivenhereisarborescence.
v(root)
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:302
13.5 MatrixRepresentationofDigraphs
13.5.1Definition:
Let D be a digraph with p vertices. The adjacencymatrix of D is a pp
matrix(aij)with
aij= i j1if v v isanarcof D
0otherwise
.ItisdenotedbyA(D).
Theadjacencymatrixforthedigraphgiveninfigure13.5.1is
01110
01000
00010
10000
00110
.
Thesumof the ith rowentriesof theadjacencymatrixgivesd+(vi)and the
sumoftheithcolumnentriesgivesd(vi)foreveryi.
ThepowersofA(D)givethenumberofwalksfromonepointtoanother.
13.5.2Problem:
The(i,j)thentryAn isthenumberofwalksoflengthnfromvi tovj.
Solution:(Byinductiononn)
Step1:n=1thestatementistruebythedefinitionofadjacencymatrix.
Step2:Inductionhypothesis:thetheoremistrueforn1.
LetAn1=(bij).Thereforebij=numberofvivjwalksoflengthn1.
v2
e5
e7
v1
e8
e6
v4
v3
v5
e1
e4
e3e2
fig13.5.1
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:303
Step3:ConsiderAn=An1A.
Thereforethe(i,j)th entryofAn=bi1a1j++bipapj.(1)
BythedefinitionofA(D),akj=numberofvkvjwalksoflength1.
Hence by step 2, for every k, 1 k p, bikakj = number of vivj walks of
lengthnwhoselastarcisvkvj.
Since anywalkhas one among v1vj, v2vj,,vpvj as the last arc, the right
handsideofexpression(1)givesthenumberofvivjwalksoflengthn.
Hence(i,j)thentryofAn isthenumberofvivjwalksoflengthn.
13.5.3Definition:
i) LetDbedigraphwithpvertices.ThereachabilitymatrixR=(rij)isthe
ppmatrixwith
j iij
1if v isreachablefromvr =
0otherwise
. We assume that each vertex is
reachablefromitself.
ii) The distance matrix is the pp matrix whose (i,j)th entry gives the
distancefromthepointvi tothepointvjandisinfinityifthereisnopath
fromvi tovj.
iii) Thedetourmatrix is theppmatrixwhose (i,j)thentry is the lengthof
anylongestvivjpathandinfinityifthereisnosuchpath.
13.5.4Example:
Thereachablematrix,distancematrixandthedetourmatrixrespectivelyare
forthematrixgivenin13.5.1aregivenbelow.
11110 111 112
01000
10110 , 2331 and 2331 .
11110 1222 1223
11110 2331 2332
1 1
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:304
SelfAssessmentQuestions
1.Findtheindegreeandoutdegreeofthefollowingdigraphs
2. Findthespanningtreeofthedigraphgivenin1(ii).
3. Verifywhetherornotthefollowingdigraphsareisomorphic?Ifso,write
theisomorphisms.
13.7Summary
In this unit we have investigated the fundamental featuresof the directed
graphs.Onecanobservethatthepropertiesofdigraphsaresimilartosome
typesofundirectedgraphs.Thecloserelationshipbetweenbinaryrelation
anddigraphswasgiven. Directedgraphshave interestingapplications in
telecommunications,flowsandnetworksandroutingproblems.
(i)
c
ba
o
oo
c
a
b
d
e
(ii)
o
o
oo
o
1
2
3
4o
o
o
o
G:
a
b
cd
G1:
o o
o
o
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:305
13.8TerminalQuestions
1. Draw thedigraphs for thedigraphD = {a, b, c, d, e}where thearcs
representedby {(a,c), (a,d), (b,e), (e,c), (d,c)}. Write the
indegreeandoudegreeofD.
FindalsotheconverseD1 (i.e.,reversingtheeacharcdirection inD)
andfindtheindegreeandoutdegreeofeachpointinD1.
2. Giveanexampleofadirectedtreewithfivevertices.
3. Findindegreeandoutdegreeofeachvertex inthefollowingdirected
graphs.
13.9Answers
SelfAssessmentQuestions
1. i) Indegreea=1
outdegreea=2
Similarlyid(b)=1,Od(b)=1
id(c)=2,Od(c)=1
ii) id(a)=1id(b)=2id(c)=3id(d)=1id(e)=1
Od(a)=1Od(b)=2Od(c)=2Od(d)=1Od(e)=1
(i)
v1 v2
v3v4
v5
o
o
o
oo
(ii)
d
a b
c
oo
oo
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:306
2.
3. DandD1areisomorphicundertheisomorphismf(1)=a,f(2)=b,f(3)=
c,f(4)=d.
TerminalQuestions
1 Thedigraphrepresentingthegivenarcsis
Theconversedigraphalsocanbefoundinasimilarway.
2.
a
bc
e
d
aa
o
oo
o
o o
c
ebo
o
o o
ob
d
a
d
e
ca bo
o
o
o o
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:307
3. i) indegreev1=2,outdegreev1=1
indegreev2=2,outdegreev2=2
Similarforothervertices.(ii).Similarto(i).
ModernApplicationsusingDiscreteMathematicalStructures Unit13
SikkimManipalUniversity PageNo:308
SuggestedReferences
1. Bernard Kolman, R.C. Busby, Sharon Ross, Discrete Mathematical
StructuresPHI,1999.
2. Deo Narsing, Graph Theory with Applications to Engineering and
ComputerScience,PrenticeHallIndia,NewDelhi1986.
3. FraleighJ.B.AFirstCourseinAbstractAlgebra,NarosaPub.House
,NewDelhi,1992
4. Graham R. L., Knuth, D. E., and Patashnik O., Concrete
Mathematics, A Foundation for Computer Science, 2nd Ed., Addison
Wesley,1994.
5. HararyF.,GraphTheory,AdditionWesley,1969.
6. HersteinI.N.TopicsinAlgebra,NewYork,Blaisdell,1964.
7. KlirGeorgeJ.andYuanBo,FuzzySetsandFuzzyLogic,PrenticeHall
India,NewDelhi,2000.
8. Linz Peter, An Introduction to Formal Languages and Automata,
NarosaPublishingCompany,1998.
9. Liu.C.L.,ElementsofDiscreteMathematics,McHill.
10. Liu.C.L., IntroductiontoCombinatorialMathematics,McGrawHill,
NewYork,1968
11. Richard Johnsonbaugh, Discrete Mathematics Pearson Education
Asia,2001
12. RosenK.H.,HandBookofDiscreteandCombinatorialMathematics,
CRCPress,1999.
13. Shanker Rao, G., Discrete Mathematical Structures, New Age
InternationalPublishers,2002.
14. SomasundaramRm. DiscreteMathematicalStructuresPrenticeHall
IndiaLimited,2003.
15. Trembly,J.P.,andManohar,R.DiscreteMathematicalStructureswith
ApplicationstoComputerScience,McGrawHill,1975.
16. West Dougles B., Introduction to Graph Theory, Prentice Hall India,
1999.