Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Maximum flow problem

From Wikipedia, the free encyclopedia
Computational problem in graph theory

Flow network for the problem: Each human (ri) is willing to adopt a cat (wi1) and/or a dog (wi2). However each pet (pi) has a preference for only a subset of the humans. Find any matching of pets to humans such that the maximum number of pets are adopted by one of its preferred humans.
Flow network for the problem: Each human (ri) is willing to adopt a cat (wi1) and/or a dog (wi2). However each pet (pi) has a preference for only a subset of the humans. Find any matching of pets to humans such that the maximum number of pets are adopted by one of its preferred humans.

Inoptimization theory,maximum flow problems involve finding a feasible flow through aflow network that obtains the maximum possible flow rate.

The maximum flow problem can be seen as a special case of more complex network flow problems, such as thecirculation problem. The maximum value of an s-t flow (i.e., flow fromsource s tosink t) is equal to the minimum capacity of ans-t cut (i.e., cut severing s from t) in the network, as stated in themax-flow min-cut theorem.

History

[edit]

The maximum flow problem was first formulated in 1954 byT. E. Harris and F. S. Ross as a simplified model of Soviet railway traffic flow.[1][2][3]

In 1955,Lester R. Ford, Jr. andDelbert R. Fulkerson created the first known algorithm, theFord–Fulkerson algorithm.[4][5] In their 1955 paper,[4] Ford and Fulkerson wrote that the problem of Harris and Ross is formulated as follows (see[1] p. 5):

Consider a rail network connecting two cities by way of a number of intermediate cities, where each link of the network has a number assigned to it representing its capacity. Assuming a steady state condition, find a maximal flow from one given city to the other.

In their bookFlows in Networks,[5] in 1962, Ford and Fulkerson wrote:

It was posed to the authors in the spring of 1955 by T. E. Harris, who, in conjunction with General F. S. Ross (Ret.), had formulated a simplified model of railway traffic flow, and pinpointed this particular problem as the central one suggested by the model [11].

where [11] refers to the 1955 secret reportFundamentals of a Method for Evaluating Rail net Capacities by Harris and Ross[3] (see[1] p. 5).

Over the years, various improved solutions to the maximum flow problem were discovered, notably the shortest augmenting path algorithm of Edmonds and Karp and independently Dinitz; the blocking flow algorithm of Dinitz; thepush-relabel algorithm ofGoldberg andTarjan; and the binary blocking flow algorithm of Goldberg and Rao. The algorithms of Sherman[6] and Kelner, Lee, Orecchia and Sidford,[7][8] respectively, find an approximately optimal maximum flow but only work in undirected graphs.

In 2013James B. Orlin published a paper describing anO(|V||E|){\displaystyle O(|V||E|)} algorithm.[9]

In 2022 Li Chen, Rasmus Kyng, Yang P. Liu, Richard Peng, Maximilian Probst Gutenberg, and Sushant Sachdeva published an almost-linear time algorithm running inO(|E|1+o(1)){\displaystyle O(|E|^{1+o(1)})} for theminimum-cost flow problem of which for the maximum flow problem is a particular case.[10][11] For thesingle-source shortest path (SSSP) problem with negative weights another particular case of minimum-cost flow problem an algorithm in almost-linear time has also been reported.[12][13] Both algorithms were deemed best papers at the 2022Symposium on Foundations of Computer Science.[14][15]

Definition

[edit]
A flow network, with sources and sinkt. The numbers next to the edges are the capacities.

First we establish some notation:

Definition. Thecapacity of an edge is the maximum amount of flow that can pass through an edge. Formally it is a mapc:ER+.{\displaystyle c:E\to \mathbb {R} ^{+}.}

Definition. Aflow is a mapf:ER{\displaystyle f:E\to \mathbb {R} } that satisfies the following:

  • Capacity constraint. The flow of an edge cannot exceed its capacity, in other words:fuvcuv{\displaystyle f_{uv}\leq c_{uv}} for all(u,v)E.{\displaystyle (u,v)\in E.}
  • Conservation of flows. The sum of the flows entering a node must equal the sum of the flows exiting that node, except for the source and the sink. Or:
vV{s,t}:u:(u,v)E,fuv>0fuv=u:(v,u)E,fvu>0fvu.{\displaystyle \forall v\in V\setminus \{s,t\}:\quad \sum _{u:(u,v)\in E,f_{uv}>0}f_{uv}=\sum _{u:(v,u)\in E,f_{vu}>0}f_{vu}.}

Remark. Flows are skew symmetric:fuv=fvu{\displaystyle f_{uv}=-f_{vu}} for all(u,v)E.{\displaystyle (u,v)\in E.}

Definition. Thevalue of flow is the amount of flow passing from the source to the sink. Formally for a flowf:ER+{\displaystyle f:E\to \mathbb {R} ^{+}} it is given by:

|f|=v: (s,v)Efsv=u: (u,t)Efut.{\displaystyle |f|=\sum _{v:\ (s,v)\in E}f_{sv}=\sum _{u:\ (u,t)\in E}f_{ut}.}

Definition. Themaximum flow problem is to route as much flow as possible from the source to the sink, in other words find the flowfmax{\displaystyle f_{\textrm {max}}} with maximum value.

Note that several maximum flows may exist, and if arbitrary real (or even arbitrary rational) values of flow are permitted (instead of just integers), there is either exactly one maximum flow, or infinitely many, since there are infinitely many linear combinations of the base maximum flows. In other words, if we sendx{\displaystyle x} units of flow on edgeu{\displaystyle u} in one maximum flow, andy>x{\displaystyle y>x} units of flow onu{\displaystyle u} in another maximum flow, then for eachΔ[0,yx]{\displaystyle \Delta \in [0,y-x]} we can sendx+Δ{\displaystyle x+\Delta } units onu{\displaystyle u} and route the flow on remaining edges accordingly, to obtain another maximum flow. If flow values can be any real or rational numbers, then there are infinitely many suchΔ{\displaystyle \Delta } values for each pairx,y{\displaystyle x,y}.

