Escolar Documentos
Profissional Documentos
Cultura Documentos
GRAPHS
Syllabus
Graph Terminology - Graph Traversal Topological sorting - Minimum spanning
tree Prims Kruskals - Network flow
problem Dijkstra shortest Path Algorithm
- Hashing Hash functions - Collision
avoidance Separate chaining - Open
addressing Linear probing Quadratic
Probing - Rehashing - Extensible Hashing
Example
Ford--Fulkerson Algorithm
Ford
The following is simple idea of FordFulkerson algorithm:
1) Start with initial flow as 0.
2) While there is a augmenting path from
source to sink.
Add this path-flow to flow.
3) Return flow.
4
1
t
2
3
This is the original network,
and the original residual
network.
4
1
t
2
3
This is the original network,
plus reversals of the arcs.
4
1
t
2
3
Find any s-t path in G(x)
2
3
5
1
1
2
1
2/ 1
33/ 2
4
1/0
1
2
3
Determine the capacity D of the path.
Send D units of flow in the path.
Update residual capacities.
2
3
5
1
1
2
1
2/ 1
33/ 2
4
1/0
1
2
2
3
5
1
1
2
23
12
4
1
3
Find any s-t path
2 1
1
12
23
1
11
1
1
12 1
1
1
12
23
1
11
1
1
3
Find any s-t path
12 1
1
1
1
23
1
11
21
1
1 21
1
1
21
23
1
11
21
1
3
Find any s-t path
1 21
1
21
21
11
21
1
21
21
1
21
1
21
21
1
11
21
1
21
3
Find any s-t path
21
21
23
21
21
21
21
21
23
21
21
21
21
21
23
21
21
21
21
21
1
2
t
2
3
Here is the optimal flow
Relaxing an edge
Example
Bi--connected Components
Bi
Thank You