Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Algorithm, Basic topic of algorithm
1. Final Year Defense
1
Class presentation
Topics:
• Strongly connected graph
• Strongly Connected Components (SCC)
• Example.
• Breadth First Search (BFS)
2. Final Year Defense
2
Strongly connected graph
A directed graph is called strongly connected if for every
pair of vertices u and v there is a path from u to v and a path
from v to u.
Strongly Connected Components (SCC)
The strongly connected components (SCC) of a directed
graph are its maximal strongly connected subgraphs.
Class presentation
6. Final Year Defense
6
Step 3: Pop the vertex from stack and find visited element.
SCC components are………
1> {A-C-D-B} Visited vertex={A,C,D,B,F,G,H}
2> {F}
3> {G}
4> {H}
Number of SCC = 4
Class presentation
Stack
A
B
F
G
H
D
C
Pop
7. Final Year Defense
7
Breadth First Search
Step 1: S A C
Step 2: A C B
Step 3: C B D E
Step 4: B D E
Step 5:
Step 6:
D E F
E F V
Step 7: F V
Class presentation