<s>
The	O
Ford	B-Algorithm
–	I-Algorithm
Fulkerson	I-Algorithm
method	I-Algorithm
or	O
Ford	B-Algorithm
–	I-Algorithm
Fulkerson	I-Algorithm
algorithm	I-Algorithm
(	O
FFA	O
)	O
is	O
a	O
greedy	B-Algorithm
algorithm	I-Algorithm
that	O
computes	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
in	O
a	O
flow	B-Algorithm
network	I-Algorithm
.	O
</s>
<s>
The	O
name	O
"	O
FordFulkerson	O
"	O
is	O
often	O
also	O
used	O
for	O
the	O
Edmonds	B-Algorithm
–	I-Algorithm
Karp	I-Algorithm
algorithm	I-Algorithm
,	O
which	O
is	O
a	O
fully	O
defined	O
implementation	O
of	O
the	O
FordFulkerson	O
method	O
.	O
</s>
<s>
We	O
want	O
to	O
find	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
from	O
the	O
source	O
to	O
the	O
sink	O
.	O
</s>
<s>
The	O
path	O
in	O
step	O
2	O
can	O
be	O
found	O
with	O
,	O
for	O
example	O
,	O
a	O
breadth-first	B-Algorithm
search	I-Algorithm
(	O
BFS	O
)	O
or	O
a	O
depth-first	B-Algorithm
search	I-Algorithm
in	O
.	O
</s>
<s>
If	O
you	O
use	O
the	O
former	O
,	O
the	O
algorithm	O
is	O
called	O
Edmonds	B-Algorithm
–	I-Algorithm
Karp	I-Algorithm
.	O
</s>
<s>
See	O
also	O
Max-flow	B-Algorithm
Min-cut	I-Algorithm
theorem	I-Algorithm
.	O
</s>
<s>
By	O
adding	O
the	O
flow	O
augmenting	O
path	O
to	O
the	O
flow	O
already	O
established	O
in	O
the	O
graph	O
,	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
will	O
be	O
reached	O
when	O
no	O
more	O
flow	O
augmenting	O
paths	O
can	O
be	O
found	O
in	O
the	O
graph	O
.	O
</s>
<s>
In	O
the	O
case	O
that	O
the	O
algorithm	O
runs	O
forever	O
,	O
the	O
flow	O
might	O
not	O
even	O
converge	O
towards	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
When	O
the	O
capacities	O
are	O
integers	O
,	O
the	O
runtime	O
of	O
Ford	O
–	O
Fulkerson	O
is	O
bounded	O
by	O
(	O
see	O
big	O
O	B-Language
notation	O
)	O
,	O
where	O
is	O
the	O
number	O
of	O
edges	O
in	O
the	O
graph	O
and	O
is	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
in	O
the	O
graph	O
.	O
</s>
<s>
A	O
variation	O
of	O
the	O
FordFulkerson	O
algorithm	O
with	O
guaranteed	O
termination	O
and	O
a	O
runtime	O
independent	O
of	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
value	O
is	O
the	O
Edmonds	B-Algorithm
–	I-Algorithm
Karp	I-Algorithm
algorithm	I-Algorithm
,	O
which	O
runs	O
in	O
time	O
.	O
</s>
<s>
The	O
following	O
example	O
shows	O
the	O
first	O
steps	O
of	O
Ford	O
–	O
Fulkerson	O
in	O
a	O
flow	B-Algorithm
network	I-Algorithm
with	O
4	O
nodes	O
,	O
source	O
and	O
sink	O
.	O
</s>
<s>
If	O
breadth-first-search	O
were	O
used	O
instead	O
,	O
only	O
two	O
steps	O
would	O
be	O
needed	O
.	O
</s>
<s>
Path	O
Capacity	O
Resulting	O
flow	B-Algorithm
network	I-Algorithm
Initial	O
flow	B-Algorithm
network	I-Algorithm
300px	O
300px	O
300px	O
After	O
1998	O
more	O
steps	O
...	O
</s>
<s>
Consider	O
the	O
flow	B-Algorithm
network	I-Algorithm
shown	O
on	O
the	O
right	O
,	O
with	O
source	O
,	O
sink	O
,	O
capacities	O
of	O
edges	O
,	O
and	O
respectively	O
,	O
and	O
and	O
the	O
capacity	O
of	O
all	O
other	O
edges	O
some	O
integer	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
algorithm	O
never	O
terminates	O
and	O
the	O
flow	O
does	O
not	O
even	O
converge	O
to	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
Another	O
non-terminating	O
example	O
based	O
on	O
the	O
Euclidean	O
algorithm	O
is	O
given	O
by	O
,	O
where	O
they	O
also	O
show	O
that	O
the	O
worst	O
case	O
running-time	O
of	O
the	O
Ford-Fulkerson	B-Algorithm
algorithm	I-Algorithm
on	O
a	O
network	O
in	O
ordinal	B-Language
numbers	I-Language
is	O
.	O
</s>
