Algorithms and complexity for the almost equal maximum flow problem

In the equal maximum flow problem (EMFP), we aim for a maximum flow where we require the same flow value on all arcs in some given subsets of the arc set, so called homologous arc sets. In this article, we study the closely related almost equal maximum flow problems (AEMFP) where the flow values on arcs of one homologous arc set differ at most by the valuation of a so called deviation function Δ$$ \Delta $$ . We prove that the integer AEMFP is in general 𝒩𝒫 ‐complete, and show that even the problem of finding a fractional maximum flow in the case of convex deviation functions is also 𝒩𝒫 ‐complete. This is in contrast to the EMFP, which is polynomial time solvable in the fractional case. Additionally, we provide inapproximability results for the integral AEMFP. For the (fractional) concave AEMFP we state a strongly polynomial algorithm for the linear and concave piecewise polynomial deviation function case for a fixed number of homologous sets using a parametric search approach.


Introduction
The Maximum Flow Problem is a well studied problem in the area of network flow problems.Given a graph G = (V, A) with non-negative edge capacities u : A → R, a source s ∈ V , a sink t ∈ V \ {s} one searches for a s-t-flow f : A → R ≥0 such that 0 ≤ f ≤ u (capacity constraints), for all v = s, t we have f (δ + (v)) − f (δ − (v)) = 0 (flow conservation) and such that the total amount of flow reaching the sink val(f ) := f (δ − (t)) − f (δ + (t)) is maximized.Like in standard notation from the literature, we denote by δ − (v) for a node v the set of ingoing edges, by δ + (v) the set of outgoing edges, and for S ⊆ A abbreviate f (S) := a∈S f (a).
In this paper, we study a variant of the family of equal flow problems, which we call the Almost Equal Flow Problems (AEFP).In addition to the data for the Maximum Flow Problem one is given (not necessarily disjoint) homologous subsets R i ⊆ E for i = 1, . . ., k, monotonically increasing functions ∆ i and one requires for the flow f the homologous edge set condition that f (a) ∈ [f i , ∆ i (f i )] for all e ∈ R i , i = 1, . . ., k, where f i := min e∈Ri f (e) denotes the smallest flow value of an edge in R i .In the special case that all ∆ i are the identity, all edges in a homologous set are required to have the same flow value.This problem is known as the Equal Maximum Flow Problem (EMFP).
The EMFP and related problems have been studied for quite a time.Ali et al. [AKS88] considered a variant of the minimum cost flow problem, where K pairs of edges are required to have the same flow value, which they called equal flow problem.An integer version of this problem, where flow on the edges required to be integer, was also studied by Ali et al. [AKS88] and was shown to be N P-complete.Further, they obtained a heuristic algorithm based on a Lagrangian relaxation technique.Meyer and Schulz [MS09] showed that the integer equal flow problem is not approximable in polynomial time (unless P = N P), even if the edge sets are of size two.Ahuja et al. [AOSZ99] considered the simple equal flow problem, where the flow value on edges of a single subset of the edge set has to be equal.Using Megiddo's parametric search technique [Meg78,Meg81], they present a strongly polynomial algorithm which has a running time of O({m(m + n log n) log n} 2 ).
Here we provide the first complexity results for the AEMFP.Our complexity and approximation results for the AEMFP are covered in Table 1, where the first three rows correspond to the variants of the AEMFP.The columns two to four denote the complexity classes of the different problem variants while the entries of the fifth column contain an upper bound for the best approximation factor for a polynomial algorithm (unless P = N P).If a function ∆ is of the form x → x+c for a fixed constant c ≥ 0 we call ∆ a constant deviation function.For the AEFMP with k homologous edge sets and constant deviation functions, we obtain a running time of where T mf (n, m) denotes the running time of a maximum flow algorithm on a graph G with n nodes and m edges.Note that general polynomial time solvability of the AEMFP in case of constant deviation functions also follows from Tardos' Algorithm, see e.g.[Tar86].Our main algorithmic contribution is a combinatorial method which not only works in the constant deviation case but also for concave functions.
The rest of the paper is organized as follows.In Section 2 we state the formal definition of the AEMFP.The main complexity and approximation results for the general case are provided in Section 3. The case of a constant deviation function is discussed in Section 4 where also the strongly polynomial algorithm based on the parametric search technique is presented.In Section 5 problem variants of the AEMFP are discussed, i.e. the cases of concave and convex deviation functions.We then conclude with a short outlook.

Problem Definition
In this section, we give a formal definition of the Almost Equal Maximum Flow Problem.The AEMFP can be formulated as the following optimization problem in the variables f e (e ∈ E): where f i denotes the minimum flow value on edges from R ∆i .In the integral version, we additionally require f to attain only integral values.Note that, in general the above problem is nonlinear due to the nonlinearity of the deviation functions ∆ i and condition (6).However, if each ∆ i is a constant deviation, then (6) becomes f i ≤ f (r i ) ≤ f i + c i and the AEMFP can be formulated as a linear program.
The simple AEMFP is defined as the AEMFP with just one homologous edge set R ∆ .Note that by subdividing edges that are contained in several homologous edge sets, we can assume without loss of generality that the homologous edge sets are disjoint.

Complexity and Approximation
In this section, we provide complexity and approximation results for the constant deviation, concave and convex AEMFP.
Theorem 1.The integer AEMFP is N P-complete, even if all deviation functions are the same constant deviation function, the homologous sets are disjoint, the capacities are integral, and the graph is bipartite.
Proof.We prove this by a reduction from Exact-3-Set-Cover (X3C).Given an instance of X3C, we construct a graph G in the following way.For each of the q sets S i ∈ S we add a node S i and for each of the q elements a j ∈ A, we add a node a j to G. Further, we add a source node s and a sink node t.We add edges (s, S i ) for i = 1, . . ., k with capacity 5, edges (S i , t) for i = 1, . . ., k with capacity 2, edges (a j , t) for j = 1, . . ., q with capacity 1 and edges between S i and a j if a j is contained in S i with capacity 1.The edges of the form (S i , t) are referred to as bonus edges.We define homologous edge sets R i as {(S i , a j ) : a j ∈ S i } ∪ {(S i , t)} for i = 1, . . ., q and R 0 := {(a j , t) : j = 1, . . ., q} where all these sets have the same constant deviation function ∆ : x → x + 1.Now we want to show that X3C has a solution if and only if there is an integer almost equal maximum s-t-flow in G with value 7q 3 .Assume first that X3C has a solution S ′ .Then, we define an integer almost equal flow as follows: -f (a j , t) = 1, for i = 1, . . ., q.
By definition of the flow f , the homologous edge set constraints, the flow conservation and capacity constraints are fulfilled.Hence, f is an integer almost equal s-t-flow with flow value 7q 3 .Assume there is a flow f ′ which has greater value than f .Due to capacity constraints, this flow must send at least one more unit of flow along an edge of the form (S i , t) with S i / ∈ S ′ .Thus, at least one of the constraints (6) is violated.This is a contradiction to f ′ being feasible and, hence, f is maximal.
Conversely, assume that the almost equal maximum flow in G has flow value 7q 3 .Due to constraint (6), only using bonus edges yield in a flow with value q.Since all flow must be integral and flow preservation holds, we know that f (S i , a j ) ∈ {0, 1} for i, j = 1, . . ., q.For a fixed node S i we distinguish two cases: -If f (S i , a j ) = 1 for three such edges, then the bonus edge (S i , t) carries {0, 1, 2} units of flow, or -if f (S i , a j ) = 0 for at least one of the three edges (S i , a j ), then the flow value f (S i , t) lies in {0, 1}.
Suppose f (a j , t) = 0 for at least one edge.By flow preservation, also f (S i , a j ) = 0 and with (6), we get f (S i , t) ≤ 1.With the considerations above, we get an upper bound on the maximum flow value.From edges of the form (a j , t) we get at most q − 1 units of flow in total, while at most q−3 3 bonus edges can carry 2 units of flow and q − q−3 3 bonus edges carry 1 unit of flow.Hence, we obtain a maximum flow value of 7q 3 − 2. In order to get the desired flow value of 7q 3 , we need f (a j , t) = 1 for all j = 1, . . ., q.Thus, each a j receives one unit of flow from some set node S i .Further, we need f (S i , t) = 2 for at least q 3 edges.We denote the corresponding indices as i 1 , . . ., i q 3 .This can only happen is for each of these i l case 1 is true.Now consider V l := {a j : f (S i l , a j ) = 1}, l = 1, . . ., q 3 .All these sets are subsets of A and are pairwise disjoint.Since |V l | = 3, l = 1, . . ., q 3 , we get that Hence, f (S i , a j ) = 0 for all other i.Choosing S ′ := {S i l : l = 1, . . ., q 3 } gives a X3C solution since each a j appears exactly once in it.This settles the claim.
Theorem 2. Unless P = N P, for any ǫ > 0, there is no polynomial time (2 − ǫ)-approximation algorithm for the integer AEMFP, even if we consider disjoint sets and a constant deviation x → x + 1.
Proof.We extend the instance of the proof of Theorem 1 by adding two additional nodes t ′ , t ′′ .Further, we add one edge (t, t ′ ) with capacity 7q 3 , 7q 3 parallel edges (t ′ , t ′′ ) with capacity 1 and k parallel edges (s, t ′′ ) with capacity 2, which we refer to as bonus edges.
For the edges (t ′ , t ′′ ) and (s, t ′′ ) a homologous edge set R b with ∆ b = 1 is added.The node t ′′ is the new sink, i.e. we are asking for a s-t ′′ -flow.
If there exists a solution of X3C, then flow value is equal to 7q 3 , as proven before, and all of the edges (t, t ′ ) can be fully saturated.This means, on every bonus edge (s, t ′′ ) two units of flow can be send.Overall, this yields in a flow value of Now assume that there exists no solution of X3C.Then the maximum flow value is at most 7q 3 − 1.Hence, at least one of the edges (t ′ , t ′′ ) carries no flow.But since all of the bonus edges are in the same homologous set together with the parallel edges (t ′ , t ′′ ), each bonus edge can carry at most one unit of flow.Again, overall we get a flow value of Thus, for k → ∞, the approximation factor goes to 2.

The Constant Deviation Case
We start with the simple AEMFP.Let G = (V, E) be a graph with a single homologous edge set R and constant deviation function ∆ R : x → x + c.For easier notation, we define Q := E\R as the set of all edges that are not contained in the homologous edge set R. By the homologous edge set condition (6), we know that the flow value on each of the corresponding edges must lie in an interval [λ * , ∆(λ * )] = [λ * , λ * + c], where λ * is unknown.For a guess value λ consider the modified network G λ , where we set the upper capacity of every edge in R to λ + c and its lower capacity from 0 to λ.All edges in Q keep their upper capacities and have lower capacity of 0. By f λ we denote a traditional s-t-flow which is feasible in G λ .
For an (s, t)-cut (S, T ) let us denote by λ its capacity in G λ .By the Max-Flow Min-Cut Theorem we get max We summarize some structural results in the following observation.
Observation 3. The following statements are true.
i) The function is a piecewise linear concave function.
ii) AEMFP can be solved by solving iii) The function F (λ) has at most 2m breakpoints.
iv) The minimum distance between two of these breakpoints is 1 m 2 .
Proof.i) The function F (λ) is the minimum of linear functions in λ and, hence, a concave linear function in λ.
ii) This is a direct consequence of the Max-Flow Min-Cut Theorem. iii | denote the number of outgoing and ingoing edges of R in the cut (S, T ).A breakpoint of F (λ) occurs whenever the cut (S, T ) changes in a way that changes d R (S).As F (λ) is concave and d R (S) counts edges, this can happen at most 2m times.iv) At a breakpoint, we have for two cuts (S, T ), (S ′ , T ′ ).This gives an expression for λ as Note that the denominator is not zero since d R (S) = d R (S ′ ) by definition of a breakpoint.Therefore, the expression for λ is well-defined.Further, we also know (u(δ By denoting U := max{u(r) : r ∈ A} and L := min{l(r) : r ∈ A}, we get W.l.o.g.we can rearrange the two cuts such that both nominator and denominator are positive, i.e. the nominator lies in {1, . . ., mU − mL} and the denominator lies in {1, . . ., |R|} since it just counts the edges.Thus, we get for the breakpoint λ: Hence, the smallest distance between two breakpoints is Observe that the optimal value λ * is attained at a breakpoint of F .At this point the slope to the left is positive or the slope to the right is negative.If there exists a cut such that the slope is 0, we simply take the breakpoint to the left or right of the current value λ.Megiddo [Meg78,Meg81] to search for the optimal value λ * on the interval [0, u R ], where u R := min r∈R∆ u(r) denotes the minimum upper bound of edges in R. We simulate an appropriate maximum flow algorithm, e.g. the Edmonds-Karp algorithm, for symbolic lower capacities λ * and upper capacities λ * + c on the edges in R.   Proof.Correctness: In order to resolve a comparison, we need to decide if the current λ is to the left or to the right of the optimal λ * .Since λ might be a breakpoint, we instead check λ 1 := λ − 1 2m 2 and λ 2 := λ + 1 2m 2 and denote the corresponding cuts as S 1 , S 2 .If d R (S i ) is positive for i = 1, 2, then λ * > λ, since the flow value increases to the right of the current λ.In the same way, if d R (S i ) is negative for i = 1, 2, then the flow value increases to the left of the current λ, i.e. λ * < λ.Hence, since the objective function is concave, the only remaining case is d R (S 1 ) > 0 and d R (S 2 ) < 0. In this case, the flow value decreases in both direction, and we just have to find the unique breakpoint in the interval between λ 1 and λ 2 .This can be done by computing the intersection of g S1 (λ 1 ) and g S2 (λ 2 ).In total, the comparison is correctly resolved.The proposed algorithm is the usual Edmonds-Karp algorithm except for the comparison which has to be made in order to compute the augmenting path.If the comparison is made correctly, this has no influence on the correctness of the Edmonds-Karp algorithm.However, this is the case, since the question

Now we apply the parametric search technique by
Therefore the Edmonds-Karp algorithm with updated comparison resolving is also correct.Now for the algorithm: We set the lower and upper capacities of all edges in R to λ to ensure that they have the same flow.Then, by applying the Edmonds-Karp algorithm that runs with a symbolic parameter on G ′ , we find a feasible flow.
With this, we have a starting flow for the almost equal maximum problem and we can use the Edmonds-Karp algorithm with updated comparison resolving to find an optimal flow since the residual network respects lower capacities.
Running time: The Edmonds-Karp algorithm with updated comparison resolving has at most O(nm) iterations.In each of these, a shortest s-t-path P w.r.t. the number of edges is calculated, which can be done with Breadth-First-Search and therefore needs time O(n + m).Then the algorithm computes the minimum residual capacity on the edges of P .Since P has at most n − 1 edges and each of the residual capacities may depend on the parametric value λ * , there are at most O(n 2 ) comparisons which the algorithm has to resolve.Updating the residual network takes at most 2m comparisons of the form a + bλ < u(r) and a + bλ > 0, thus at most O(m) comparisons have to be resolved.For each comparison, a maximum flow and the corresponding cut have to be computed.Since all other operations are done in constant time, the running time of resolving one comparison is O(T MF (n, m)).Altogether, the Edmonds-Karp algorithm with updated comparison resolving runs in time So, in total the algorithm has a running time of O(m The number of comparisons can be decreased by exploiting implicit parallelism [Meg81]. When building the residual network, the algorithm has to solve l(r) < f (r) and f (r) < u(r) for every edge r ∈ A. Since f (r) = a+bλ, we have to solve up to 2m comparisons.Instead of this, we can first calculate all the values v for which we want to test λ * < v and sort them.To solve the integer version of the maximum AEMFP, we simply use the optimal value λ * of the non-integer version and compute two maximum flows on the graphs G ⌊λ * ⌋ and G ⌈λ * ⌉ .By taking the argmax{val(f ⌊λ * ⌋ ), val(f ⌈λ * ⌉ )} we get the optimal parameter λ * int for the integer version.In the general constant deviation AEMFP we consider more than one homologous edge set.By iteratively using the algorithm for the simple constant deviation AEMFP, we obtain a combinatorial algorithm for the general constant deviation AEMFP.We present the algorithm for the case of two homologous edge sets, but it can be generalized to an arbitrary number of homologous edge sets.The idea behind the algorithm is to fix some λ 1 and then use the algofor the simple case to find the optimal corresponding λ 2 .Once we found λ * 2 (λ 1 ), we check if λ 1 is to the left, right or equal to λ * 1 .Note that the objective function is still a concave function in λ 1 and λ 2 since it is the sum of concave functions.Also, like in the simple case, all flow values and capacities both in the network G and the residual network G f during the algorithm are of the form Note that the running time of the algorithm for the general constant deviation AEMFP increases for every additional homologous edge set roughly by a factor of the running time of the algorithm for the simple constant deviation AEMFP.The next theorem summarizes the results above.Theorem 6.Let T mf (n, m) denote the running time of a not specified maximum flow algorithm on a graph G with n nodes and m edges.The AEMFP with k homologous sets can be solved in time when we use the Edmonds-Karp algorithm as the underlying maximum flow algorithm.
Note that the running time for an arbitrary number of homologous edge sets becomes exponential.Interestingly, using one of the known faster maximum flow algorithms instead of the Edmonds-Karp algorithm does not seem to yield an improved running time, since using an algorithm based on a push-relabeltechnique yields a running time of O(n 3 k • T mf (n, n + m)) (see [Hae19]).
Hence, the sum of the flow value on the edges (S i k , t) for k = 1, 2 is higher which is a contradiction to the maximality of x ′ .
Case 2: x ′ 1 is the smallest value among the flow value on edges of the corresponding homologous edge set and x ′ 2 is strictly larger than the smallest flow value of edges of the corresponding homologous edge set.Then, increasing x ′ Again, this is a contradiction to the maximality of x ′ .
Case 3: x ′ 2 is the smallest flow value on edges of the related homologous edge set, x ′ 1 is strictly larger than the minimum.Then, shifting ǫ units of flow from Also in this case the increasing resp.decreasing by ǫ yields in a higher flow value -a contradiction to the maximality of x ′ .
Conversely, assume that the almost equal maximum flow in G has flow value 8q 3 .We need to show that this induces a solution to X3C and this can be done similar to the proof of Theorem 1 under consideration of the three cases above.This settles the proof.
Theorem 8. Unless P = N P, there is no polynomial time constant factor approximation algorithm for the integer convex AEMFP.
Proof.For this, we use the same reduction as in Theorem 2. For the concave deviation function of the set R b , we choose ∆ k B : x → kx.Then, one can see that the maximum flow value is 0 if no solution of X3C exists and 7 3 q + k if one exists.Thus, unless P = N P, no polynomial time constant factor approximation algorithm can exist.

The Concave Deviation Case
In contrast to the convex case, which is N P-complete even for the fractional case, the concave case is polynomially solvable since in this case the AEMFP becomes a concave program.
In the following we describe an algorithm for this variant using again the parametric search technique [Meg78,Meg81] and a refinement by Toledo [Tol93].We restrict ourselves to the case of one homologous edge set R, but the algorithm can be extended to an arbitrarily number of homologous edge sets according to [Tol93].As we have seen before, we can solve the AEFMP for fixed lower bounds λ i for each homologous edge set R i by a maximum flow computation.Therefore, one can use the parametric search technique by Megiddo [Meg78,Meg81] with symbolic input parameters λ * i in order to find the (unknown) minimizer of F .Also we know that F (•) has no jumps between two breakpoints.Therefore, we restrict ourselves to an interval between two breakpoints and to find a maximizer x * I for every such interval I.In a second step, we evaluate all these local maximizers and find the global solution x * .The problem of finding a maximizer in each of the m intervals can then be done simultaneously.
By using a standard trick in network optimization, we can assume that our graph G has lower bounds 0 and we can apply the Edmonds-Karp algorithm to it.The maximum flow algorithm has to answer questions of the form f λ * (e) = p e (λ * ) ≤ ?min{c(e), ∆(λ * )}.Such a comparison made by the algorithm is equivalent to the question which sign a polynomial concave function p at a given point x has.
Observation 9.During the algorithm, all flow values and all residual capacities can be described by a polynomial p in λ which is of degree at most q.
Proof.We start with the zero flow.In the first step, the residual capacities are either integer or ∆(λ) for some polynomial ∆ of bounded degree.Thus, the residual capacities can be written as a polynomial p(λ) of bounded degree.
Whenever the algorithm augments the flow along a path, it adds two values of the form p 1 (λ), p 2 (λ), where p 1 , p 2 are again polynomials with degree at most δ.This results in a flow value of the same form.
Since the sign of a polynomial is constant between two roots, it is sufficient to restrict ourselves to the roots {r 1 , . . ., r l } of the polynomial p.For every root, we evaluate F and test if its evaluation is equal to x * or else if it is to its left or right.
We know that we can determine the relative position of a point x to x * by evaluating F at this point.In the case of a constant deviation function, we did this by computing the slope of F at x. Here, instead of relying on the slope, we use the idea by Toledo [Tol93].This process is presented in Figure 1.Evaluating F at a point x 1 is a maximum flow computation in the graph G x1 , i.e. the graph where the lower bound on edges of the homologous edge set is set to x 1 .Now we distinguish two cases, either x 1 is to the left or to the right of the maximum x * .First we check if we have already evaluated F at a point x 0 with F (x 1 ) ≥ F (x 0 ).If this is the case, we know that the maximum x * lies in the direction of x 0 .
If we have not found a point with larger value in previous evaluations, we cannot resolve the comparison.The Case 0 of Figure 1 shows this situation.Now, we copy the state of the algorithm and proceed in one copy with the presumption that x 1 lies to the left of x * and in the other copy with the presumption that x 1 lies to the right of x * .These two cases are depicted as Case 1 (or Case 2 resp.) in Figure 1.So, on one side, we calculate a maximum flow for some x 1 < x 0 .If val(f (x 1 )) > val(f (x 0 )), we can resolve the comparison from above.During the Case 0: The maximum could be either to the left or to the right of x 0 .
x 0 x 1 x 2 Case 1: If F (x 1 ) > F (x 0 ) holds, only look to the right of x 1 .
x 0 x 1 x 2 Case 2: If F (x 1 ) < F (x 0 ) holds, copy the state of the algorithm at x 1 and cancel the right side above.whole process, we only have two copies running at any given time.These two copies can be run in parallel, since they only need to communicate right before the next branching step in order to know which branches of the tree to cut.
This enables us to prove the following result: Theorem 10.The AEMFP with a piecewise polynomial concave deviation function ∆ with maximum degree q can be solved in polynomial time for one homologous edge set in time O(mq • (nm • (n + 2m + n 2 )(T MF (n, n + m)))) under the assumption that the roots of a polynomial p of maximum degree q can be computed in constant time O(1).
Proof.Since we have to compute the maximum for every interval, we have to run the algorithm O(mq) times.In each interval, we run the Edmonds-Karp algorithm which has at most O(nm) iterations.In each iteration, the algorithm needs to find a shortest path P w.r.
In the worst case, our algorithm yields a better running time than a direct imple-mentation of the Megiddo-Toledo algorithm for maximizing non-linear concave function in k dimensions, which runs in O((T mf (n, m)) 2 k ) ( [Tol93]).
The integral version of the concave AEMFP turns out to be still hard to solve and hard to approximate.
Theorem 11.The concave integer AEMFP is N P-complete.
Proof.The proof is similar to the proof of Theorem 1.
Theorem 12.Moreover, unless P = N P, there is no polynomial time constant factor approximation algorithm for the integer concave AEMFP.
Proof.For this, we use the same reduction as in Theorem 2. For the concave deviation function of the set R b , we choose ∆ k B : x → kx.Then, one can see that the maximum flow value is 0 if no solution of X3C exists and 7 3 q + k otherwise.Thus, unless P = N P, no polynomial time constant factor approximation algorithm can exist.

Outlook
In this paper, we considered a novel class of flow problems, which we call almost equal flow problems.These are to be understood as a generalization of the equal flow problems.The motivation to study these problems comes from its application of finding an optimal load schedule between energy suppliers and energy consumers, where one tries to use flexibility to shift power consumption from peak times to times of lower grid utilization.This can be modeled in a time-expanded graph that shows the flow of electricity to a consumption unit.Such a consumption unit often has technical limitations that prevent the load from changing too much between successive points in time.These types of constraints can now be modeled by the almost equal property in such a timeexpanded flow network.
For the Almost Equal Maximum Flow case we proved that the problem of finding such an optimal integer flow turns out to be hard to solve in general, regardless of whether the function is given by an affine transformation, a concave function or a convex function.Further, even finding an optimal maximum fractional flow for a convex deviation function is N P-hard to find.Nevertheless, by using the parametric search technique by Megiddo we provide strongly polynomial algorithms if the number of homologous sets is given by a constant and the deviation function is either a constant or concave deviation function.As variants of the Almost Equal Flow Problems, we discussed different deviation functions and obtained complexity results for these problem variants.
Future research should be directed to the question if the network structure can be exploited in order to get faster algorithms for special graph classes.Furthermore, the obtained results can be extended to the Almost Equal Minimum Cost Flow Problem in a similar way.

Observation 4 .
If we run the Edmonds-Karp algorithm, see[EK72], to compute a maximum flow with a symbolic input parameter λ, all flow values and residual capacities which are calculated during the algorithm steps are of the form a + bλ for a, b ∈ Z.Proof.At the start of our algorithm, all flow values are zero.The residual capacities are either integer or of the form bλ for some b ∈ Z, thus can be written as a + bλ.Whenever we augment flow along a path, we add two values of the form a + bλ, resulting in a new value of the same form.Algorithm 1: Symbolic Edmonds-Karp 1 Input: A graph G = (V, E), a source s and a sink t, capacities c ij for all (ij) ∈ E. 2 Initialization: Set f ij ← 0 for all (ij) ∈ E. 3 while there exist a path p in G f do 4 Choose shortest path in G f w.r.t. the number of edges.5 Compute ∆ := min (ij)∈p c f ij by using Algorithm 2 for solving symbolic comparisons. 6

Algorithm 2 : 2 35
Solve Comparison 1 Input: A graph G, lower and upper capacity functions l, u, a homologous edge set R and a test value λ 2 Initialization: Set λ 1 := λ − 1 2m 2 , λ 2 := λ + 1 2m for i = 1, 2 do 4 Compute a maximum flow in G λi .Compute d(S i ) for the corresponding cuts S i .6 if d(S 1 ) > 0 and d(S 2 ) > 0 then 7 return False 8 else 9 if d(S 1 ) < 0 and d(S 2 ) < 0 then 10 return True 11 else 12 Compute λ * as the intersection of g S1 (λ) and g S2 (λ).13 return λ * Lemma 5. Algorithm 1 computes an almost equal maximum flow in time O(n 3 m• T MF (n, n + m)), where T MF (n, n + m) denotes the time needed to compute a maximum flow on a graph with n nodes and n + m edges.
This takes time O(m log m) and afterwards we apply a binary search over these values.In total, we can compute the residual network in time O(m log m • T Comparison ).With the same trick, the time needed to find the minimum residual capacity on a path P is O(n log n • T Comparison ).This results in a running time of O(nm(n log n + m log m)T MF (n, n + m)).

Figure 1 :
Figure 1: The different possible outcomes of the comparison step.

Table 1 :
Overview of the results for the AEMFP.
t. the number of edges, which can be done in O(n + m) time, for example with a Breadth-First-Search. To find the minimum residual capacity on P , the algorithm needs to do O(n 2 ) comparisons.For updating the residual network, again O(m) comparisons are needed.In order to resolve a comparison, first the roots of a polynomial p of bounded degree are computed, which can be done in constant time O(1) by assumption.Evaluating F at a root is a maximum flow computation in the graph G ′ where the lower bounds have been eliminated.Since this graph G ′ has n nodes and n + m edges, we write T MF (n, n + m) for the time needed to compute a maximum flow in this graph.Overall, this yields in a running time of O(mq • (nm •