Algorithms

[edit]

The following tables show the historical development of algorithms for solving the maximum flow problem. Many of the listed publications include similar tables comparing their results to earlier works.

Strongly polynomial

[edit]

Astrongly-polynomial time algorithm has polynomial time bounds that depend only on the number of inputs, but do not depend on the magnitude of these numbers. Here, the inputs are the vertices (numbered below asV{\displaystyle V}) and edges (numbered asE{\displaystyle E}). The complexity of each algorithm is stated usingbig O notation.

MethodYearComplexityDescription
Edmonds–Karp algorithm[16]1969O(VE2){\displaystyle O(VE^{2})}A specialization of Ford–Fulkerson, finding augmenting paths withbreadth-first search.
Dinic's algorithm[17]1970O(V2E){\displaystyle O(V^{2}E)} (arbitrary weights)
O(min{V2/3,E1/2}E){\displaystyle O(\min\{V^{2/3},E^{1/2}\}E)} (unit weights)
Repeated phases that build a "layered" subgraph ofresidual graph edges belonging to shortest paths, usingbreadth-first search, and then find a blocking flow (a maximum flow in this layered graph) in timeO(VE){\displaystyle O(VE)} per phase. The shortest path length increases in each phase so there are at mostV1{\displaystyle V-1} phases.
Karzanov's algorithm[18]1974O(V3){\displaystyle O(V^{3})}A predecessor to thepush-relabel algorithm using preflows (flow functions allowing excess at vertices) to find a blocking flow in each phase of Dinic's algorithm in timeO(V2){\displaystyle O(V^{2})} per phase. The first cubic-time flow algorithm.
Cherkassky's algorithm[19]1977O(V2E){\displaystyle O{\bigl (}V^{2}{\sqrt {E}}{\bigr )}}Combines the blocking flow methods of Dinic (within blocks of consecutive BFS layers) and Karzanov (to combine blocks). The first subcubic strongly polynomial time bound for sparse graphs. Remained best for some values ofE{\displaystyle E} until KRT 1988.
Malhotra, Kumar, and Maheshwari[20]1978O(V3){\displaystyle O(V^{3})}Not an improvement in complexity over Karzanov, but a simplification. Finds blocking flows by repeatedly finding a "reference node" of the layered graph and a flow that saturates all its incoming or outgoing edges, in time proportional to the number of nodes plus the number of saturated edges.
Galil's algorithm[21]1978O(V5/3E2/3){\displaystyle O(V^{5/3}E^{2/3})}Modifies Cherkasky's algorithm by replacing the method for finding flows within blocks of consecutive layers.
Galil, Naamad, andShiloach[22][23]1978O(VE(logV)2){\displaystyle O{\bigl (}VE(\log V)^{2}{\bigr )}}Usestree contraction on a breadth-first search forest of the layered graph to speed up blocking flows. The first of manyO(VEpolylogV){\displaystyle O(VE\operatorname {polylog} V)} algorithms, still the best polynomial exponents for a strongly polynomial algorithm.
Blocking flow withlink/cut trees.[24]1981O(VElogV){\displaystyle O(VE\log V)}Introduces thelink/cut tree data structure and uses it to find augmenting paths in layered networks in logarithmicamortized time per path.
Push–relabel algorithm with link/cut trees[25]1986O(VElogV2E){\displaystyle O\left(VE\log {\frac {V^{2}}{E}}\right)}The push-relabel algorithm maintains a preflow, and a height function estimating residual distance to the sink. It modifies the preflow by pushing excess to lower-height vertices and increases the height function at vertices without residual edges to lower heights, until all excess returns to the source. Link/cut trees allow pushes along paths rather than one edge at a time.
Cheriyan and Hagerup[26]1989randomized,O(VE+V2(logV)2){\displaystyle O{\bigl (}VE+V^{2}(\log V)^{2}{\bigr )}} with high probabilityPush-relabel on a subgraph to which one edge is added at a time, prioritizing pushes of high excess amounts, with randomly permutedadjacency lists
Alon[27]1989O(VE+V8/3logV){\displaystyle O(VE+V^{8/3}\log V)}Derandomization of Cheriyan and Hagerup
Cheriyan, Hagerup, and Mehlhorn[28]1990O(V3logV){\displaystyle \displaystyle O\left({\frac {V^{3}}{\log V}}\right)}Uses Alon's derandomization of Cheriyan and Hagerup with ideas related to theMethod of Four Russians to speed up the search for height-reducing edges on which to push excess.
King, Rao, and Tarjan[29]1992O(VE+V2+ε){\displaystyle O(VE+V^{2+\varepsilon })}
for anyε>0{\displaystyle \varepsilon >0}
Another derandomization of Cheriyan and Hagerup. Preliminary version of King, Rao, and Tarjan 1994 with weaker bounds.
Phillips and Westbrook[30]1993O(VElogE/VV+V(logV)2+ε){\displaystyle O(VE\log _{E/V}V+V(\log V)^{2+\varepsilon })}
for anyε>0{\displaystyle \varepsilon >0}
Improved from King, Rao, and Tarjan 1992 using similar ideas.
King, Rao, and Tarjan[31]1994O(VElogEVlogVV){\displaystyle O\left(VE\log _{\frac {E}{V\log V}}V\right)}Improved from Phillips and Westbrook using similar ideas.
Orlin[9]2013O(VE){\displaystyle O(VE)}Applies a pseudopolynomial algorithm of Goldberg and Rao to a compressed network, maintained using data structures for dynamic transitive closure. Takes timeO(VE+E31/16(logV)2){\displaystyle O{\bigr (}VE+E^{31/16}(\log V)^{2}{\bigr )}}, which simplifies toO(VE){\displaystyle O(VE)} forE=O(V16/15ε){\displaystyle E=O(V^{16/15-\varepsilon })}, while previous bounds simplify toO(VE){\displaystyle O(VE)} forE=Ω(V1+ϵ){\displaystyle E=\Omega (V^{1+\epsilon })}.
Orlin and Gong[32]2021O(VElogVloglogV+logEV){\displaystyle \displaystyle O\left({\frac {VE\log V}{\log \log V+\log {\tfrac {E}{V}}}}\right)}Based on a pseudopolynomial algorithm of Ahuja, Orlin, and Tarjan. Faster than King, Rao, and Tarjan and does not use link/cut trees, but not faster than Orlin + KRT.

