Skip to content

Commit

Permalink
updated Readme.md. (#228)
Browse files Browse the repository at this point in the history
updated Readme.md to include description of Kosaraju's Algorithm
  • Loading branch information
Adw8 authored Oct 6, 2022
1 parent 9625b39 commit 8b92387
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ If you are interested, please contact us at [email protected] or contribute to
- [Borůvka's Algorithm](#borůvkas-algorithm)
- [Graph Slicing based on connectivity](#graph-slicing-based-on-connectivity)
- [Ford-Fulkerson Algorithm](#ford-fulkerson-algorithm)
- [Kosaraju Algorithm] (#kosaraju's-algo)
- [Partition Algorithm Explanation](#partition-algorithm-explanation)
- [Vertex-Cut](#vertex-cut)
- [Edge Balanced Vertex-Cut](#edge-balanced-vertex-cut)
Expand Down Expand Up @@ -491,6 +492,13 @@ This algorithm is used in garbage collection systems to decide which other objec
[Ford-Fulkerson Algorithm](https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm) is a greedy algorithm for finding a maximum flow in a flow network.
The idea behind the algorithm is as follows: as long as there is a path from the source (start node) to the sink (end node), with available capacity on all edges in the path, we send flow along one of the paths. Then we find another path, and so on. A path with available capacity is called an augmenting path.

### Kosaraju's Algorithm
[Kosaraju's Algorithm] (https://en.wikipedia.org/wiki/Kosaraju%27s_algorithm) is a linear time algorithm to find the strongly connected components of a directed graph. It is based on the idea that if one is able to reach a vertex v starting from vertex u, then one should be able to reach vertex u starting from vertex v and if such is the case, one can say that vertices u and v are strongly connected - they are in a strongly connected sub-graph. Following is an example:

1). Create an empty stack ‘S’ and do DFS traversal of a graph. In DFS traversal, after calling recursive DFS for adjacent vertices of a vertex, push the vertex to stack.
2). Reverse directions of all arcs to obtain the transpose graph.
3). One by one pop a vertex from S while S is not empty. Let the popped vertex be ‘v’. Take v as source and do DFS (call DFSUtil(v)). The DFS starting from v prints strongly connected component of v.

## Partition Algorithm Explanation

### Vertex-Cut
Expand Down

0 comments on commit 8b92387

Please sign in to comment.