Ford-Fulkerson Algorithm: Maximizing Flow in Capacitated Networks, Study notes of Computer Science

The ford-fulkerson algorithm is a method used to find the maximum flow in a capacitated network, which is a directed graph with an integer capacity function on its edges and distinct source and sink vertices. A feasible flow is a flow that satisfies the conservation condition, and the algorithm determines the maximum flow by finding an augmenting path, which is an alternating sequence of vertices and edges that can be improved. The residual capacity of an edge and the excess flow capacity of a path are key concepts in this algorithm. An explanation of the ford-fulkerson algorithm, including definitions, examples, and a theorem.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-1cz
koofers-user-1cz 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Ford-Fulkerson Algorithm
A digraph G = (V,E), with an integer-valued function c (capacity
function) define on its edges is called a capacitated network. Two
distinguished vertices exist. The first, vertex s has in-degree 0 is
called the source and the second, vertex t has out-degree 0 is called
the sink. The capacity of edge (i,j) is c(i,j)0.
A flow in the network is an integer-valued function f defined on the
edges of G satisfying 0 f(i,j) c(i,j) for every edge (i,j) in E.
Conservation Condition
For every vertex j in V, where j is not the source s or the sink t, the
sum of the flow into j equals the sum of the flow out of j.
A flow that satisfies the conservation condition is called a feasible
flow.
Let f be a feasible flow in a network G. The flow of the network,
denoted by f(G) is the sum of flows coming out of the source s.
The Ford-Fulkerson algorithm determines the maximum flow of the network.
Let f be a feasible flow in G. Edge (i,j) is said to be
a) saturated if f(i,j) = c(i,j)
b) free if f(i,j) = 0
c) positive if 0 < f(i,j) < c(i,j).
An augmenting path is an alternating sequence of vertices and edges of
the form s, e1, v1, e2, v2, …, ek, t in which no vertex is repeated and no
forward edge is saturated and no backward edge is free.
s=
1
3
2
5
4
t=6
27
12 15
24
6
12
12
8
6
pf3
pf4

Partial preview of the text

Download Ford-Fulkerson Algorithm: Maximizing Flow in Capacitated Networks and more Study notes Computer Science in PDF only on Docsity!

Ford-Fulkerson Algorithm

A digraph G = (V,E), with an integer-valued function c (capacity function) define on its edges is called a capacitated network. Two distinguished vertices exist. The first, vertex s has in-degree 0 is called the source and the second, vertex t has out-degree 0 is called the sink. The capacity of edge (i,j) is c(i,j)0. A flow in the network is an integer-valued function f defined on the edges of G satisfying 0  f(i,j)  c(i,j) for every edge (i,j) in E. Conservation Condition For every vertex j in V, where j is not the source s or the sink t, the sum of the flow into j equals the sum of the flow out of j. A flow that satisfies the conservation condition is called a feasible flow. Let f be a feasible flow in a network G. The flow of the network, denoted by f(G) is the sum of flows coming out of the source s. The Ford-Fulkerson algorithm determines the maximum flow of the network. Let f be a feasible flow in G. Edge (i,j) is said to be a) saturated if f(i,j) = c(i,j) b) free if f(i,j) = 0 c) positive if 0 < f(i,j) < c(i,j). An augmenting path is an alternating sequence of vertices and edges of the form s, e 1 , v 1 , e 2 , v 2 , …, ek, t in which no vertex is repeated and no forward edge is saturated and no backward edge is free.

s=

t=

The residual capacity (rc) of an edge (i,j) equals c(i,j) – f(i,j) when (i,j) is a forward edge, and equals f(i,j) when (i,j) is a backward edge. Example: Augmenting Path The excess flow capacity of an augmenting path equals the minimum of the residual capacities of each edge in the path. We can increase the flow in the path from s to t in the above diagram by determining the excess flow capacity of this path. From left to right the residual capacities (the amount flow can be increased on the edge) are the first number on each edge. minimum(5, 1, 2, 5) = 1

i j

flow/cap

i j

rc flow

i j

flow/cap

i j

flow rc

s t

s t

5 3 1 6 2 4 5 4

s t

4 4 0 7 1 5 4 5

Forward edge

Backward edge

Saturated edge

Augmenting path: s->X->t Excess capacity of s->X->t = min(1, 5) = 1 Augmenting path: s->Z->Y->t Excess capacity of s->Z->Y->t = min(6, 4, 4) = 4 At this point, there are no remaining augmenting paths! Therefore the flow is a maximum = 8.

s

X

Z Y

W

t

s

X

Z Y

W

t

s

X

Z Y

W

t