Pseudo-polynomial and weakly polynomial

[edit]

In parallel to the development of strongly-polynomial flow algorithms, there has been a long line ofpseudo-polynomial and weakly polynomial time bounds, whose running time depends on the magnitude of the input capacities. Here, the valueU{\displaystyle U} refers to the largest edge capacity after rescaling all capacities tointeger values. (If the network containsirrational capacities, this rescaling may not be possible and these algorithms may not produce exact solutions or may fail to converge even to an approximate solution.) The difference between pseudo-polynomial and weakly polynomial is that a pseudo-polynomial bound may be polynomial inU{\displaystyle U}, but for a weakly polynomial bound it can be polynomial only inlogU{\displaystyle \log U}.

MethodYearComplexityDescription
Ford–Fulkerson algorithm[33]1956O(EU){\displaystyle O(EU)}As long as there is an open path through the residual graph, send the minimum of the residual capacities on that path.
Binary blocking flow algorithm[34]1998O(Emin{V2/3,E1/2}logV2ElogU){\displaystyle O\left(E\cdot \min\{V^{2/3},E^{1/2}\}\cdot \log {\frac {V^{2}}{E}}\cdot \log U\right)}
Kathuria-Liu-Sidford algorithm[35]2020E4/3+o(1)U1/3{\displaystyle E^{4/3+o(1)}U^{1/3}}Interior point methods and edge boosting usingp{\displaystyle \ell _{p}}-norm flows. Builds on earlier algorithm of Madry, which achieved runtimeO~(E10/7U1/7){\displaystyle {\tilde {O}}(E^{10/7}U^{1/7})}.[36]
BLNPSSSW / BLLSSSW algorithm[37]

[38]

2020O~((E+V3/2)logU){\displaystyle {\tilde {O}}((E+V^{3/2})\log U)}Interior point methods and dynamic maintenance of electric flows with expander decompositions.
Gao-Liu-Peng algorithm[39]2021O~(E321328logU){\displaystyle {\tilde {O}}(E^{{\frac {3}{2}}-{\frac {1}{328}}}\log U)}Gao, Liu, and Peng's algorithm revolves around dynamically maintaining the augmenting electrical flows at the core of the interior point method based algorithm from [Mądry JACM ‘16]. This entails designing data structures that, in limited settings, return edges with large electric energy in a graph undergoing resistance updates.
Chen, Kyng, Liu, Peng, Gutenberg and Sachdeva's algorithm[10]2022O(E1+o(1)logU){\displaystyle O(E^{1+o(1)}\log U)}

The exact complexity is not stated clearly in the paper, but appears to beEexpO(log7/8EloglogE)logU{\displaystyle E\exp O(\log ^{7/8}E\log \log E)\log U}

Chen, Kyng, Liu, Peng, Gutenberg and Sachdeva's algorithm solves maximum flow and minimum-cost flow in almost linear time by building the flow through a sequence ofE1+o(1){\displaystyle E^{1+o(1)}} approximate undirected minimum-ratio cycles, each of which is computed and processed in amortizedEo(1){\displaystyle E^{o(1)}} time using a dynamic data structure.
Bernstein, Blikstad, Saranurak, Tu[40]2024O(n2+o(1)logU){\displaystyle O(n^{2+o(1)}\log U)} randomized algorithm when the edge capacities come from the set{1,,U}{\displaystyle \{1,\dots ,U\}}The algorithm is a variant of the push-relabel algorithm by introducing theweighted variant. The paper establishes a weight function on directed and acyclic graphs (DAG), and attempts to imitate it on general graphs using directed expander hierarchies, which induce a natural vertex ordering that produces the weight function similar to that of the DAG special case. The randomization aspect (and subsequently, theno(1){\displaystyle n^{o(1)}} factor) comes from the difficulty in applying directed expander hierarchies to the computation ofsparse cuts, which do not allow for natural dynamic updating.

Integral flow theorem

[edit]

The integral flow theorem states that

If each edge in a flow network has integral capacity, then there exists an integral maximal flow.

The claim is not only that the value of the flow is an integer, which follows directly from themax-flow min-cut theorem, but that the flow onevery edge is integral. This is crucial for manycombinatorial applications (see below), where the flow across an edge may encode whether the item corresponding to that edge is to be included in the set sought or not.

Application

[edit]

Multi-source multi-sink maximum flow problem

[edit]
Fig. 4.1.1. Transformation of a multi-source multi-sink maximum flow problem into a single-source single-sink maximum flow problem

Given a networkN=(V,E){\displaystyle N=(V,E)} with a set of sourcesS={s1,,sn}{\displaystyle S=\{s_{1},\ldots ,s_{n}\}} and a set of sinksT={t1,,tm}{\displaystyle T=\{t_{1},\ldots ,t_{m}\}} instead of only one source and one sink, we are to find the maximum flow acrossN{\displaystyle N}. We can transform the multi-source multi-sink problem into a maximum flow problem by adding aconsolidated source connecting to each vertex inS{\displaystyle S} and aconsolidated sinkconnected by each vertex inT{\displaystyle T} (also known assupersource andsupersink) with infinite capacity on each edge (See Fig. 4.1.1.).

