A Simple Discrete Newton Method for the Quickest Transshipment Problem
Naoyuki Kamiyama
Abstract
The quickest transshipment problem is a problem defined in a dynamic network with multiple sources and multiple sinks. The goal of this problem is to send all the supplies from sources to sinks as quickly as possible. It is known that this problem can be solved in polynomial time. In particular, Schlöter, Skutella, and Tran proposed a strongly polynomial-time discrete Newton method for this problem. In this paper, we propose a simple polynomial-time discrete Newton method for the quickest transshipment problem.
1 Introduction
A dynamic network flow, which was introduced by Ford and Fulkerson [2, 3], is a flow defined in a dynamic network, i.e., a directed graph with capacities and transit times on its arcs. The quickest transshipment problem is a problem defined in a dynamic network with multiple sources and multiple sinks. The goal of this problem is to send all the supplies from sources to sinks as quickly as possible. It is known that the quickest transshipment problem can be solved in polynomial time [5, 13, 14].
Among the polynomial-time algorithms for the quickest transshipment problem, Schlöter, Skutella, and Tran [14] proposed a strongly polynomial-time discrete Newton method for this problem. Compared to the single-sink case [7, 12], which is called the evacuation problem, the discrete Newton method for the case of multiple sinks and sources [14] is more complicated.
In this paper, we propose a simple polynomial-time discrete Newton method for the quickest transshipment problem. Although the time complexity of the proposed algorithm is worse than that of [14], the proposed algorithm has the following features.
In the algorithm of [14], we have to compute the left derivative of some function arising from the problem. On the other hand, in our algorithm, we do not need to compute the left derivative.
*This work was supported by JSPS KAKENHI Grant Number JP24K14825.
In each iteration of the algorithm of [14], we check several candidates for the parameter value. On the other hand, in the proposed algorithm, one candidate is sufficient.
AI disclosure. The result in this paper was obtained by using GPT-6 Astra, and the author independently verified the mathematical correctness and reorganized the proof. Furthermore, ChatGPT was used for proofreading. The author takes full responsibility for the correctness and the content of this paper.
2 Preliminaries
Let R,R+,Z,Z+, and N denote the sets of reals, non-negative reals, integers, non-negative integers, and positive integers, respectively. For each integer z∈Z+, we define [z]:={1,2,…,z} and [z]0:={0,1,…,z}. Define [0]:=∅. For each finite set X, each function η:X→R, and each subset Y⊆X, we define η(Y):=∑e∈Yη(e).
The quickest transshipment problem is defined as follows. In this problem, we are given a finite directed graph D=(V,A) and non-empty disjoint subsets S,T⊆V. Furthermore, we are given a capacity function c:A→N, a transit-time function τ:A→Z+, a supply function b:S∪T→Z such that b(s)>0 for every vertex s∈S, b(t)<0 for every vertex t∈T, and b(S∪T)=0. Define n:=∣V∣, m:=∣A∣, and k:=∣S∪T∣. Assume that D is weakly connected. Then we have m≥n−1.
For each function f:A×Z+→R+, each vertex v∈V, and each integer θ∈Z+, we define
where δA(v) (resp. ϱA(v)) represents the set of arcs in A leaving (resp. entering) v. We assume that ϱA(v)=∅ (resp. δA(v)=∅) for every vertex v∈S (resp. v∈T).
For each integer Θ∈Z+, a function f:A×Z+→R+ is called a feasible dynamic flow with respect to Θ if it satisfies the following conditions.
(D1) Let a and θ be an arc in A and an integer in [Θ]0, respectively.
If θ≤Θ−τ(a), then f(a,θ)≤c(a).
If θ>Θ−τ(a), then f(a,θ)=0.
(D2) For every vertex v∈V∖(S∪T) and every integer θ∈[Θ]0, we have ∂f(v,θ)≤0.
(D3) For every vertex v∈S∪T, ∂f(v,Θ)=b(v).
In this paper, we assume that there exists an integer Θ∈Z+ such that there exists a feasible dynamic flow with respect to Θ. This can be checked in polynomial time as follows. First, we construct a bipartite graph whose vertex set is S∪T. Each pair (s,t)∈S×T is connected by an edge if and only if t is reachable from s in D. Then the edges are directed from S to T. Each vertex v∈S∪T has a supply or demand b(v). Then we check whether there exists a flow from S to T satisfying all the supplies and demands.
The goal of the quickest transshipment problem is to find the minimum integer Θ∈Z+ such that there exists a feasible dynamic flow with respect to Θ.
3 Useful Facts
In this section, we introduce facts that are needed in Section 4.
Assume that we are given a subset X⊆S∪T and an integer Θ∈Z+. Define DΘ(X) as the set of functions f:A×[Θ]0→R+ satisfying (D1) and the following conditions (D4), (D5).
(D4) Let v and θ be a vertex in V and an integer in [Θ]0, respectively.
If v∈V∖X, then ∂f(v,θ)≤0.
If v∈X, then ∂f(v,θ)≥0.
(D5) For every vertex v∈V∖(S∪T), we have ∂f(v,Θ)=0.
Recall that no arc in A enters (resp., leaves) a vertex in S (resp., T). Thus, for every function f∈DΘ(X) and every vertex v∈(S∖X)∪(T∩X), ∂f(v,Θ)=0 holds. Intuitively speaking, an element in DΘ(X) is a dynamic flow from S∩X to T∖X without prescribed supplies. In addition, we define the function oΘ:2S∪T→R+ by
oΘ(X):=max{v∈X∑∂f(v,Θ)f∈DΘ(X)}.
Intuitively speaking, oΘ(X) is the maximum flow value of a dynamic flow from S∩X to T∖X. The following result was cited by Hoppe and Tardos [5] as personal communication.
Lemma 1 (Klinz [5, Theorem 5.1]). For each integer Θ∈Z+, there exists a feasible dynamic flow with respect to Θ if and only if oΘ(X)≥b(X) for every subset X⊆S∪T.
For each subset X⊆S∪T, the goal of the quickest flow problem QF(X) is to compute the minimum integer Θ∈Z+ such that oΘ(X)≥b(X). It is known that this problem can be solved in O(nm2log2n) time [11].1
In what follows, let vS, vT be distinct new vertices that are not contained in V. Then we define U:=V∪{vS,vT}. For each vertex s∈S (resp. t∈T), we define avS,s (resp. at,vT) as an arc from vS to s (resp. t to vT). Furthermore, we define a∗ as the arc from vT to vS.
For each subset X⊆S∪T, we introduce the following definitions. Define
EX:=A∪{avS,s∣s∈S∩X}∪{at,vT∣t∈T∖X}∪{a∗}.
Define the directed graph HX as (U,EX). For each subset X⊆S∪T, a function ξ:EX→R+ is called a feasible static flow with respect to X if it satisfies the following conditions (S1), (S2).
(S1) For every arc a∈A, we have ξ(a)≤c(a).
(S2) For every vertex v∈U, we have ξ(δEX(v))=ξ(ϱEX(v)).
1Precisely speaking, Saho and Shigeno [11] considered the continuous version of dynamic flows. However, it is not difficult to see that this algorithm is also valid for the discrete version.
For each subset X⊆S∪T, we define S(X) as the set of feasible static flows with respect to X. For each subset X⊆S∪T and each real θ∈R+, we define the cost vector kθX∈REX as follows. For each arc a∈A, we define kθX(a):=−τ(a). For each arc a∈EX∖(A∪{a∗}), we define kθX(a):=0. Furthermore, we define kθX(a∗):=θ+1. For each subset X⊆S∪T and each real θ∈R+, we define the problem P(X,θ) as
Maximize⟨kθX,ξ⟩subjecttoξ∈S(X).
Since S(X) is non-empty and bounded (i.e., a non-empty polytope), there exists an extreme-point optimal solution to P(X,θ) (see, e.g., [4, p.15]). Furthermore, for each subset X⊆S∪T, we define ρX:R+→R by
ρX(θ):=max{⟨kθX,ξ⟩∣ξ∈S(X)}.
That is, ρX(θ) is the optimal objective value of P(X,θ).
Lemma 2 (Ford and Fulkerson [2, 3]). For every subset X⊆S∪T and every integer Θ∈Z+, oΘ(X) is equal to ρX(Θ).
It is known that, for every subset X⊆S∪T, ρX is piecewise linear, non-decreasing, and convex [14, p.93]. For each subset X⊆S∪T and each real θ∈R+∖{0}, we define ρX−(θ) as the left derivative of ρX at θ. It should be noted that, in this paper, ρX−(θ) is not used in the proposed algorithm.
4 Algorithm
In this section, we give a new polynomial-time discrete Newton method for the quickest transshipment problem. For each integer θ∈Z+, we define the function Φθ:2S∪T→R by
Φθ(X):=oθ(X)−b(X).
Notice that, for every integer θ∈Z+, Φθ(∅)=0. Define the function d:Z+→R by
d(θ):=X⊆S∪TminΦθ(X).
Then Lemma 1 implies that, for each integer Θ∈Z+, there exists a feasible dynamic flow with respect to Θ if and only if d(Θ)=0. Furthermore, we define p:=∣S∣⋅∣T∣. Then p≤k2.
The proposed method is given in Algorithm 1.
In the course of Algorithm 1, if d(θλ)<0, then Φθλ(Xλ)<0 and Φθλ+1(Xλ)≥0. This and Lemma 1 imply that the number of iterations in Algorithm 1 is bounded by 2k.
Define Θ∗ as the optimal solution to the quickest transshipment problem. Then Lemma 1 implies that, in the course of Algorithm 1, we have Θ∗≥rλ. Furthermore, we define θλ+1:=qλ only when d(qλ)<0, i.e., qλ<Θ∗. Thus, the output of Algorithm 1 is Θ∗.
Algorithm 1: Discrete Newton method for the quickest transshipment problem
1 Set λ:=1. Define θ1:=0.
2 while d(θλ)<0 do
3 Find a minimizer Xλ of Φθλ.
4 Let rλ be the optimal solution of QF(Xλ).
5 Define qλ:=rλ+p(rλ−θλ).
6 If d(qλ)<0, then we define θλ+1:=qλ. Otherwise, we define θλ+1:=rλ.
7 Update λ:=λ+1.
8 end
9 Output θλ, and halt.
4.1 Time complexity
In this section, we prove that Algorithm 1 is a polynomial-time algorithm. Since we can evaluate oθλ(X) for each subset X⊆S∪T in polynomial time (e.g., [9]) and oθλ(⋅) is submodular [5], we can find a minimizer of Φθλ in polynomial time by using any polynomial-time submodular function minimization algorithm (e.g., [6, 8, 15]). Furthermore, Step 4 can be done in polynomial time [11]. Thus, we consider the number of iterations in Algorithm 1.
Assume that Algorithm 1 halts when λ=Π+1 and Π≥1. For every integer ℓ∈[Π], since Φθℓ(Xℓ)<0 and Φrℓ(Xℓ)≥0, we have rℓ>θℓ. Define
IA:={ℓ∈[Π]∣θℓ+1=qℓ},IR:=[Π]∖IA.
Notice that since d(θΠ+1)≥0, we have Π∈IR.
First, we evaluate the size of IA. For each subset X⊆S∪T, we define
Pair(X):={(s,t)∈S×T∣s∈X,t∈/X}.
Lemma 3. For every integer ℓ∈[Π], Pair(Xℓ)=∅.
Proof. Let ℓ be an integer in [Π]. Then d(θℓ)=oθℓ(Xℓ)−b(Xℓ)<0. Thus, since oθℓ(Xℓ)≥0, b(Xℓ)>0. This implies that S∩Xℓ=∅. Furthermore, if T⊆Xℓ, then orℓ(Xℓ)=0. However, this contradicts the fact that orℓ(Xℓ)≥b(Xℓ)>0. Thus, Pair(Xℓ)=∅.
Lemma 4 (Schlöter, Skutella, and Tran [14, Equation (4.2)]). Let X, θ be a subset of S∪T and a real in R+∖{0}, respectively. In addition, we assume that Pair(X)=∅. Then there exists an element (s,t)∈Pair(X) such that
∀Y⊆S∪Ts.t.(s,t)∈Pair(Y):ρY−(θ)≥pρXℓ−(θ).
Lemma 5. ∣IA∣≤p.
Proof. Lemma 3 implies that, for each element ℓ∈IA, Pair(Xℓ)=∅. Thus, Lemma 4 implies that, for each element ℓ∈IA, there exists an element (sℓ,tℓ)∈Pair(Xℓ) such that
Claim 1. (sℓ,tℓ)∈/Pair(Xζ) holds for every pair of elements ℓ,ζ∈IA such that ℓ<ζ.
If we can prove Claim 1, then this lemma can be proved as follows. Since (sℓ,tℓ)∈Pair(Xℓ) for every element ℓ∈IA, Claim 1 implies that (sℓ,tℓ)=(sζ,tζ) for every pair of distinct elements ℓ,ζ∈IA. Assume that ∣IA∣>p. Let ζ be the maximum integer in IA. Since ∣S×T∣≤p,
{(sℓ,tℓ)∣ℓ∈IA∖{ζ}}=S×T.
Thus, since it follows from Claim 1 that (sℓ,tℓ)∈/Pair(Xζ) for every element ℓ∈IA∖{ζ}, we have Pair(Xζ)=∅. However, this contradicts Lemma 3.
Proof of Claim 1. Let ℓ,ζ be elements in IA such that ℓ<ζ.
Since rℓ>θℓ and ρXℓ is convex, the definition of the left derivative implies that
ρXℓ−(rℓ)≥rℓ−θℓρXℓ(rℓ)−ρXℓ(θℓ).(1)
Recall that the definition of rℓ implies that ρXℓ(rℓ)=orℓ(Xℓ)≥b(Xℓ). Thus, (1) implies that
where the last inequality follows from (2) and (3).
Since ρXζ is non-decreasing and θζ≥θℓ+1=qℓ, oθζ(Xζ)≥oqℓ(Xζ). Thus, since Φθζ(Xζ)≥Φqℓ(Xζ), (4) implies that Φθζ(Xζ)≥0. However, since d(θζ)=Φθζ(Xζ), this contradicts the fact that ζ∈[Π]. This completes the proof.
As explained above, Claim 1 completes the proof of this lemma.
Next, we evaluate the size of IR. For each integer z∈N, we define κ(z):=4zlog2z+3.
Lemma 6 (Radzik [10, Lemma 3]). Let τ be a positive integer. Assume that we are given a vector w∈R+τ and vectors z1,z2,…,zδ∈{−1,0,1}τ such that ⟨zi,w⟩>0 for every integer i∈[δ] and ⟨zi,w⟩≥2⋅⟨zi+1,w⟩ for every integer i∈[δ−1]. Then we have δ≤κ(τ).
Lemma 7. Let τ be a positive integer. Assume that we are given a vector w∈R+τ. Define
A:={⟨z,w⟩∣⟨z,w⟩>0,z∈{−1,0,1}τ}.
Assume that A=∅. Then there exist positive reals h1,h2,…,hδ such that δ≤κ(τ) and
A⊆i=1⋃δ{x∈R+∣hi/2<x≤hi}.
Proof. We recursively define hi as follows. Define h1 as the maximum element in A. For each integer i≥2, if there exists an element x∈A such that x≤hi−1/2, then we define
hi:=max{x∈A∣x≤hi−1/2}.
Since A is finite, this procedure terminates. Furthermore, Lemma 6 implies that the number of iterations is at most κ(τ). This completes the proof.
Lemma 8 (See, e.g., [1, pp. 444–447]). Let X be a subset of S∪T, and let ξ be an extreme point in S(X). Then there exists a vector εξ∈{−1,0,1}EX×A such that
∀g∈EX:ξ(g)=a∈A∑εξ(g,a)⋅c(a).
Lemma 9. For every element ℓ∈IR,
Θ∗−rℓ≤p+1p(Θ∗−θℓ).
Proof. Let ℓ be an element in IR. Then since d(qℓ)≥0, Θ∗≤qℓ. Thus,
For each element ℓ∈IR, we define ξℓ as an extreme-point optimal solution to P(Xℓ,rℓ). It follows from Lemma 8 that there exists a vector εξℓ∈{−1,0,1}EXℓ×A such that
Notice that (Θ∗+1)⋅c(a)≥0 for every arc a∈A, τ(a)⋅c(f)≥0 for every pair (a,f)∈A2, and ∣b(v)∣≥0 for every vertex v∈S∪T. Furthermore, these terms do not depend on ℓ.
Lemma 10. For each element ℓ∈IR∖{Π}, we have val(ℓ)>0 and
0<eℓ⋅val(ℓ)≤Nℓ<2⋅eℓ⋅val(ℓ).
Proof. Let ℓ be an element in IR∖{Π}. Since ℓ=Π, eℓ>0.
Since d(θℓ)<0, Φθℓ(Xℓ)<0. Thus, since oθℓ(Xℓ)≥0, b(Xℓ)>0. This implies that
What remains is to prove (6). If the set in the left-hand side of (6) is empty, then (6) clearly holds. Thus, we assume that the set in the left-hand side of (6) is not empty and
Thus, since this implies that Nxj=Nxj+ω, we have ∣Ji∣=∣Ji∣. Furthermore, Lemma 6 implies that ∣Ji∣≤κ(M). This completes the proof. □
Lemmas 5 and 11 imply that Algorithm 1 is a polynomial-time algorithm. In what follows, we derive an explicit running-time bound for Algorithm 1. Lemmas 5 and 11 imply that the number of iterations in Algorithm 1 is O(k2m3), where O(⋅) denotes the Landau symbol omitting all poly-logarithmic factors. Step 3 can be done in O(k3m2) time by using the submodular function minimization algorithm by [8] and the minimum-cost flow algorithm of [9] as an oracle. Step 4 can be done in O(m2n) time [11]. Finally, the total time complexity is O(k5m5+k2m5n). It should be noted that this time complexity is worse than O(k5m2+k3m3+m3n) in [14].
References
[1] Ravindra K. Ahuja, Thomas L. Magnanti, and James B. Orlin. Network flows - Theory, Algorithms and Applications. Prentice Hall, Upper Saddle River, NJ, 1993.
[2] Lester R. Ford, Jr. and Delbert R. Fulkerson. Constructing maximal dynamic flows from static flows. Operations Research, 6(3):419–433, 1958.
[3] Lester R. Ford, Jr. and Delbert R. Fulkerson. Flows in Networks. Princeton University Press, Princeton, NJ, 1962.
[4] Martin Grötschel, László Lovász, and Alexander Schrijver. Geometric Algorithms and Combinatorial Optimization, volume 2 of Algorithms and Combinatorics. Springer, Berlin, Heidelberg, Germany, 2nd corrected edition, 1993.
[5] Bruce Hoppe and Éva Tardos. The quickest transshipment problem. Mathematics of Operations Research, 25(1):36–62, 2000.
[6] Satoru Iwata, Lisa Fleischer, and Satoru Fujishige. A combinatorial strongly polynomial algorithm for minimizing submodular functions. Journal of the ACM, 48(4):761–777, 2001.
[7] Naoyuki Kamiyama. Discrete Newton methods for the evacuation problem. Theoretical Computer Science, 795:510–519, 2019.
[8] Yin Tat Lee, Aaron Sidford, and Sam Chiu-wai Wong. A faster cutting plane method and its implications for combinatorial and convex optimization. In Venkatesan Guruswami, editor, Proceedings of the 56th Annual Symposium on Foundations of Computer Science, pages 1049–1065, Washington, DC, 2015. IEEE Computer Society.
[9] James B. Orlin. A faster strongly polynomial minimum cost flow algorithm. Operations Research, 41(2):338–350, 1993.
[10] Tomasz Radzik. Fractional combinatorial optimization. In Panos M. Pardalos, Ding-Zhu Du, and Ronald L. Graham, editors, Handbook of Combinatorial Optimization, pages 1311–1355. Springer, New York, NY, 2013.
[11] Masahide Saho and Maiko Shigeno. Cancel-and-tighten algorithm for quickest flow problems. Networks, 69(2):179–188, 2017.
[12] Miriam Schlöter. Flows Over Time and Submodular Function Minimization. PhD thesis, Technische Universität Berlin, 2018.
[13] Miriam Schlöter and Martin Skutella. Fast and memory-efficient algorithms for evacuation problems. In Philip N. Klein, editor, Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 821–840, Philadelphia, PA, 2017. Society for Industrial and Applied Mathematics.
[14] Miriam Schlöter, Martin Skutella, and Khai Van Tran. A faster algorithm for quickest transshipments via an extended discrete Newton method. In Joseph (Seffi) Naor and Niv Buchbinder, editors, Proceedings of the 2022 ACM-SIAM Symposium on Discrete Algorithms, pages 90–102, Philadelphia, PA, 2022. Society for Industrial and Applied Mathematics.
[15] Alexander Schrijver. A combinatorial algorithm minimizing submodular functions in strongly polynomial time. Journal of Combinatorial Theory, Series B, 80(2):346–355, 2000.