Graph Theory Presentation

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 39

GRAPH THEORY RESEARCH PROJECT II

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


UNIVERSITY OF MORATUWA
Group 05

110213P - H.H.Hettiarachi
110383J - G.G.S.M.Nandathilaka
110438J - T.Pranavan
110486D - J.M.R.Ruparathna
110565U - A.U.Tebel
GRAPH THEORY RESEARCH PROJECT II
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING
UNIVERSITY OF MORATUWA
Group 05

110213P - H.H.Hettiarachi
110383J - G.G.S.M.Nandathilaka
110438J - T.Pranavan
110486D - J.M.R.Ruparathna
110565U - A.U.Tebel
Definitions
Graph
A graph G = (V, E) is an ordered pair of
finite sets.
Elements of V are vertices or nodes, and
elements of E V
(2)
are called edges or
arcs.
V is the vertex set of G, and E is the edge
set.

Definitions
Walk
Walk is an alternating sequence of
vertices and edges; Consecutive
vertices and edges are incident.
Definitions
Here is a walk which can be expressed as follows.

Walk = {b,{b, e}, e,{e, c}, c,{c, b},b,{b, d}, d}
A D
E
C B
Definitions
U-V WALK
U-V Walk
U-V walk is a walk where the starting
vertex of the walk is U; the ending
vertex of the walk is V.
Definitions
PATH
Path
A path is a walk with no repeating
vertices, except possibly the start and
end vertices.

Definitions
EXAMPLE

Path = {b, {b, c}, c, {c, e}, e, {e, a}, a, {a, d}, d}

A D
E
C B
Definitions
U-V PATH
U-V Path
U-V path is path where the starting
vertex of the path is U; the ending
vertex of the path is V
Definitions
TRIVIAL WALK AND TRIVIAL PATH

Trivial Walk and Trivial Path
A trivial walk is a walk of length 0.
A trivial walk is obviously a trivial path
Definitions
Methods of Proof
RECURSION Recursion
An algorithm or function that calls itself
directly or indirectly to solve a smaller
version of its task is recursive.
Methods of Proof
Examples
Finding the factorial of a number.
Boundary condition: if n = 0, then the
answer is 1.
Recursive statement: n* fact(n-1)
Binary Search
Sorting

Methods of Proof
PROOF BY CASES

Proof by Cases
You can sometimes prove a statement
by dividing the situation into cases
which exhaust all the possibilities.
.


Methods of Proof
EXAMPLE
Example
Prove that if 3 does not divide n, then 3
divides n
2
1. Here we have to consider
the following two cases.
Case 1: n = 3k+1
Case 2: n = 3k +2

Methods of Proof
Proposition
Proposition

Every u-v walk in a graph contains a u-v
path.
















Let us consider the Walk = {b,{b, e}, e,{e, c}, c,{c, b},b,{b, d}, d}

Proposition
A D
E
C B
A D
E
C B
Proof
Solution

Uses two cases..

Case 1: Length of the walk in zero.
Case 2: Length of the walk is greater
than zero.
Case 1: n = 0
If n = 0, then it is a trivial path.






A
It is the case where there is only one vertex and
no edges.
Solution
Case 2: > 0

Assume the u-v walk is as follows.

Walk W = (
0
, ,
1
,
1
,
1,
,
2
,
2
, ,
1
,
1
,

)

Here V
0
is the starting vertex and V
n
is the ending vertex.
Solution

Now we are again splitting this Case 2 into two cases Case
2a and Case 2b.

Case 2a: All the vertices in the walk are
distinct.
Case 2b: Walk has at least one
repeated vertex.




Solution

Case 2a: All the vertices in the walk are distinct.

Then it is obvious that the U-V walk is a
U-V path.
Solution

Case 2b: Walk has at least one repeated vertex.



A D
E
C B

Walk = {b,{b, e}, e,{e, c}, c,{c, b},b,{b, d}, d}
Solution

Now select two vertices which

where 0 ,
where i and j are two distinct integers and i < j.

Now we delete the vertices

,
+1
, . . ,
1
.

A D
E
C B
A D
E
C B
Solution

Now we are left with a different walk and we will call it W
1


Vertices in this walk may or may not be distinct depending on
the number of repeating vertices there were on the first walk
W.

If there were more than one repeating vertices in the walk W,
then there will be some repeating vertices left in W
1



Solution

We can repeat the above process until all the vertices in the
walk left are distinct.

Since W is a finite sequence there will not be a case where
we need to repeat infinite number of times.

So we will finally end up with a walk where all the vertices
are distinct then it will be the u-v path.

Solution
Questions &
Answers
True or False ?

There cannot be a graph where path
and the walk are the same sequence.
Q&A
Answer :
False
Q&A
Example
Q&A
A D
E
C B
Q&A
Questions?
References

[1] - Graph Theory Definitions (2013 September 11), Walk,
[online]. Available:
http://itcs.tsinghua.edu.cn/~john/graph_definitions.pdf

[2] - Definition: Path (Graph Theory) (2013 September 11),
Path [online]. Available:
http://www.proofwiki.org/wiki/Definition:Path_(Graph_Theory)

[3] - Recursion (2013 September 11), Recursion [online].
Available: http://www.techterms.com/definition/recursion

References
[4] - Proof By Cases (2013 September 13), Proof By Cases,
[online]. Available:
http://www.millersville.edu/~bikenaga/math-
proof/cases/cases.html

[5]- Using proof by cases stuck (2012 September 12),
Using proof by cases stuck [online]. Available:
http://math.stackexchange.com/questions/25886/using-proof-
by-cases-stuck

References
[6] - D. Joyner, M. V. Nyguyen & D. Phillips (2013, September
3). Algorithmic Graph Theory [Online]. Available:
https://code.google.com/p/graphbook/downloads/detail?name
=latest-r1991.pdf
References
Thank You!

You might also like