<s>
In	O
optimization	O
theory	O
,	O
maximum	B-Algorithm
flow	I-Algorithm
problems	I-Algorithm
involve	O
finding	O
a	O
feasible	O
flow	O
through	O
a	O
flow	B-Algorithm
network	I-Algorithm
that	O
obtains	O
the	O
maximum	O
possible	O
flow	O
rate	O
.	O
</s>
<s>
The	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
can	O
be	O
seen	O
as	O
a	O
special	O
case	O
of	O
more	O
complex	O
network	B-Algorithm
flow	I-Algorithm
problems	O
,	O
such	O
as	O
the	O
circulation	B-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
The	O
maximum	O
value	O
of	O
an	O
s-t	O
flow	O
(	O
i.e.	O
,	O
flow	O
from	O
source	O
s	O
to	O
sink	O
t	O
)	O
is	O
equal	O
to	O
the	O
minimum	O
capacity	O
of	O
an	O
s-t	B-Algorithm
cut	I-Algorithm
(	O
i.e.	O
,	O
cut	O
severing	O
s	O
from	O
t	O
)	O
in	O
the	O
network	O
,	O
as	O
stated	O
in	O
the	O
max-flow	B-Algorithm
min-cut	I-Algorithm
theorem	I-Algorithm
.	O
</s>
<s>
The	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
was	O
first	O
formulated	O
in	O
1954	O
by	O
T	O
.	O
E	O
.	O
Harris	O
and	O
F	O
.	O
S	O
.	O
Ross	O
as	O
a	O
simplified	O
model	O
of	O
Soviet	O
railway	O
traffic	O
flow	O
.	O
</s>
<s>
In	O
1955	O
,	O
Lester	O
R	O
.	O
Ford	O
,	O
Jr.	O
and	O
Delbert	O
R	O
.	O
Fulkerson	O
created	O
the	O
first	O
known	O
algorithm	O
,	O
the	O
Ford	B-Algorithm
–	I-Algorithm
Fulkerson	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Assuming	O
a	O
steady	O
state	O
condition	O
,	O
find	O
a	O
maximal	B-Algorithm
flow	I-Algorithm
from	O
one	O
given	O
city	O
to	O
the	O
other.In	O
their	O
book	O
Flows	O
in	O
Network	O
,	O
in	O
1962	O
,	O
Ford	O
and	O
Fulkerson	O
wrote:It	O
was	O
posed	O
to	O
the	O
authors	O
in	O
the	O
spring	O
of	O
1955	O
by	O
T	O
.	O
E	O
.	O
Harris	O
,	O
who	O
,	O
in	O
conjunction	O
with	O
General	O
F	O
.	O
S	O
.	O
Ross	O
(	O
Ret	O
.	O
</s>
<s>
Over	O
the	O
years	O
,	O
various	O
improved	O
solutions	O
to	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
were	O
discovered	O
,	O
notably	O
the	O
shortest	O
augmenting	O
path	O
algorithm	O
of	O
Edmonds	O
and	O
Karp	O
and	O
independently	O
Dinitz	O
;	O
the	O
blocking	B-Algorithm
flow	I-Algorithm
algorithm	O
of	O
Dinitz	O
;	O
the	O
push-relabel	B-Algorithm
algorithm	I-Algorithm
of	O
Goldberg	O
and	O
Tarjan	O
;	O
and	O
the	O
binary	O
blocking	B-Algorithm
flow	I-Algorithm
algorithm	O
of	O
Goldberg	O
and	O
Rao	O
.	O
</s>
<s>
The	O
algorithms	O
of	O
Sherman	O
and	O
Kelner	O
,	O
Lee	O
,	O
Orecchia	O
and	O
Sidford	O
,	O
respectively	O
,	O
find	O
an	O
approximately	O
optimal	O
maximum	B-Algorithm
flow	I-Algorithm
but	O
only	O
work	O
in	O
undirected	O
graphs	O
.	O
</s>
<s>
In	O
2022	O
Li	O
Chen	O
,	O
Rasmus	O
Kyng	O
,	O
Yang	O
P	O
.	O
Liu	O
,	O
Richard	O
Peng	O
,	O
Maximilian	O
Probst	O
Gutenberg	O
,	O
and	O
Sushant	O
Sachdeva	O
published	O
an	O
almost-linear	O
time	O
algorithm	O
running	O
in	O
for	O
the	O
minimum-cost	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
of	O
which	O
for	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
is	O
a	O
particular	O
case	O
.	O
</s>
<s>
For	O
the	O
single-source	O
shortest	O
path	O
(	O
SSSP	O
)	O
problem	O
with	O
negative	O
weights	O
another	O
particular	O
case	O
of	O
minimum-cost	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
an	O
algorithm	O
in	O
almost-linear	O
time	O
has	O
also	O
been	O
reported	O
.	O
</s>
<s>
The	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
is	O
to	O
route	O
as	O
much	O
flow	O
as	O
possible	O
from	O
the	O
source	O
to	O
the	O
sink	O
,	O
in	O
other	O
words	O
find	O
the	O
flow	O
with	O
maximum	O
value	O
.	O
</s>
<s>
Note	O
that	O
several	O
maximum	B-Algorithm
flows	I-Algorithm
may	O
exist	O
,	O
and	O
if	O
arbitrary	O
real	O
(	O
or	O
even	O
arbitrary	O
rational	O
)	O
values	O
of	O
flow	O
are	O
permitted	O
(	O
instead	O
of	O
just	O
integers	O
)	O
,	O
there	O
is	O
either	O
exactly	O
one	O
maximum	B-Algorithm
flow	I-Algorithm
,	O
or	O
infinitely	O
many	O
,	O
since	O
there	O
are	O
infinitely	O
many	O
linear	O
combinations	O
of	O
the	O
base	O
maximum	B-Algorithm
flows	I-Algorithm
.	O
</s>
<s>
In	O
other	O
words	O
,	O
if	O
we	O
send	O
units	O
of	O
flow	O
on	O
edge	O
in	O
one	O
maximum	B-Algorithm
flow	I-Algorithm
,	O
and	O
units	O
of	O
flow	O
on	O
in	O
another	O
maximum	B-Algorithm
flow	I-Algorithm
,	O
then	O
for	O
each	O
we	O
can	O
send	O
units	O
on	O
and	O
route	O
the	O
flow	O
on	O
remaining	O
edges	O
accordingly	O
,	O
to	O
obtain	O
another	O
maximum	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
The	O
following	O
table	O
lists	O
algorithms	O
for	O
solving	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
Method	O
Complexity	O
Description	O
Linear	B-Algorithm
programming	I-Algorithm
Constraints	O
given	O
by	O
the	O
definition	O
of	O
a	O
legal	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
See	O
the	O
linear	B-Algorithm
program	I-Algorithm
here	O
.	O
</s>
<s>
Ford	B-Algorithm
–	I-Algorithm
Fulkerson	I-Algorithm
algorithm	I-Algorithm
As	O
long	O
as	O
there	O
is	O
an	O
open	O
path	O
through	O
the	O
residual	O
graph	O
,	O
send	O
the	O
minimum	O
of	O
the	O
residual	O
capacities	O
on	O
that	O
path	O
.	O
</s>
<s>
Edmonds	B-Algorithm
–	I-Algorithm
Karp	I-Algorithm
algorithm	I-Algorithm
A	O
specialization	O
of	O
Ford	O
–	O
Fulkerson	O
,	O
finding	O
augmenting	O
paths	O
with	O
breadth-first	B-Algorithm
search	I-Algorithm
.	O
</s>
<s>
Dinic	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
In	O
each	O
phase	O
the	O
algorithms	O
builds	O
a	O
layered	O
graph	O
with	O
breadth-first	B-Algorithm
search	I-Algorithm
on	O
the	O
residual	O
graph	O
.	O
</s>
<s>
The	O
maximum	B-Algorithm
flow	I-Algorithm
in	O
a	O
layered	O
graph	O
can	O
be	O
calculated	O
in	O
time	O
,	O
and	O
the	O
maximum	O
number	O
of	O
phases	O
is	O
.	O
</s>
<s>
In	O
networks	O
with	O
unit	O
capacities	O
,	O
Dinic	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
terminates	O
in	O
time	O
.	O
</s>
<s>
MKM	O
(	O
Malhotra	O
,	O
Kumar	O
,	O
Maheshwari	O
)	O
algorithm	O
A	O
modification	O
of	O
Dinic	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
with	O
a	O
different	O
approach	O
to	O
constructing	O
blocking	B-Algorithm
flows	I-Algorithm
.	O
</s>
<s>
Dinic	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
with	O
dynamic	B-Data_Structure
trees	I-Data_Structure
The	O
dynamic	B-Data_Structure
trees	I-Data_Structure
data	O
structure	O
speeds	O
up	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
computation	O
in	O
the	O
layered	O
graph	O
to	O
.	O
</s>
<s>
General	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
The	O
push	O
relabel	O
algorithm	O
maintains	O
a	O
preflow	O
,	O
i.e.	O
</s>
<s>
a	O
flow	B-Algorithm
function	I-Algorithm
with	O
the	O
possibility	O
of	O
excess	O
in	O
the	O
vertices	O
.	O
</s>
<s>
The	O
proper	O
definitions	O
of	O
these	O
operations	O
guarantee	O
that	O
the	O
resulting	O
flow	B-Algorithm
function	I-Algorithm
is	O
a	O
maximum	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
Push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
with	O
FIFO	O
vertex	O
selection	O
rule	O
Push-relabel	B-Algorithm
algorithm	I-Algorithm
variant	O
which	O
always	O
selects	O
the	O
most	O
recently	O
active	O
vertex	O
,	O
and	O
performs	O
push	O
operations	O
while	O
the	O
excess	O
is	O
positive	O
and	O
there	O
are	O
admissible	O
residual	O
edges	O
from	O
this	O
vertex	O
.	O
</s>
<s>
Push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
with	O
maximum	O
distance	O
vertex	O
selection	O
rule	O
Push-relabel	B-Algorithm
algorithm	I-Algorithm
variant	O
which	O
always	O
selects	O
the	O
most	O
distant	O
vertex	O
from	O
or	O
(	O
i.e.	O
</s>
<s>
Push-relabel	B-Algorithm
algorithm	I-Algorithm
with	O
dynamic	B-Data_Structure
trees	I-Data_Structure
The	O
algorithm	O
builds	O
limited	O
size	O
trees	O
on	O
the	O
residual	O
graph	O
regarding	O
to	O
the	O
height	O
function	O
.	O
</s>
<s>
KRT	O
(	O
King	O
,	O
Rao	O
,	O
Tarjan	O
)	O
'	O
s	O
algorithm	O
Binary	O
blocking	B-Algorithm
flow	I-Algorithm
algorithm	O
James	O
B	O
Orlin	O
's	O
+	O
KRT	O
(	O
King	O
,	O
Rao	O
,	O
Tarjan	O
)	O
'	O
s	O
algorithm	O
Orlin	O
's	O
algorithm	O
solves	O
max-flow	B-Algorithm
in	O
time	O
for	O
while	O
KRT	O
solves	O
it	O
in	O
for	O
.	O
</s>
<s>
Chen	O
,	O
Kyng	O
,	O
Liu	O
,	O
Peng	O
,	O
Gutenberg	O
and	O
Sachdeva	O
's	O
algorithm	O
Chen	O
,	O
Kyng	O
,	O
Liu	O
,	O
Peng	O
,	O
Gutenberg	O
and	O
Sachdeva	O
's	O
algorithm	O
solves	O
maximum	B-Algorithm
flow	I-Algorithm
and	O
minimum-cost	B-Algorithm
flow	I-Algorithm
in	O
almost	O
linear	O
time	O
by	O
building	O
the	O
flow	O
through	O
a	O
sequence	O
of	O
approximate	O
undirected	O
minimum-ratio	O
cycles	O
,	O
each	O
of	O
which	O
is	O
computed	O
and	O
processed	O
in	O
amortized	O
time	O
using	O
a	O
dynamic	O
data	O
structure	O
.	O
</s>
<s>
If	O
each	O
edge	O
in	O
a	O
flow	B-Algorithm
network	I-Algorithm
has	O
integral	O
capacity	O
,	O
then	O
there	O
exists	O
an	O
integral	O
maximal	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
The	O
claim	O
is	O
not	O
only	O
that	O
the	O
value	O
of	O
the	O
flow	O
is	O
an	O
integer	O
,	O
which	O
follows	O
directly	O
from	O
the	O
max-flow	B-Algorithm
min-cut	I-Algorithm
theorem	I-Algorithm
,	O
but	O
that	O
the	O
flow	O
on	O
every	O
edge	O
is	O
integral	O
.	O
</s>
<s>
Given	O
a	O
network	O
with	O
a	O
set	O
of	O
sources	O
and	O
a	O
set	O
of	O
sinks	O
instead	O
of	O
only	O
one	O
source	O
and	O
one	O
sink	O
,	O
we	O
are	O
to	O
find	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
across	O
.	O
</s>
<s>
We	O
can	O
transform	O
the	O
multi-source	O
multi-sink	O
problem	O
into	O
a	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
by	O
adding	O
a	O
consolidated	O
source	O
connecting	O
to	O
each	O
vertex	O
in	O
and	O
a	O
consolidated	O
sink	O
connected	O
by	O
each	O
vertex	O
in	O
(	O
also	O
known	O
as	O
supersource	B-Algorithm
and	O
supersink	B-Algorithm
)	O
with	O
infinite	O
capacity	O
on	O
each	O
edge	O
(	O
See	O
Fig	O
.	O
</s>
<s>
Then	O
the	O
value	O
of	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
in	O
is	O
equal	O
to	O
the	O
size	O
of	O
the	O
maximum	O
matching	O
in	O
,	O
and	O
a	O
maximum	O
cardinality	O
matching	O
can	O
be	O
found	O
by	O
taking	O
those	O
edges	O
that	O
have	O
flow	O
in	O
an	O
integral	O
max-flow	B-Algorithm
.	O
</s>
<s>
To	O
find	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
across	O
,	O
we	O
can	O
transform	O
the	O
problem	O
into	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
in	O
the	O
original	O
sense	O
by	O
expanding	O
.	O
</s>
<s>
In	O
this	O
expanded	O
network	O
,	O
the	O
vertex	O
capacity	O
constraint	O
is	O
removed	O
and	O
therefore	O
the	O
problem	O
can	O
be	O
treated	O
as	O
the	O
original	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
This	O
problem	O
can	O
be	O
transformed	O
to	O
a	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
by	O
constructing	O
a	O
network	O
from	O
,	O
with	O
and	O
being	O
the	O
source	O
and	O
the	O
sink	O
of	O
respectively	O
,	O
and	O
assigning	O
each	O
edge	O
a	O
capacity	O
of	O
.	O
</s>
<s>
In	O
this	O
network	O
,	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
is	O
iff	O
there	O
are	O
edge-disjoint	O
paths	O
.	O
</s>
<s>
Then	O
the	O
value	O
of	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
is	O
equal	O
to	O
the	O
maximum	O
number	O
of	O
independent	O
paths	O
from	O
to	O
.	O
</s>
<s>
It	O
may	O
be	O
solved	O
in	O
polynomial	O
time	O
using	O
a	O
reduction	O
to	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
In	O
the	O
baseball	B-Application
elimination	O
problem	O
there	O
are	O
n	O
teams	O
competing	O
in	O
a	O
league	O
.	O
</s>
<s>
The	O
task	O
of	O
the	O
baseball	B-Application
elimination	O
problem	O
is	O
to	O
determine	O
which	O
teams	O
are	O
eliminated	O
at	O
each	O
point	O
during	O
the	O
season	O
.	O
</s>
<s>
Schwartz	O
proposed	O
a	O
method	O
which	O
reduces	O
this	O
problem	O
to	O
maximum	O
network	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
In	O
this	O
method	O
it	O
is	O
claimed	O
team	O
k	O
is	O
not	O
eliminated	O
if	O
and	O
only	O
if	O
a	O
flow	O
value	O
of	O
size	O
r( S	O
−	O
 { k } 	O
)	O
exists	O
in	O
network	O
G	O
.	O
In	O
the	O
mentioned	O
article	O
it	O
is	O
proved	O
that	O
this	O
flow	O
value	O
is	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
value	O
from	O
s	O
to	O
t	O
.	O
</s>
<s>
The	O
airline	O
scheduling	O
problem	O
can	O
be	O
considered	O
as	O
an	O
application	O
of	O
extended	O
maximum	O
network	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
To	O
solve	O
this	O
problem	O
one	O
uses	O
a	O
variation	O
of	O
the	O
circulation	B-Algorithm
problem	I-Algorithm
called	O
bounded	O
circulation	O
which	O
is	O
the	O
generalization	O
of	O
network	B-Algorithm
flow	I-Algorithm
problems	O
,	O
with	O
the	O
added	O
constraint	O
of	O
a	O
lower	O
bound	O
on	O
edge	O
flows	O
.	O
</s>
<s>
As	O
it	O
is	O
mentioned	O
in	O
the	O
Application	O
part	O
of	O
this	O
article	O
,	O
the	O
maximum	O
cardinality	O
bipartite	O
matching	O
is	O
an	O
application	O
of	O
maximum	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
This	O
problem	O
can	O
be	O
transformed	O
into	O
a	O
maximum-flow	B-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
If	O
there	O
exists	O
a	O
circulation	O
,	O
looking	O
at	O
the	O
max-flow	B-Algorithm
solution	O
would	O
give	O
the	O
answer	O
as	O
to	O
how	O
much	O
goods	O
have	O
to	O
be	O
sent	O
on	O
a	O
particular	O
road	O
for	O
satisfying	O
the	O
demands	O
.	O
</s>
<s>
In	O
their	O
book	O
,	O
Kleinberg	O
and	O
Tardos	O
present	O
an	O
algorithm	O
for	O
segmenting	B-Algorithm
an	O
image	O
.	O
</s>
<s>
Now	O
,	O
it	O
remains	O
to	O
compute	O
a	O
minimum	O
cut	O
in	O
that	O
network	O
(	O
or	O
equivalently	O
a	O
maximum	B-Algorithm
flow	I-Algorithm
)	O
.	O
</s>
<s>
In	O
the	O
minimum-cost	B-Algorithm
flow	I-Algorithm
problem	I-Algorithm
,	O
each	O
edge	O
(	O
u	O
,	O
v	O
)	O
also	O
has	O
a	O
cost-coefficient	O
auv	O
in	O
addition	O
to	O
its	O
capacity	O
.	O
</s>
<s>
The	O
maximum-flow	B-Algorithm
problem	I-Algorithm
can	O
be	O
augmented	O
by	O
disjunctive	O
constraints	O
:	O
a	O
negative	O
disjunctive	O
constraint	O
says	O
that	O
a	O
certain	O
pair	O
of	O
edges	O
cannot	O
simultaneously	O
have	O
a	O
nonzero	O
flow	O
;	O
a	O
positive	O
disjunctive	O
constraints	O
says	O
that	O
,	O
in	O
a	O
certain	O
pair	O
of	O
edges	O
,	O
at	O
least	O
one	O
must	O
have	O
a	O
nonzero	O
flow	O
.	O
</s>
