Instructor Neelima Gupta nguptacsduacin Table of Contents Directed Graphs Simple Digraph May contain one loop at each vertex Distance we say that a vertex y is at a distance d from a vertex x if d is the length of a shortest path from x to y ID: 509422
Download Presentation The PPT/PDF document "MCA 520: Graph Theory" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
MCA 520: Graph Theory
Instructor
Neelima Gupta
ngupta@cs.du.ac.inSlide2
Table of Contents
Directed GraphsSlide3
Simple Digraph
May contain one loop at each vertex.
Distance: we say that a vertex y is at a distance d from a vertex x, if d is the length of a shortest path from x to y.Slide4
Motivation
Finite State Machine
For Example: a bulb controlled by two switches often called “three-way switch”.
Prediction Graphs
Functional GraphsSlide5
Underlying Graph
Weekly and Strongly Connected Components.Slide6
Subgraph
, Isomorphism, decomposition and Union are same as that in undirected graphs
Incidence and Adjacency MatricesSlide7
KernelSlide8
Theorem: Richardson
Every graph having no odd cycle contains a kernel.
Proof: First prove for strongly connected di-graphs D. Let y be any vertex in D. Let S be the set of all vertices at even distance from y.
Show that there is no edge between the vertices in S…left as exercise.
Let x be in V \ S. Then x is at odd distance say d_1 from y. Since D is strongly connected there is a path from x to y. Then the length of this path must be odd for else we have an odd walk and hence an odd cycle. Let x’ be the first vertex after x on this path. Then x’ must be at even distance from y for if there exists a (shorter) path of odd length from y
to x’,
then again we get an odd cycle…y to x’ to
y..since
x to y was odd, x’ to y is even and thus
y to x’ to
y is odd.Slide9
An example to show that this is not true if there is an odd cycle.Slide10
Proof continued by induction
Let n(D) =1 , single vertex graph, this itself is a kernel.
n(D) > 1, IH: true for a graph with < n(D) number of vertices. We’ll prove it is true for n(D). If D is strongly connected, we have already proved. So let D is not strongly connected. Then D contains a strongly connected component that has no outgoing edge. For
eg
. Consider D that is a simple directed path: v1 -> v2 -> v3 -> v4. Then D has 4 SCC, each consisting of a singleton and {v4} has no out going edge.
Since D’ is SCC, it has a kernel say S’. Remove S’ and its predecessors from the graph. Let D” be the remaining graph. By IH, D” has a kernel say S”.
Claim: S’ union S” is a kernel for DSlide11
Vertex Degrees
In-
deg
, Out-deg.
In-neighborhood/predecessor set
Out-neighborhood/successor set
Degree-Sum Result: Sum of
indegrees
= Sum of
Outdegrees
= number of edgesSlide12
Degree Sequence
Is a list of degree pairs (d
+
(v
i
) , d
-
(v
i
)).
Proposition: A list of pairs of non-negative integers is realizable as degree pairs of a digraph
iff
Σ
i
d
+
(v
i
)
=
Σ
i
d
-
(v
i
)
This is true when multiple edges are allowed
Proof: let m = sum. Consider m points and label
d
+
(v
i
)
points with label I and
d
-
(v
i
)
points with –j. For each point receiving label
i
and –j put an edge from I to j. Note that the resulting di-graph may contain loops and
muti
-edges…
.so not a simple di-graphSlide13
Characterization of DS for simple graphs (recall loops are allowed)
Split
of a digraph:
A constructive algorithm similar to the one for undirected graphs can be given
to test whether
a list
of pairs of non-negative integers is realizable as degree pairs of a digraph
or not. The algorithm uses split of a digraph…
…assignment.Slide14
Eulerian Di-graphs
Definitions of
Trail, Walk, Circuit/Cycle
remain the same with directions on them.
A di-graph is
E
ulerian
if it has an
Eulerian
Cycle.
Lemma: If G is a di-graph with d
+
(G) > 1 (or d
-
(G) > 1
) , then it contains a cycle.
A digraph G is
Eulerian
iff
d
+
(
v)
=
d
-
(
v) for all v and the underlying graph has at most one non-trivial component. Slide15
Orientations and Tournaments
2
n^2
simple di-graphs with n vertices – n
2
ordered pairs including loops, each is present or absent…..(0,1) choices
Orientation: for each edge in
a simple undirected graph G (no loops),
choose the direction ….three choices (0,+1,-1)…so …
3
n
C
2
Tournament: Orientation of a complete simple
simple graph
…no loops, two choices (+1, -1
) …so
…2
nC2
Slide16
Representing n-teams league match by an orientation of Kn
Let (
u,v
) be an edge if u wins.
Score(u) = number of matches u wins =
outdeg
(u).
Thus out-degree sequence is also called score sequence in a tournament.
Indegree
can be determined from
outdegree
(how?)Slide17
How to define the winner?
Suppose we define winner to be the team that has not lost to any other team…..there may be no winner, we may have a cycle.
Def2: that has won against maximum number of teams. Slide18
King of a tournament
Claim
: A team(/vertex) with maximum score (/out-degree) beats every other team either directly or by a path of length 2.
Definition:
In a di-graph, a
king
is a vertex from which every vertex is reachable by a path of length at most 2.
Theorem: Every tournament has a king
.
Proof: here we’ll essentially prove our claim
.
Note:
There
may be several vertices with maximum out-degree i.e. maximum
score and there may still be no clear winner
.
Worst is that all the vertices may have same out-degree.
The only thing we can claim is that there is at least one winner
.