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

Paths and Cycles

The document defines paths, circuits, and isomorphism in graphs. It provides examples of determining if graphs are isomorphic based on having circuits of the same length. Problems are presented on identifying paths and circuits in graphs and determining the number of paths between vertices. Paths and circuits are identified in sample graphs based on adjacency matrices.
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)
285 views

Paths and Cycles

The document defines paths, circuits, and isomorphism in graphs. It provides examples of determining if graphs are isomorphic based on having circuits of the same length. Problems are presented on identifying paths and circuits in graphs and determining the number of paths between vertices. Paths and circuits are identified in sample graphs based on adjacency matrices.
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/ 5

PATHS AND CYCLES

Definitions:
1. A path in a graph is a finite sequence of vertices and edges, beginning
and ending with vertices, such that each edge is incident on the vertex
preceding and following it.

2. If the edges in path are distinct, it is called a simple path

a
e1 e3
b e2 c
In this graph “ a e1 b e2 c e2 b” is a path, but “ a e1 b e2 c ” is a simple path
3. The no of edges in a path is called the length of the path.
4. If the initial and final vertices are the same then the path is called a
circuit or a cycle.
5. If the initial and final vertices of a simple path of non-zero length are
the same, then the path is called a simple circuit or a simple cycle.

CIRCUITS AND ISOMORPHISM


Apart from the three invariants of two isomorphic graphs already discussed
namely number of vertices, number of edges and degrees of vertices one more
invariant of isomorphic graphs is discussed here.
If two graphs are isomorphic, they will contain circuits of the same length.
1. Test whether the following graphs are isomorphic using the concept of
circuits.

u v a b
z w d e
Y x c f
G1 G2
2. U1 V1

U5 U2 V5 V2

U4 U3 V4 V3

1. The two given graphs are not isomorphic, in G 2 there is a cycle of


length 3 (a – d – c – a), but in G 1 there is no circuit of length 3.

2. Both the graphs have 5 vertices, 6 edges and degrees sequences 3, 2,


3, 2, 2 and 2, 3, 2, 2, 3. Circuits are also same. Therefore the given
graphs are isomorphic.

Theorem: If A is the adjacency matrix of a graph G (with multiple edges


and loops allowed) then, the number of different paths of length ‘r’ from
vi to v j is equal to ij th entry of Ar.

Problem: Find the number of paths of length 4 from vertex ‘a to c’ and


from vertex ‘b to d’. Also write all distinct paths.

A B

C D

Solution: Let the adjacency matrix of the given graph be


𝟎 𝟏 𝟏 𝟏
A = [ 𝟏 𝟎 𝟎 𝟎]
𝟏 𝟎 𝟎 𝟏
𝟏 𝟎 𝟏 𝟎
Since paths of length is to be calculated find the matrix A 2 and A4.
𝟑 𝟎 𝟏 𝟏 𝟏𝟏 𝟐 𝟔 𝟔
A2 = [𝟎 𝟏 𝟏 𝟏 ] , A4 = [ 𝟐 𝟑 𝟒 𝟒]
𝟏 𝟏 𝟐 𝟏 𝟔 𝟒 𝟕 𝟔
𝟏 𝟏 𝟏 𝟐 𝟔 𝟒 𝟔 𝟕

Thus there are 6 paths from ‘a to c’ of length 4 and 4 path of length 4 from
‘b to d’
Different paths ‘a to c’ Different paths from ‘b to d’
1. A –B– A- D–C 1. B – A – C – A - D
2. A –C– A –D– C 2. B – A - D - A - D
3. A –C– D– A– C 3. B – A – B – A - D
4. A –D– C– D–C 4. B – A – C – A - D
5. A –D– A– D– C
6. A –D- C–A -C

Problems
1. Find which of the following vertex sequence are simple paths, paths,
closed paths, and simple circuits.
A B
C
D E

1. A – D - E – B – C
2. A – D – B – C – E
3. A – E – C – B – E – A
4. C – B – D – A – E – C
5. A – D – B – E – C – B
2. Find all simple paths from A to F and all circuits in the graph

B C
A F
D E

Simple paths from A to F Circuits of the Graph


1. A – B – C - F 1. A – B – D - A
2. A – D – E – F 2. C – F – E - C
3. A – B – D – E - F 3. B – C – E – D - B
4. A – D – B – C - F 4. A – B – C – E – D - A
5. A – B – C – E - F 5. B – C – F – E – D - B
6. A – D – E – C - F 6. A – B – C – F – E – D - A
7. A – B – D – E – C - F
8. A – D – B – C – E - F

3. Using circuits, examine whether the following pair of graphs G 1 and G2


given below are isomorphic.
a u v
d
b c w x
G1 G2

Four vertices each, 6 edges each and degree of each vertex is three.
Therefore, necessary conditions for isomorphism are satisfied.
In G 1 and G 2, there are 4 cycles each of length3, one cycle of length 4.
Thus, the given graphs are isomorphic.
4. Find the no paths of length 4 from vertex ‘D to E’ and “‘A to E’ in the
undirected graph shown below. Identify those paths from the graph.
A B
G= C

D E

𝟎 𝟏 𝟎 𝟏 𝟎
𝟏 𝟎 𝟏 𝟎 𝟏
A= 𝟎 𝟏 𝟎 𝟏 𝟏,
𝟏 𝟎 𝟏 𝟎 𝟎
[𝟎 𝟏 𝟏 𝟎 𝟎]
𝟐 𝟎 𝟐 𝟎 𝟏
𝟎 𝟑 𝟏 𝟐 𝟏
2
A = 𝟐 𝟏 𝟑 𝟎 𝟏,
𝟎 𝟐 𝟎 𝟐 𝟏
[𝟏 𝟏 𝟏 𝟏 𝟐]
𝟗 𝟑 𝟏𝟏 𝟏 𝟔
𝟑 𝟏𝟓 𝟕 𝟏𝟏 𝟖
4
A = 𝟏𝟏 𝟕 𝟏𝟓 𝟑 𝟖
𝟏 𝟏𝟏 𝟑 𝟗 𝟔
[𝟔 𝟖 𝟖 𝟔 𝟖]

Distinct paths from ‘A to E’ Distinct paths from ‘D to E’


1. A – B – C – B – E 1. D – A – B – C - E
2. A – B – E – B – E 2. D – A – D – C - E
3. A – B – A – B – E 3. D – C – B – C - E
4. A – D – C – B – E 4. D – C – D – C - E
5. A – D – A - B – E 5. D – C – E – B - E
6. A – B – E – C – E 6. D – C – E – C - E

You might also like