Maximum cardinality bipartite matching

[edit]
Fig. 4.3.1. Transformation of a maximum bipartite matching problem into a maximum flow problem

Given abipartite graphG=(XY,E){\displaystyle G=(X\cup Y,E)}, we are to find amaximum cardinality matching inG{\displaystyle G}, that is a matching that contains the largest possible number of edges. This problem can be transformed into a maximum flow problem by constructing a networkN=(XY{s,t},E){\displaystyle N=(X\cup Y\cup \{s,t\},E')}, where

  1. E{\displaystyle E'} contains the edges inG{\displaystyle G} directed fromX{\displaystyle X} toY{\displaystyle Y}.
  2. (s,x)E{\displaystyle (s,x)\in E'} for eachxX{\displaystyle x\in X} and(y,t)E{\displaystyle (y,t)\in E'} for eachyY{\displaystyle y\in Y}.
  3. c(e)=1{\displaystyle c(e)=1} for eacheE{\displaystyle e\in E'} (See Fig. 4.3.1).

Then the value of the maximum flow inN{\displaystyle N} is equal to the size of the maximum matching inG{\displaystyle G}, and a maximum cardinality matching can be found by taking those edges that have flow1{\displaystyle 1} in an integral max-flow.

Minimum path cover in directed acyclic graph

[edit]

Given adirected acyclic graphG=(V,E){\displaystyle G=(V,E)}, we are to find the minimum number ofvertex-disjoint paths to cover each vertex inV{\displaystyle V}. We can construct a bipartite graphG=(VoutVin,E){\displaystyle G'=(V_{\textrm {out}}\cup V_{\textrm {in}},E')} fromG{\displaystyle G}, where

  1. Vout={voutvVv has outgoing edge(s)}{\displaystyle V_{\textrm {out}}=\{v_{\textrm {out}}\mid v\in V\land v{\text{ has outgoing edge(s)}}\}}
  2. Vin={vinvVv has incoming edge(s)}{\displaystyle V_{\textrm {in}}=\{v_{\textrm {in}}\mid v\in V\land v{\text{ has incoming edge(s)}}\}}
  3. E={(uout,vin)Vout×Vin(u,v)E}{\displaystyle E'=\{(u_{\textrm {out}},v_{\textrm {in}})\in V_{out}\times V_{in}\mid (u,v)\in E\}}.

Then it can be shown thatG{\displaystyle G'} has a matchingM{\displaystyle M} of sizem{\displaystyle m} if and only ifG{\displaystyle G} has a vertex-disjoint path coverC{\displaystyle C} containingm{\displaystyle m} edges andnm{\displaystyle n-m} paths, wheren{\displaystyle n} is the number of vertices inG{\displaystyle G}. Therefore, the problem can be solved by finding the maximum cardinality matching inG{\displaystyle G'} instead.

Assume we have found a matchingM{\displaystyle M} ofG{\displaystyle G'}, and constructed the coverC{\displaystyle C} from it. Intuitively, if two verticesuout,vin{\displaystyle u_{\mathrm {out} },v_{\mathrm {in} }} are matched inM{\displaystyle M}, then the edge(u,v){\displaystyle (u,v)} is contained inC{\displaystyle C}. Clearly the number of edges inC{\displaystyle C} ism{\displaystyle m}. To see thatC{\displaystyle C} is vertex-disjoint, consider the following:

  1. Each vertexvout{\displaystyle v_{\textrm {out}}} inG{\displaystyle G'} can either benon-matched inM{\displaystyle M}, in which case there are no edges leavingv{\displaystyle v} inC{\displaystyle C}; or it can bematched, in which case there is exactly one edge leavingv{\displaystyle v} inC{\displaystyle C}. In either case, no more than one edge leaves any vertexv{\displaystyle v} inC{\displaystyle C}.
  2. Similarly for each vertexvin{\displaystyle v_{\textrm {in}}} inG{\displaystyle G'} – if it is matched, there is a single incoming edge intov{\displaystyle v} inC{\displaystyle C}; otherwisev{\displaystyle v} has no incoming edges inC{\displaystyle C}.

Thus no vertex has two incoming or two outgoing edges inC{\displaystyle C}, which means all paths inC{\displaystyle C} are vertex-disjoint.

To show that the coverC{\displaystyle C} has sizenm{\displaystyle n-m}, we start with an empty cover and build it incrementally. To add a vertexu{\displaystyle u} to the cover, we can either add it to an existing path, or create a new path of length zero starting at that vertex. The former case is applicable whenever either(u,v)E{\displaystyle (u,v)\in E} and some path in the cover starts atv{\displaystyle v}, or(v,u)E{\displaystyle (v,u)\in E} and some path ends atv{\displaystyle v}. The latter case is always applicable. In the former case, the total number of edges in the cover is increased by 1 and the number of paths stays the same; in the latter case the number of paths is increased and the number of edges stays the same. It is now clear that after covering alln{\displaystyle n} vertices, the sum of the number of paths and edges in the cover isn{\displaystyle n}. Therefore, if the number of edges in the cover ism{\displaystyle m}, the number of paths isnm{\displaystyle n-m}.

Maximum flow with vertex capacities

[edit]
Fig. 4.4.1. Transformation of a maximum flow problem with vertex capacities constraint into the original maximum flow problem by node splitting

LetN=(V,E){\displaystyle N=(V,E)} be a network. Suppose there is capacity at each node in addition to edge capacity, that is, a mappingc:VR+,{\displaystyle c:V\to \mathbb {R} ^{+},} such that the flowf{\displaystyle f} has to satisfy not only the capacity constraint and the conservation of flows, but also the vertex capacity constraint

iVfivc(v)vV{s,t}.{\displaystyle \sum _{i\in V}f_{iv}\leq c(v)\qquad \forall v\in V\backslash \{s,t\}.}

In other words, the amount of flow passing through a vertex cannot exceed its capacity. To find the maximum flow acrossN{\displaystyle N}, we can transform the problem into the maximum flow problem in the original sense by expandingN{\displaystyle N}. First, eachvV{\displaystyle v\in V} is replaced byvin{\displaystyle v_{\text{in}}} andvout{\displaystyle v_{\text{out}}}, wherevin{\displaystyle v_{\text{in}}} is connected by edges going intov{\displaystyle v} andvout{\displaystyle v_{\text{out}}} is connected to edges coming out fromv{\displaystyle v}, then assign capacityc(v){\displaystyle c(v)} to the edge connectingvin{\displaystyle v_{\text{in}}} andvout{\displaystyle v_{\text{out}}} (see Fig. 4.4.1). In this expanded network, the vertex capacity constraint is removed and therefore the problem can be treated as the original maximum flow problem.

Maximum number of paths from s to t

[edit]

Given a directed graphG=(V,E){\displaystyle G=(V,E)} and two verticess{\displaystyle s} andt{\displaystyle t}, we are to find the maximum number of paths froms{\displaystyle s} tot{\displaystyle t}. This problem has several variants:

1. The paths must be edge-disjoint. This problem can be transformed to a maximum flow problem by constructing a networkN=(V,E){\displaystyle N=(V,E)} fromG{\displaystyle G}, withs{\displaystyle s} andt{\displaystyle t} being the source and the sink ofN{\displaystyle N} respectively, and assigning each edge a capacity of1{\displaystyle 1}. In this network, the maximum flow isk{\displaystyle k} iff there arek{\displaystyle k} edge-disjoint paths.

2. The paths must be independent, i.e., vertex-disjoint (except fors{\displaystyle s} andt{\displaystyle t}). We can construct a networkN=(V,E){\displaystyle N=(V,E)} fromG{\displaystyle G} with vertex capacities, where the capacities of all vertices and all edges are1{\displaystyle 1}. Then the value of the maximum flow is equal to the maximum number of independent paths froms{\displaystyle s} tot{\displaystyle t}.

3. In addition to the paths being edge-disjoint and/or vertex disjoint, the paths also have a length constraint: we count only paths whose length is exactlyk{\displaystyle k}, or at mostk{\displaystyle k}. Most variants of this problem areNP-complete, except for small values ofk{\displaystyle k}.[41]

Closure problem

[edit]
Main article:Closure problem

Aclosure of a directed graph is a set of verticesC, such that no edges leaveC. Theclosure problem is the task of finding the maximum-weight or minimum-weight closure in a vertex-weighted directed graph. It may be solved inpolynomial time using a reduction to the maximum flow problem.

Real world applications

[edit]

Baseball elimination

[edit]
Construction of network flow for baseball elimination problem

In thebaseball elimination problem there aren teams competing in a league. At a specific stage of the league season,wi is the number of wins andri is the number of games left to play for teami andrij is the number of games left against teamj. A team is eliminated if it has no chance to finish the season in the first place. The task of the baseball elimination problem is to determine which teams are eliminated at each point during the season. Schwartz[42] proposed a method which reduces this problem to maximum network flow. In this method a network is created to determine whether teamk is eliminated.

LetG = (V,E) be a network withs,tV being the source and the sink respectively. One adds a game nodeij – which represents the number of plays between these two teams. We also add a team node for each team and connect each game node{i,j} withi <j toV, and connects each of them froms by an edge with capacityrij – which represents the number of plays between these two teams. We also add a team node for each team and connect each game node{i,j} with two team nodesi andj to ensure one of them wins. One does not need to restrict the flow value on these edges. Finally, edges are made from team nodei to the sink nodet and the capacity ofwk +rkwi is set to prevent teami from winning more thanwk +rk.LetS be the set of all teams participating in the league and let

r(S{k})=i,j{S{k}}i<jrij{\displaystyle r(S-\{k\})=\sum _{i,j\in \{S-\{k\}\} \atop i<j}r_{ij}}.

In this method it is claimed teamk is not eliminatedif and only if a flow value of sizer(S − {k}) exists in networkG. In the mentioned article it is proved that this flow value is the maximum flow value froms tot.

Airline scheduling

[edit]

In the airline industry a major problem is the scheduling of the flight crews. The airline scheduling problem can be considered as an application of extended maximum network flow. The input of this problem is a set of flightsF which contains the information about where and when each flight departs and arrives. In one version of airline scheduling the goal is to produce a feasible schedule with at mostk crews.

To solve this problem one uses a variation of thecirculation problem called bounded circulation which is the generalization ofnetwork flow problems, with the added constraint of a lower bound on edge flows.

LetG = (V,E) be a network withs,tV as the source and the sink nodes. For the source and destination of every flighti, one adds two nodes toV, nodesi as the source and nodedi as the destination node of flighti. One also adds the following edges toE:

  1. An edge with capacity [0, 1] betweens and eachsi.
  2. An edge with capacity [0, 1] between eachdi andt.
  3. An edge with capacity [1, 1] between each pair ofsi anddi.
  4. An edge with capacity [0, 1] between eachdi andsj, if sourcesj is reachable with a reasonable amount of time and cost from the destination of flighti.
  5. An edge with capacity [0,] betweens andt.

In the mentioned method, it is claimed and proved that finding a flow value ofk inG betweens andt is equal to finding a feasible schedule for flight setF with at mostk crews.[43]

Another version of airline scheduling is finding the minimum needed crews to perform all the flights. To find an answer to this problem, a bipartite graphG' = (AB,E) is created where each flight has a copy in setA and setB. If the same plane can perform flightj after flighti,iA is connected tojB. A matching inG' induces a schedule forF and obviously maximum bipartite matching in this graph produces an airline schedule with minimum number of crews.[43] As it is mentioned in the Application part of this article, the maximum cardinality bipartite matching is an application of maximum flow problem.

Circulation–demand problem

[edit]

There are some factories that produce goods and some villages where the goods have to be delivered. They are connected by a networks of roads with each road having a capacityc for maximum goods that can flow through it. The problem is to find if there is a circulation that satisfies the demand.This problem can be transformed into a maximum-flow problem.

  1. Add a source nodes and add edges from it to every factory nodefi with capacitypi wherepi is the production rate of factoryfi.
  2. Add a sink nodet and add edges from all villagesvi tot with capacitydi wheredi is the demand rate of villagevi.

LetG = (V,E) be this new network. There exists a circulation that satisfies the demand if and only if :

Maximum flow value(G)=ivdi{\displaystyle =\sum _{i\in v}d_{i}}.

If there exists a circulation, looking at the max-flow solution would give the answer as to how much goods have to be sent on a particular road for satisfying the demands.

The problem can be extended by adding a lower bound on the flow on some edges.[44]

Image segmentation

[edit]
Source image of size 8x8.
Network built from the bitmap. The source is on the left, the sink on the right. The darker an edge is, the bigger is its capacity. ai is high when the pixel is green, bi when the pixel is not green. The penalty pij are all equal.[45]

In their book, Kleinberg and Tardos present an algorithm forsegmenting an image.[46] They present an algorithm to find the background and the foreground in an image. More precisely, the algorithm takes a bitmap as an input modelled as follows:ai ≥ 0 is the likelihood that pixeli belongs to the foreground,bi ≥ 0 in the likelihood that pixeli belongs to the background, andpij is the penalty if two adjacent pixelsi andj are placed one in the foreground and the other in the background. The goal is to find a partition (A,B) of the set of pixels that maximize the following quantity

q(A,B)=iAai+iBbii,j adjacent|A{i,j}|=1pij{\displaystyle q(A,B)=\sum _{i\in A}a_{i}+\sum _{i\in B}b_{i}-\sum _{\begin{matrix}i,j{\text{ adjacent}}\\|A\cap \{i,j\}|=1\end{matrix}}p_{ij}},

Indeed, for pixels inA (considered as the foreground), we gainai; for all pixels inB (considered as the background), we gainbi. On the border, between two adjacent pixelsi andj, we loosepij. It is equivalent to minimize the quantity

q(A,B)=iAbi+iBai+i,j adjacent|A{i,j}|=1pij{\displaystyle q'(A,B)=\sum _{i\in A}b_{i}+\sum _{i\in B}a_{i}+\sum _{\begin{matrix}i,j{\text{ adjacent}}\\|A\cap \{i,j\}|=1\end{matrix}}p_{ij}}

because

q(A,B)=iABai+iABbiq(A,B).{\displaystyle q(A,B)=\sum _{i\in A\cup B}a_{i}+\sum _{i\in A\cup B}b_{i}-q'(A,B).}
Minimum cut displayed on the network (triangles VS circles).

We now construct the network whose nodes are the pixel, plus a source and a sink, see Figure on the right. We connect the source to pixeli by an edge of weightai. We connect the pixeli to the sink by an edge of weightbi. We connect pixeli to pixelj with weightpij. Now, it remains to compute a minimum cut in that network (or equivalently a maximum flow). The last figure shows a minimum cut.

Extensions

[edit]

1. In theminimum-cost flow problem, each edge (u,v) also has acost-coefficientauv in addition to its capacity. If the flow through the edge isfuv, then the total cost isauvfuv. It is required to find a flow of a given sized, with the smallest cost. In most variants, the cost-coefficients may be either positive or negative. There are various polynomial-time algorithms for this problem.

2. The maximum-flow problem can be augmented bydisjunctive constraints: anegative disjunctive constraint says that a certain pair of edges cannot simultaneously have a nonzero flow; apositive disjunctive constraints says that, in a certain pair of edges, at least one must have a nonzero flow. With negative constraints, the problem becomesstrongly NP-hard even for simple networks. With positive constraints, the problem is polynomial if fractional flows are allowed, but may bestrongly NP-hard when the flows must be integral.[47]

References

[edit]
  1. ^abcSchrijver, A. (2002). "On the history of the transportation and maximum flow problems".Mathematical Programming.91 (3):437–445.CiteSeerX 10.1.1.23.5134.doi:10.1007/s101070100259.S2CID 10210675.
  2. ^Gass, Saul I.; Assad, Arjang A. (2005). "Mathematical, algorithmic and professional developments of operations research from 1951 to 1956".An Annotated Timeline of Operations Research. International Series in Operations Research & Management Science. Vol. 75. pp. 79–110.doi:10.1007/0-387-25837-X_5 (inactive 1 July 2025).ISBN 978-1-4020-8116-3.{{cite book}}: CS1 maint: DOI inactive as of July 2025 (link)
  3. ^abHarris, T. E.; Ross, F. S. (1955)."Fundamentals of a Method for Evaluating Rail Net Capacities"(PDF).Research Memorandum. Archived fromthe original(PDF) on 8 January 2014.
  4. ^abFord, L. R.;Fulkerson, D. R. (1956)."Maximal flow through a network".Canadian Journal of Mathematics.8:399–404.doi:10.4153/CJM-1956-045-5.
  5. ^abFord, L.R., Jr.; Fulkerson, D.R.,Flows in Networks, Princeton University Press (1962).
  6. ^Sherman, Jonah (2013). "Nearly Maximum Flows in Nearly Linear Time".Proceedings of the 54th Annual IEEE Symposium on Foundations of Computer Science. pp. 263–269.arXiv:1304.2077.doi:10.1109/FOCS.2013.36.ISBN 978-0-7695-5135-7.S2CID 14681906.
  7. ^Kelner, J. A.; Lee, Y. T.; Orecchia, L.; Sidford, A. (2014)."An Almost-Linear-Time Algorithm for Approximate Max Flow in Undirected Graphs, and its Multicommodity Generalizations"(PDF).Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms. p. 217.arXiv:1304.2338.doi:10.1137/1.9781611973402.16.ISBN 978-1-61197-338-9.S2CID 10733914. Archived fromthe original(PDF) on 3 March 2016.
  8. ^Knight, Helen (7 January 2014)."New algorithm can dramatically streamline solutions to the 'max flow' problem". MIT News. Retrieved8 January 2014.
  9. ^abOrlin, James B. (2013). "Max flows in O(nm) time, or better".Proceedings of the forty-fifth annual ACM symposium on Theory of Computing. pp. 765–774.CiteSeerX 10.1.1.259.5759.doi:10.1145/2488608.2488705.ISBN 9781450320290.S2CID 207205207.
  10. ^abChen, L.; Kyng, R.; Liu, Y.P.; Gutenberg, M.P.; Sachdeva, S. (2022). "Maximum Flow and Minimum-Cost Flow in Almost-Linear Time".arXiv:2203.00671 [cs.DS].
  11. ^Klarreich, Erica (8 June 2022)."Researchers Achieve 'Absurdly Fast' Algorithm for Network Flow".Quanta Magazine. Retrieved8 June 2022.
  12. ^Bernstein, Aaron; Nanongkai, Danupon; Wulff-Nilsen, Christian (30 October 2022). "Negative-Weight Single-Source Shortest Paths in Near-linear Time".arXiv:2203.03456 [cs.DS].
  13. ^Brubaker, Ben (18 January 2023)."Finally, a Fast Algorithm for Shortest Paths on Negative Graphs".Quanta Magazine. Retrieved25 January 2023.
  14. ^"FOCS 2022".focs2022.eecs.berkeley.edu. Retrieved25 January 2023.
  15. ^Santosh, Nagarakatte."FOCS 2022 Best Paper Award for Prof. Aaron Bernstein's Paper".www.cs.rutgers.edu. Retrieved25 January 2023.
  16. ^Edmonds, Jack; Karp, Richard M. (April 1972). "Theoretical improvements in algorithmic efficiency for network flow problems".Journal of the ACM.19 (2):248–264.doi:10.1145/321694.321699. Previously announced at the International Conference on Combinatorial Structures and their Applications, Calgary, Alberta, 1969,MR 0266680.
  17. ^Dinic, E. A. (1970). "An algorithm for the solution of the problem of maximal flow in a network with power estimation".Doklady Akademii Nauk SSSR.194:754–757.MR 0287976.
  18. ^Karzanov, A. V. (1974). "The problem of finding the maximal flow in a network by the method of preflows".Doklady Akademii Nauk SSSR.215:49–52.MR 0343879.
  19. ^Čerkasskiĭ, B. V. (1977). "An algorithm for the construction of the maximal flow in a network with a labor expenditure ofO(n2p){\displaystyle O(n^{2}{\sqrt {p}})} actions".Mathematical Methods for the Solution of Economic Problems.7:117–126.MR 0503654.
  20. ^Malhotra, V.M.; Kumar, M. Pramodh; Maheshwari, S.N. (1978)."AnO(|V|3){\displaystyle O(|V|^{3})} algorithm for finding maximum flows in networks"(PDF).Information Processing Letters.7 (6):277–278.doi:10.1016/0020-0190(78)90016-9.
  21. ^Galil, Zvi (1980). "AnO(V5/3E2/3){\displaystyle O(V^{5/3}E^{2/3})} algorithm for the maximal flow problem".Acta Informatica.14 (3):221–242.doi:10.1007/BF00264254.MR 0587133. Preliminary version, "A new algorithm for the maximal flow problem",19th Annual Symposium on Foundations of Computer Science (FOCS), 1978.
  22. ^Galil, Zvi; Naamad, Amnon (1980). "AnO(EV(logV)2){\displaystyle O{\bigl (}EV(\log V)^{2}{\bigr )}} algorithm for the maximal flow problem".Journal of Computer and System Sciences.21 (2):203–217.doi:10.1016/0022-0000(80)90035-5. Circulated as an unpublished manuscript in 1978, and published in preliminary form as "Network flow and generalized path compression",20th Annual Symposium on Foundations of Computer Science (FOCS), 1979,doi:10.1145/800135.804394.
  23. ^Shiloach, Yossi. AnO(nIlog2I){\displaystyle O(nI\log ^{2}I)} maximum-flow algorithm (Technical Report STAN-CS-78-802). Stanford University Computer Science Department. As cited byGalil & Naamad (1980)
  24. ^Sleator, Daniel D.;Tarjan, Robert Endre (1983). "A data structure for dynamic trees".Journal of Computer and System Sciences.26 (3):362–391.doi:10.1016/0022-0000(83)90006-5.MR 0710253. Preliminary version,13th ACM Symposium on Theory of Computing (STOC), 1981,doi:10.1145/800076.802464
  25. ^Goldberg, A. V.;Tarjan, R. E. (1988)."A new approach to the maximum-flow problem".Journal of the ACM.35 (4): 921.doi:10.1145/48014.61051.S2CID 52152408. Preliminary version,18th Annual ACM Symposium on Theory of Computing (STOC), 1986,doi:10.1145/12130.12144
  26. ^Cheriyan, Joseph; Hagerup, Torben (1995). "A randomized maximum-flow algorithm".SIAM Journal on Computing.24 (2):203–226.doi:10.1137/S0097539791221529.MR 1320205. Preliminary version in30th Annual Symposium on Foundations of Computer Science (FOCS), 1989,doi:10.1109/SFCS.1989.63465
  27. ^Alon, Noga (1990)."Generating pseudo-random permutations and maximum flow algorithms"(PDF).Information Processing Letters.35 (4):201–204.doi:10.1016/0020-0190(90)90024-R.MR 1066123. Cited as a 1989 manuscript by Cheriyan, Hagerup, and Mehlhorn 1990.
  28. ^Cheriyan, Joseph; Hagerup, Torben;Mehlhorn, Kurt (1996). "Ano(n3){\displaystyle o(n^{3})}-time maximum-flow algorithm".SIAM Journal on Computing.25 (6):1144–1170.doi:10.1137/S0097539791278376.MR 1417893. Preliminary version, "Can a maximum flow be computed ino(nm){\displaystyle o(nm)} time?",17th International Colloquium on Automata, Languages and Programming (ICALP), 1990,doi:10.1007/BFb0032035
  29. ^King, Valerie; Rao, S.;Tarjan, Robert Endre (1992)."A faster deterministic maximum flow algorithm". In Frederickson, Greg N. (ed.).Proceedings of the Third Annual ACM/SIGACT-SIAM Symposium on Discrete Algorithms, 27-29 January 1992, Orlando, Florida, USA. pp. 157–164.
  30. ^Phillips, Steven J.; Westbrook, Jeffery R. (1998). "On-line load balancing and network flow".Algorithmica.21 (3):245–261.doi:10.1007/PL00009214. Preliminary version,25th ACM Symposium on Theory of Computing (STOC), 1993,doi:10.1145/167088.167201.
  31. ^King, V.;Rao, S.;Tarjan, R. (1994). "A faster deterministic maximum flow algorithm".Journal of Algorithms.17 (3):447–474.doi:10.1006/jagm.1994.1044.MR 1300259.
  32. ^Orlin, James B.; Gong, Xiao-yue (2021). "A fast maximum flow algorithm".Networks.77 (2):287–321.doi:10.1002/net.22001.hdl:1721.1/134021.MR 4264487.
  33. ^Ford, L. R. Jr.;Fulkerson, D. R. (1956). "Maximal flow through a network".Canadian Journal of Mathematics.8:399–404.doi:10.4153/CJM-1956-045-5.MR 0079251.
  34. ^Goldberg, A. V.; Rao, S. (1998)."Beyond the flow decomposition barrier".Journal of the ACM.45 (5): 783.doi:10.1145/290179.290181.S2CID 96030.
  35. ^Kathuria, T.; Liu, Y.P.; Sidford, A. (16–19 November 2020).Unit Capacity Maxflow in AlmostO(m4/3){\displaystyle O(m^{4/3})} Time. Durham, NC, USA: IEEE. pp. 119–130.
  36. ^Madry, Aleksander (9–11 October 2016).Computing Maximum Flow with Augmenting Electrical Flows. New Brunswick, New Jersey: IEEE. pp. 593–602.
  37. ^Brand, J. vd; Lee, Y.T.; Nanongkai, D.; Peng, R.; Saranurak, T.; Sidford, A.; Song, Z.; Wang, D. (16–19 November 2020).Bipartite Matching in Nearly-linear Time on Moderately Dense Graphs. Durham, NC, USA: IEEE. pp. 919–930.
  38. ^Brand, J. vd; Lee, Y.T.; Liu, Y.P.; Saranurak, T.; Sidford, A; Song, Z.; Wang, D. (2021). "Minimum Cost Flows, MDPs, and ℓ1-Regression in Nearly Linear Time for Dense Instances".arXiv:2101.05719 [cs.DS].
  39. ^Gao, Y.; Liu, Y.P.; Peng, R. (2021). "Fully Dynamic Electrical Flows: Sparse Maxflow Faster Than Goldberg-Rao".arXiv:2101.07233 [cs.DS].
  40. ^Bernstein, A.; Blikstad, J.; Saranurak, T.; Tu, T. (2024). "Maximum Flow by Augmenting Paths inn2+o(1){\displaystyle n^{2+o(1)}} Time".arXiv:2406.03648 [cs.DS].
  41. ^Itai, A.; Perl, Y.; Shiloach, Y. (1982). "The complexity of finding maximum disjoint paths with length constraints".Networks.12 (3):277–286.doi:10.1002/net.3230120306.ISSN 1097-0037.
  42. ^Schwartz, B. L. (1966). "Possible Winners in Partially Completed Tournaments".SIAM Review.8 (3):302–308.Bibcode:1966SIAMR...8..302S.doi:10.1137/1008062.JSTOR 2028206.
  43. ^abThomas H. Cormen,Charles E. Leiserson,Ronald L. Rivest, andClifford Stein (2001). "26. Maximum Flow".Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill. pp. 643–668.ISBN 978-0-262-03293-3.{{cite book}}: CS1 maint: multiple names: authors list (link)
  44. ^Carl Kingsford."Max-flow extensions: circulations with demands"(PDF).
  45. ^"Project imagesegmentationwithmaxflow, that contains the source code to produce these illustrations".GitLab. Archived fromthe original on 22 December 2019. Retrieved22 December 2019.
  46. ^"Algorithm Design".pearson.com. Retrieved21 December 2019.
  47. ^Schauer, Joachim; Pferschy, Ulrich (1 July 2013). "The maximum flow problem with disjunctive constraints".Journal of Combinatorial Optimization.26 (1):109–119.CiteSeerX 10.1.1.414.4496.doi:10.1007/s10878-011-9438-7.ISSN 1382-6905.S2CID 6598669.

Further reading

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Maximum_flow_problem&oldid=1329969267"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp