1 Introduction

Recently, many parts of the world have been affected by disasters including earthquakes, nuclear plant accidents, volcanic eruptions, and flooding, highlighting the urgent need for orderly evacuation planning. One powerful tool for evacuation planning is the dynamic flow model introduced by Ford and Fulkerson [10], which represents movement of commodities over time in a network. In this model, we are given a graph with source vertices and sink vertices. Each source vertex is associated with a positive weight, called a supply; each sink vertex is associated with a positive weight, called a demand; and each edge is associated with a positive length and capacity. An edge capacity limits the amount of supply that can enter the edge per unit time. One variant of the dynamic flow problem is the quickest transshipment problem, in which the objective is to send exactly the right amount of supply out of sources into sinks while satisfying demand constraints in the minimum overall time. Hoppe and Tardos [17] provided a polynomial time algorithm for this problem in the case where the transit times are integral. However, the complexity of their algorithm is very high. Finding a practical polynomial time solution to this is still an open problem. Readers are referred to a recent survey by Skutella [20] on dynamic flows.

This chapter discusses related problems called k-sink problems [3, 5,6,7,8,9, 14,15,16, 18], in which the objective is to find the locations of k sinks in a given dynamic flow network so that all the supply is sent to the sinks as quickly as possible. The following two criteria can be naturally considered for determining the optimality of the locations: minimization of evacuation completion time and aggregate evacuation time (i.e., average evacuation time). We call the k-sink problem that requires finding the locations of k sinks that minimize the evacuation completion time (resp., the aggregate evacuation time) the minmax (resp., minsum) k-sink problem. Although several papers have studied minmax k-sink problems in dynamic flow networks [3, 7,8,9, 14, 15, 18], minsum k-sink problems in dynamic flow networks have not been studied except for the case of path networks [5, 6, 15, 16].Footnote 1 Tables 5.1 and 5.2 summarize the previous results for the minmax k-sink problems and the minsum k-sink problems, respectively.

Table 5.1 Summary of minmax k-sink problems
Table 5.2 Summary of minsum k-sink problems

There are two models for the evacuation method. Under the confluent flow model, all the supply leaving a vertex must evacuate to the same sink through the same edges, and under the non-confluent flow model, there is no such restriction. To our knowledge, almost all of the papers that deal with the k-sink problems [3, 5,6,7,8,9, 15] adopt the confluent flow model, while only one paper [16] handles both of the models.

Although it may seem natural to model the evacuation behavior of people by treating each supply as a discrete quantity as in [17, 18], almost all of the previous papers on sink problems [3, 7,8,9, 14,15,16] have treated each supply as a continuous quantity since it is easier to treat the problems mathematically and the effect is negligible when the number of people is large. Throughout this chapter, we adopt the model with continuous supplies.

We also give an overview of two of our recent results [7, 16] on the problems of locating multiple sinks on dynamic flow path networks such that the max/sum of evacuation times for all the people to sinks is minimized, and we focus on algorithmic frameworks that enable solving the problems in almost linear time.

2 Preliminaries

For two real values ab with \(a < b\), let \([a,b]=\{t \in \mathbb {R} \mid a \le t \le b\}\), \([a,b)=\{t \in \mathbb {R} \mid a \le t < b\}\), \((a,b]=\{t \in \mathbb {R} \mid a < t \le b\}\), and \((a,b)=\{t \in \mathbb {R} \mid a< t < b\}\), where \(\mathbb {R}\) is the set of real values. For two integers ij with \(i \le j\), let \([i..j]=\{h \in \mathbb {Z} \mid i \le h \le j\}\), where \(\mathbb {Z}\) is the set of integers. A dynamic flow path network \(\mathcal {P}\) is given as a 5-tuple \((P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\), where P is a path with vertex set \(V = \{v_i \mid i \in [1..n]\}\) and edge set \(E = \{e_i = (v_i, v_{i+1}) \mid i \in [1..n-1]\}\), \({\mathbf{w}}\) is a vector \(\langle w_1, \ldots , w_n \rangle \) of which each component \(w_i\) is the weight of vertex \(v_i\) representing the amount of supply (e.g., the number of evacuees or cars) located at \(v_i\), \({\mathbf{c}}\) is a vector \(\langle c_1, \ldots , c_{n-1} \rangle \) of which each component \(c_i\) is the capacity of edge \(e_i\) representing the upper bound on the flow amount that can enter \(e_i\) per unit time, \({\mathbf{l}}\) is a vector \(\langle \ell _1, \ldots , \ell _{n-1} \rangle \) of which each component \(\ell _i\) is the length of edge \(e_i\) (i.e., the distance between two end vertices of \(e_i\)), and \(\tau \) is the time taken for unit supply to move unit distance along any edge.

We say that a point p lies on path \(P = (V, E)\), denoted by \(p \in P\), if p lies on a vertex \(v \in V\) or an edge \(e \in E\). We assume that path P can be represented by a horizontal line segment along which the vertices \(v_1,v_2,\ldots ,v_n\) are arranged in order from left to right. For two points \(p, q \in P\), \(p \prec q\) means that p lies to the left side of q. For two points \(p, q \in P\), \(p \preceq q\) means that \(p \prec q\) or p and q lie at the same location. For two points \(p, q \in P\) such that \(p \preceq q\), p divides an edge \((v_i, v_{i+1})\) in the ratio \(r_p:1-r_p\), and q divides an edge \((v_j, v_{j+1})\) in the ratio \(r_q:1-r_q\), let L(pq) be the distance between p and q, that is, \(L(p,q) = (1-r_p)\ell _i + r_q\ell _j + \sum _{h=i+1}^{j-1}\ell _h\) (where \(\sum _{h=i+1}^{i}\ell _h=0\) and \(\sum _{h=i+1}^{i-1}\ell _h=-\ell _i\)). Let us consider two integers \(i,j \in [1..n]\) with \(i<j\). We denote by \(P_{i,j}\) a subpath of P from \(v_i\) to \(v_j\), and by \(\mathcal {P}_{i,j}\) a subnetwork of \(\mathcal {P}\) consisting of subpaths \(P_{i,j}\). Let \(L_{i,j}\) be the distance between \(v_i\) and \(v_j\), that is, \(L_{i,j} = \sum _{h=i}^{j-1}\ell _h\), and let \(C_{i,j}\) be the minimum capacity among all the edges between \(v_i\) and \(v_j\), that is, \(C_{i,j} = \min \{ c_{h} \mid h \in [i..j-1]\}\). For \(i \in [1..n]\), we denote the sum of weights from \(v_1\) to \(v_i\) by \(W_i = \sum _{j=1}^{i}w_j\). Note that, given a dynamic flow path network \(\mathcal {P}\), if we construct two lists of \(W_i\) and \(L_{1,i}\) for all \(i \in [1..n]\) in O(n) preprocessing time, we can obtain \(W_i\) for any \(i \in [1..n]\) and \(L_{i,j} = L_{1,j}-L_{1,i}\) for any \(i,j \in [1..n]\) with \(i<j\) in O(1) time. In addition, \(C_{i,j}\) for any \(i,j \in [1..n]\) with \(i<j\) can be obtained in O(1) time with O(n) preprocessing time, which is known as the range minimum query [1, 4].

A k-sink \(\mathbf{x}\) is a k-tuple \((x_1, \ldots , x_k)\) of points on P such that \(x_i \prec x_j\) for any \(i<j\). We assume that no two sinks lie on the same edge.Footnote 2 We define the function \(\mathrm {Id}\) for point \(p \in P\) as follows: the value \(\mathrm {Id}(p)\) is an integer such that \(v_{\mathrm {Id}(p)} \preceq p \prec v_{\mathrm {Id}(p)+1}\) holds, that is, if p lies on edge \((v_i, v_{i+1})\) or at vertex \(v_i\), \(\mathrm {Id}(p)=i\). A divider \(\mathbf{d}\) is a \((k-1)\)-tuple \((d_1, \ldots , d_{k-1})\) of real values such that \(0 \le d_i < d_j \le W_n\) for any \(i<j\). A pair \((\mathbf{x},\mathbf{d})\) is called valid if and only if \(W_{\mathrm {Id}(x_i)} \le d_i \le W_{\mathrm {Id}(x_{i+1})}\) holds for any i. A valid pair \((\mathbf{x},\mathbf{d})\) determines what amount of supply from which vertex flows to which sink so that the portion \(d_{i} - d_{i-1}\) of supply is assigned to flow to sink \(x_i\), where \(d_0 = 0\) and \(d_k = W_n\). More precisely, given a valid pair \((\mathbf{x},\mathbf{d})\), the portion \(W_{\mathrm {Id}(x_i)} - d_{i-1}\) of supply that originates from the left side of \(x_i\) flows to sink \(x_i\), and the portion \(d_{i} - W_{\mathrm {Id}(x_i)}\) of supply that originates from the right side of \(x_i\) also flows to sink \(x_i\). For instance, under the non-confluent flow model, if \(W_{h-1}< d_i < W_{h}\) where \(h \in [1..n]\), the portion \(d_i - W_{h-1}\) of the \(w_h\) supply at \(v_h\) flows to sink \(x_{i}\) and the rest of the \(W_{h} - d_i\) supply flows to sink \(x_{i+1}\). The difference between the confluent flow model and the non-confluent flow model is that the confluent flow model requires that each value \(d_i\) of a divider \(\mathbf{d}\) must take a value in \(\{W_1, \ldots , W_n\}\), whereas the non-confluent flow model does not. For a dynamic flow path network \(\mathcal {P}\) and a valid pair \((\mathbf{x},\mathbf{d})\), the evacuation completion time \(\mathsf {CT}(\mathcal {P}, \mathbf{x}, \mathbf{d})\) is the time at which all the supply completes the evacuation. The aggregate evacuation time is the sum of the evacuation completion time for all the supply. Explicit definitions of these are given in Sect. 5.3.

3 Objective Functions

Suppose that we are given a divider \(\mathbf{d} = (d_1, \ldots , d_{k-1})\). This \(\mathbf{d}\) implies that we have k 1-sink subproblems. The ith subproblem consists of a subnetwork \(\mathcal {P}_{h,h'}\) such that the weight of \(v_j\) is \(w_{j}\) for \(j \in [h+1..h'-1]\), while those of \(v_h\) and \(v_{h'}\) are \(W_{h} - d_{i-1}\) and \(d_{i} - W_{h'-1}\), respectively, where \(W_{h-1} < d_{i-1} \le W_{h}\) and \(W_{h'-1} < d_{i} \le W_{h'}\). To explicitly define the evacuation completion time and the aggregate evacuation time, we first consider the case of the 1-sink problem, and then extend the argument to the general case of the k-sink problem.

3.1 Objective Functions for the 1-Sink Problem

Given a dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\) with n vertices, we assign a unique sink to a point x, that is, \(\mathbf{x} = (x)\) and \(\mathbf{d} = ()\), which is the 0-tuple. We consider only the case where x is on an edge \(e_i\) excluding its end vertices, that is, \(v_i \prec x \prec v_{i+1}\), since the case where x is on a vertex can be treated similarly. In this case, all the supply on the left side of x (i.e., at \(v_1, \ldots , v_{i}\)) flows to the right toward sink x, and all the supply on the right side of x (i.e., at \(v_{i+1}, \ldots , v_n\)) flows to the left toward sink x.

To treat this case, we introduce some new notation. Let the function \(\theta ^{x,+}(z)\) denote the time at which the first \(z - W_{i}\) of supply on the right side of x completes its evacuation to sink x (where \(\theta ^{x,+}(z) = 0\) for \(z \in [0,W_i]\)). Similarly, let \(\theta ^{x, -}(z)\) denote the time at which the first \(W_{i} - z\) of supply on the left side of x completes its evacuation to sink x (where \(\theta ^{x,-}(z) = 0\) for \(z \in [W_{i},W_n]\)). Higashikawa [13] showed that the values \(\theta ^{x,+}(W_n)\) and \(\theta ^{x,-}(0)\), which are the evacuation completion times for all the supply on the right and left sides of x, respectively, are given by the following formulae:

$$\begin{aligned} \theta ^{x,+}(W_n)&= \max \left\{ \frac{W_{n} - W_{j-1} }{ C_{i,j} }+ \tau \cdot L(x,v_j) \mid j \in [i+1..n] \right\} , \text { and} \end{aligned}$$
(5.1)
$$\begin{aligned} \theta ^{x,-}(0)&= \max \left\{ \frac{W_{j}}{ C_{j,i+1} }+ \tau \cdot L(v_j,x) \mid j \in [1..i] \right\} . \end{aligned}$$
(5.2)

Using these, the evacuation completion time \(\mathsf {CT}(\mathcal {P}, (x), ())\) is given by

$$\begin{aligned} \mathsf {CT}(\mathcal {P}, (x), ()) = \max \left\{ \theta ^{x,+}(W_n), \theta ^{x,-}(0)\right\} . \end{aligned}$$
(5.3)

We can generalize formulae (5.1) and (5.2) to the case of any \(z \in [0,W_n]\) as follows:

$$\begin{aligned} \theta ^{x, +}(z) = \max \{ \theta ^{x, +, j}(z) \mid j \in [i+1..n]\}, \end{aligned}$$
(5.4)

where \(\theta ^{x, +, j}(z)\) for \(j \in [i+1..n]\) is defined as

$$\begin{aligned} \theta ^{x, +, j}(z) = \left\{ \begin{array}{ll} 0 &{} \text {if } z \le W_{j-1}, \\ \frac{z - W_{j-1}}{C_{i,j}} + \tau \cdot L(x,v_j) &{} \text {if } z > W_{j-1}, \end{array} \right. \end{aligned}$$
(5.5)

and

$$\begin{aligned} \theta ^{x, -}(z) = \max \{ \theta ^{x, -, j}(z) \mid j \in [1..i]\}, \end{aligned}$$
(5.6)

where \(\theta ^{x, -, j}(z)\) is defined for \(j \in [1..i]\) as

$$\begin{aligned} \theta ^{x, -, j}(z) = \left\{ \begin{array}{ll} \frac{W_{j} - z}{C_{j,i+1}} + \tau \cdot L(v_j,x) &{} \text {if } z < W_j, \\ 0 &{} \text {if } z \ge W_j. \end{array} \right. \end{aligned}$$
(5.7)

Then, the aggregate evacuation times for the supply on the right and left sides of x are

$$\begin{aligned} \int _{W_i}^{W_n}\theta ^{x, +}(z)dz \quad \text {and} \quad \int _{0}^{W_{i}}\theta ^{x, -}(z)dz, \end{aligned}$$

respectively. Thus, the aggregate evacuation time \(\mathsf {AT}(\mathcal {P}, (x), ())\) is given by

$$\begin{aligned} \mathsf {AT}(\mathcal {P}, (x), ()) = \int _{0}^{W_{i}}\theta ^{x, -}(z)dz + \int _{W_i}^{W_n}\theta ^{x, +}(z)dz. \end{aligned}$$
(5.8)

See also Fig. 5.1.

Fig. 5.1
figure 1

The blue (resp., red) thick half-open segments indicate the function \(\theta ^{x,+}(z)\) (resp., \(\theta ^{x,-}(z)\)). The gray area indicates \(\mathsf {AT}(\mathcal {P}, (x), ())\)

3.2 Objective Functions for k-Sink

Let us consider a valid pair consisting of a k-sink \(\mathbf{x} = (x_1, \ldots , x_k)\) and a divider \(\mathbf{d} = (d_1, \ldots , d_{k-1})\) such that each sink is on an edge excluding its end vertices, that is, \(v_{\mathrm {Id}(x_i)} \prec x_i \prec v_{\mathrm {Id}(x_i)+1}\). In this situation, for each \(i \in [1..k]\), the first \(d_{i} - W_{\mathrm {Id}(x_i)}\) of supply on the right side of \(x_i\) and the first \(W_{\mathrm {Id}(x_i)} - d_{i-1}\) of supply on the left side of \(x_i\) move to sink \(x_i\). By the argument of the previous section, the evacuation completion times for the supply on the right and left sides of \(x_i\) are represented by

$$\begin{aligned} \theta ^{x_i, +}(d_i) \text { and } \theta ^{x_i,-}(d_{i-1}), \end{aligned}$$

respectively. Thus, the evacuation completion time \(\mathsf {CT}(\mathcal {P}, \mathbf{x}, \mathbf{d})\) is given by

$$\begin{aligned} \mathsf {CT}(\mathcal {P}, \mathbf{x}, \mathbf{d}) = \max \left\{ \theta ^{x_i, +}(d_i), \theta ^{x_i,-}(d_{i-1}) \mid i \in [1..k] \right\} , \end{aligned}$$
(5.9)

where \(d_0=0\) and \(d_k=W_n\). The aggregate evacuation times for the supply on the right and left sides of \(x_i\) are

$$\begin{aligned} \int _{W_{\mathrm {Id}(x_i)}}^{d_i} \theta ^{x_i, +}(z)dz \quad \text {and} \quad \int _{d_{i-1}}^{W_{\mathrm {Id}(x_i)}} \theta ^{x_{i},-}(z)dz, \end{aligned}$$

respectively. Thus, the aggregate evacuation time \(\mathsf {AT}(\mathcal {P}, \mathbf{x}, \mathbf{d})\) is given by

$$\begin{aligned} \mathsf {AT}(\mathcal {P}, \mathbf{x}, \mathbf{d}) = \sum _{i \in [1..k]} \left( \int _{d_{i-1}}^{W_{\mathrm {Id}(x_i)}} \theta ^{x_{i},-}(z)dz + \int _{W_{\mathrm {Id}(x_i)}}^{d_i} \theta ^{x_i, +}(z)dz \right) , \end{aligned}$$
(5.10)

where \(d_0=0\) and \(d_k=W_n\).

4 Minmax k-Sink Problems on Paths

In this section, we consider the minmax k-sink problems on path networks under the confluent flow model, which is precisely defined as

(Minmax-k-Sink-Path-Confluent-Flow)

Input: A dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\).

Goal: Find a solution \((\mathbf{x}, \mathbf{d})\) to the problem

For the Minmax-k-Sink-Path-Confluent-Flow problem, [7] reported the following result, which is the best so far:

Theorem 5.1

([7]) The Minmax-k-Sink-Path-Confluent-Flow problem can be solved in \(O(\min \{n\log n+ k^2 \log ^4 n,n\log ^3 n\})\) time. Moreover, if the capacities of \(\mathcal {P}\) are uniform, the Minmax-k-Sink-Path-Confluent-Flow problem can be solved in \(O(\min \{n+ k^2 \log ^2 n,n\log n\})\) time.

Theorem 5.1 implies that the problem is solved in almost linear time for any k. In [7], two kinds of algorithms are provided: One is an \(O(n \log n + k^2\log ^4 n)\) time algorithm based on the parametric search method, and the other is an \(O(n \log ^3 n)\) time algorithm based on the sorted matrix method.

Both algorithms require repeatedly solving the problems of locating 1-sink for multiple choices of different subnetworks. Note that the optimal solution for the problem of locating 1-sink on \(\mathcal {P}_{i,j}\) is a point \(x^*\) that minimizes the following expression over \(x \in P_{i,j}\)

$$\begin{aligned} \mathsf {CT}(\mathcal {P}_{i,j}, (x), ()) = \max \left\{ \theta ^{x,+}(W_j), \theta ^{x,-}(W_{i-1})\right\} . \end{aligned}$$
(5.11)

Both algorithms also require repeatedly performing feasibility tests for multiple choices of different subnetworks. We say that \(\mathcal {P}_{i,j}\) is (tq)-feasible if and only if the answer of the following decision problem is “yes”:

(Feasibility-Test-for-Subpath)

Input: A dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\), a positive real \(t \in \mathbb {R}^+\), integers qij satisfying \(q \in [1..k]\) and \(i,j \in [1..n]\) with \(i<j\).

Goal: Determine whether there exists a pair of vectors \((\mathbf{x'}, \mathbf{d'})\) such that

Note that [7] developed a data structure called the CUE tree to efficiently compute \(\theta ^{x,-}(W_{i-1})\) and \(\theta ^{x,+}(W_{j})\) for any integers \(i,j \in [1..n]\) with \(i < j\) and any \(x \in P_{i,j}\). For the case of general edge capacities, the CUE tree can be constructed in \(O(n \log n)\) time, and \(\theta ^{x,-}(W_{i-1})\) and \(\theta ^{x,+}(W_{j})\) can be computed in \(O(\log ^2 n)\) time by using the CUE tree. See [7] for more detail.

Lemma 5.1

([7]) Given a dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\) with n vertices, the CUE tree can be constructed in \(O(n \log n)\) time. Moreover, if the capacities of \(\mathcal {P}\) are uniform, the CUE tree can be constructed in O(n) time.

Lemma 5.2

([7]) Given a dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\) with n vertices, suppose that the CUE tree is available. Then, for any integers \(i,j \in [1..n]\) with \(i < j\) and any \(x \in P_{i,j}\), \(\theta ^{x,-}(W_{i-1})\) and \(\theta ^{x,+}(W_{j})\) can be computed in \(O(\log ^2 n)\) time. Moreover, if the capacities of \(\mathcal {P}\) are uniform, \(\theta ^{x,-}(W_{i-1})\) and \(\theta ^{x,+}(W_{j})\) can be computed in \(O(\log n)\) time.

In the rest of this section, we first describe how feasibility tests are performed in Sect. 5.4.1 and how the 1-sink problem for a subnetwork is solved in Sect. 5.4.2, and then show the frameworks of the parametric search method in Sect. 5.4.3 and the sorted matrix method in Sect. 5.4.4.

4.1 Feasibility Test

In [7], to solve the Minmax-k-Sink-Path-Confluent-Flow problem, an algorithm repeatedly tests the (tq)-feasibility of \(\mathcal {P}_{i,j}\) for multiple choices of different 4-tuples (tqij). Let \(\mathsf {CT}_\mathsf{OPT}(q,i,j)\) denote the optimal cost for the problem of locating q-sink on \(\mathcal {P}_{i,j}\). Then, for a positive real \(t \in \mathbb {R}^+\), integers qij satisfying \(q \in [1..k]\) and \(i,j \in [1..n]\) with \(i<j\), \(\mathcal {P}_{i,j}\) is (tq)-feasible if and only if \(\mathsf {CT}_\mathsf{OPT}(q,i,j) \le t\) holds.

Lemma 5.3

([7]) Given a dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\) with n vertices, suppose that the CUE tree is available. For integers qij satisfying \(q \in [1..k]\) and \(i, j \in [1..n]\) with \(i<j\), the (tq)-feasibility of \(\mathcal {P}_{i,j}\) can be tested in \(O(\min \{n\log ^2 n, k\log ^3 n\})\) time. Moreover, if the capacities of \(\mathcal {P}\) are uniform, the (tq)-feasibility of \(\mathcal {P}_{i,j}\) can be tested in \(O(\min \{n, k\log n\})\) time.

Proof

We prove only the case of general capacities. For the case of uniform capacity, see [7].

To determine the (tq)-feasibility of \(\mathcal {P}_{i,j}\), we first place the sinks consecutively from left to right as far to the right as possible. We then compute the maximum integer h such that \(\theta ^{v_h,-}(W_{i-1}) \le t\) and \(\theta ^{v_{h+1},-}(W_{i-1}) > t\) holds. Next, we solve

$$\begin{aligned} \theta ^{v_{h+1},-}(W_{i-1}) - \alpha \cdot \tau \ell _h = t \end{aligned}$$
(5.12)

for \(\alpha \). If \(\alpha < 1\), we move the leftmost sink \(x_1\) to the point that divides edge \(e_h = (v_h, v_{h+1})\) at a ratio of \(1-\alpha : \alpha \), otherwise we place \(x_1\) at \(v_{h}\). We then compute the maximum integer \(l_1\) such that \(\theta ^{x_1,+}(W_{l_1}) \le t\) and \(\theta ^{x_1,+}(W_{{l_1}+1}) > t\) holds. We thus determine the maximal subnetwork \(\mathcal {P}_{i,{l_1}}\) such that \(\mathsf {CT}_\mathsf{OPT}(1,i,{l_1}) \le t\). In the same manner, we repeatedly isolate the maximal subnetworks \(\mathcal {P}_{i,l_1}, \mathcal {P}_{l_1+1,l_2}, \mathcal {P}_{l_2+1,l_3}, \ldots \), and if the qth subnetwork is found to have \(l_q < j\), then \(\mathcal {P}_{i,j}\) is not (tq)-feasible, otherwise it is (tq)-feasible.

Let us now look at the time complexity. Isolating \(\mathcal {P}_{i,l_1}\) consists of (a) computing h, (b) solving the equation for \(\alpha \), and (c) computing \(l_1\). Obviously (b) takes O(1) time. For (a), applying a binary search takes \(O(\log ^3 n)\) time because we compute \(\theta ^{v_a,-}(W_{i-1})\) over \(a \in [i..j]\) \(O(\log n)\) times and each \(\theta ^{v_a,-}(W_{i-1})\) can be computed in \(O(\log ^2 n)\) time using the CUE tree by Lemma 5.2. Similarly (c) takes \(O(\log ^3 n)\) time by binary search. In this way, we can isolate at most q subnetworks in \(O(q\log ^3 n) = O(k\log ^3 n)\) time. However, if we simply scan from left to right instead of using a binary search for (a) and (c), that is, if we compute \(\theta ^{v_a,-}(W_{i-1})\) for \(a = i, i+1, \ldots , h, h+1\) and \(\theta ^{x_1,-}(W_b)\) for \(b = h+1, h+2, \ldots , l_1, l_1+1\), it takes \(O((l_1-i)\log ^2 n)\) time to determine \(P_{i,l_1}\). In this way, we can isolate at most p subnetworks in \(O((j-i)\log ^2 n) = O(n \log ^2 n)\) time.\(\square \)

4.2 Solving the 1-Sink Problem

Lemma 5.4

([7]) Given a dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\) with n vertices, suppose that the CUE tree is available. For any integers ij satisfying \(i,j \in [1..n]\) with \(i<j\), \(\mathsf {CT}_\mathsf{OPT}(1, i, j)\) can be computed in \(O(\log ^3 n)\) time. Moreover, if the capacities of \(\mathcal {P}\) are uniform, \(\mathsf {CT}_\mathsf{OPT}(1, i, j)\) can be computed in \(O(\log n)\) time.

Proof

We prove only the case of general capacities. See [7] for the case of uniform capacity.

Recalling Eq. (5.11), we have

$$\begin{aligned} \mathsf {CT}_\mathsf{OPT}(1, i, j)&= \min _{x \in P_{i,j}} \mathsf {CT}(\mathcal {P}_{i,j},(x),()) \nonumber \\&= \min _{x \in P_{i,j}} \max \left\{ \theta ^{x,+}(W_j), \theta ^{x,-}(W_{i-1})\right\} . \end{aligned}$$
(5.13)

Because \(\theta ^{x,+}(W_j)\) and \(\theta ^{x,-}(W_{i-1})\) are monotonically decreasing and monotonically increasing, respectively, in \(x \in P_{i,j}\), if an integer \(h \in [i..j]\) satisfies \(\theta ^{v_h,-}(W_{i-1}) \le \theta ^{v_{h},+}(W_{j})\) and \(\theta ^{v_{h+1},-}(W_{i-1}) > \theta ^{v_{h+1},+}(W_{j})\), then there exists \(x^*\) that minimizes \(\mathsf {CT}(\mathcal {P}_{i,j},(x),())\) on edge \(e_h\) including \(v_h\) and \(v_{h+1}\). We can apply binary search to compute this h, which can be done in \(O(\log ^3 n)\) time using the CUE tree (see Lemma 5.2). Once h is determined, \(x^*\) can be computed as follows: We solve

$$\begin{aligned} \theta ^{v_{h+1},-}(W_{i-1}) - \alpha \cdot \tau \ell _h = \theta ^{v_{h},+}(W_{j}) - (1-\alpha ) \cdot \tau \ell _h \end{aligned}$$
(5.14)

for \(\alpha \) in O(1) time. If \(\alpha \le 0\), let \(x^*=v_{h+1}\) and compute \(\mathsf {CT}_\mathsf{OPT}(1, i, j) = \mathsf {CT}(\mathcal {P}_{i,j},(v_{h+1}),())\). If \(\alpha \ge 1\), let \(x^*=v_{h}\) and compute \(\mathsf {CT}_\mathsf{OPT}(1, i, j) = \mathsf {CT}(\mathcal {P}_{i,j},(v_{h}),())\). Otherwise, let \(x^*\) be the point that divides edge \(e_h = (v_h, v_{h+1})\) at a ratio of \(1-\alpha : \alpha \) and compute \(\mathsf {CT}_\mathsf{OPT}(1, i, j) = \theta ^{v_{h+1},-}(W_{i-1}) - \alpha \cdot \tau \ell _h = \theta ^{v_{h},+}(W_{j}) - (1-\alpha ) \cdot \tau \ell _h\). Using the CUE tree, we can compute these values in \(O(\log ^2 n)\) time. Thus, \(\mathsf {CT}_\mathsf{OPT}(1, i, j)\) can be computed in \(O(\log ^3 n) + O(1) + O(\log ^2 n) = O(\log ^3 n)\) time.\(\square \)

4.3 Parametric Search Method

In the parametric search method, we first compute the maximum integer \(i_1\) such that \(\mathcal {P}_{i_1+1,n}\) is not \((\mathsf {CT}_\mathsf{OPT}(1, 1, i_1),k-1)\)-feasible and store \(t_1 = \mathsf {CT}_\mathsf{OPT}(1, 1, i_1+1)\) as a feasible value. Note that \(t^* = \mathsf {CT}_\mathsf{OPT}(k, 1, n)\) satisfies \(\mathsf {CT}_\mathsf{OPT}(1, 1, i_1) < t^* \le t_1\). To compute \(i_1\), we apply binary search by executing \(O(\log n)\) tests for \((\mathsf {CT}_\mathsf{OPT}(1, 1, a),k-1)\)-feasibility of \(\mathcal {P}_{a+1,n}\) over \(1 \le a \le n\). For an integer a, we can compute \(\mathsf {CT}_\mathsf{OPT}(1, 1, a)\) in \(O(\log ^3 n)\) time by Lemma 5.4. Also, by Lemma 5.3, we can test whether \(\mathcal {P}_{a+1,n}\) is \((\mathsf {CT}_\mathsf{OPT}(1, 1, a),k-1)\)-feasible in \(O(k\log ^3 n)\) time. Summarizing these arguments, we can compute \(i_1\) and \(t_1\) in \(\{O(\log ^3 n) + O(k\log ^3 n)\}\times O(\log n)=O(k \log ^4 n)\) time. Next, we compute the maximum integer \(i_2\) such that \(\mathcal {P}_{i_2+1,n}\) is not \((\mathsf {CT}_\mathsf{OPT}(1, i_1+1, i_2),k-2)\)-feasible and store \(t_2 = \mathsf {CT}_\mathsf{OPT}(1, i_1+1, i_2+1)\) as a feasible value, which can be done in \(O(k \log ^4 n)\) time in the same manner as in the computation of \((i_1,t_1)\). Sequentially, we determine \((i_3,t_3), \ldots , (i_{k-1},t_{k-1})\) in \((k-3) \times O(k \log ^4 n)\) time and eventually compute \(t_k = \mathsf {CT}_\mathsf{OPT}(1, i_{k-1}+1, n)\) in \(O(\log ^3 n)\) time. Note that \(t^* = \min \{t_i \mid i = 1, 2, \ldots , k\}\) holds, which can be computed in O(k) time. We then execute a \((t^*,k)\)-feasibility test for \(\mathcal {P}\) in \(O(k \log ^3 n)\) time, so that the optimal k-sink is obtained. We thus see that the problem can be solved in \((k-1) \times O(k \log ^4 n) + O(\log ^3 n) +O(k) + O(k \log ^3 n) = O(k^2 \log ^4 n)\) time once the CUE tree is constructed. Since it takes \(O(n \log n)\) time to construct the CUE tree by Lemma 5.1, the total time complexity is \(O(n \log n + k^2 \log ^4 n)\).

For the case of uniform capacity, the same argument holds. Applying Lemmas 5.15.3, and 5.4, we have a total time complexity of \(O(n + k^2 \log ^2 n)\).

4.4 Sorted Matrix Method

A matrix A is sorted if and only if each row and column of A is sorted in non-decreasing order. The sorted matrix method is based on the following lemma shown in [11]:

Lemma 5.5

([11]) Consider a minimization problem Q with an instance \(\mathcal {I}\) of size n. Suppose that the feasibility of any value for \(\mathcal {I}\) can be tested in g(n) time. Let A be an \(n \times n\) sorted matrix such that each element can be computed in f(n) time. Then, the minimum element of A that is feasible for Q can be found in \(O(n f(n) + g(n) \log n)\) time.

In [7], an \(n\times n\) matrix A is defined such that the (ij)th entry of A is given by

$$\begin{aligned} A[i,j] = \left\{ \begin{array}{ll} \mathsf {CT}_\mathsf{OPT}(1,n-i+1, j) &{} \text{ if } n-i+1\le j\\ 0 &{} \text{ otherwise. } \end{array} \right. \end{aligned}$$
(5.15)

Note that we do not actually compute all the elements of A, but compute the element A[ij] on demand as needed.

Let us confirm that matrix A is sorted. It is also clear that matrix A includes \(\mathsf {CT}_\mathsf{OPT}(1,l, r)\) for every pair of integers (lr) such that \(l, r \in [1..n]\) with \(l < r\). In addition, there exists a pair (lr) such that \(\mathsf {CT}_\mathsf{OPT}(1,l, r)=\mathsf {CT}_\mathsf{OPT}(k,1,n)\). These facts imply that the minimum element A[ij] such that \(\mathcal {P}\) is (A[ij], k)-feasible is \(\mathsf {CT}_\mathsf{OPT}(k,1,n)\), and hence we can apply Lemma 5.5 to solve the Minmax-k -Sink-Path-Confluent-Flow problem as follows: Once the CUE tree is constructed, we have \(f(n)=O(\log ^3 n)\) by Lemma 5.4 and \(g(n)= O(n \log ^2 n)\) by Lemma 5.3, so the problem can be solved in \(O(n\log ^3 n)\) time. Because it takes \(O(n \log n)\) time to construct the CUE tree by Lemma 5.1, the total time complexity is \(O(n \log n) + O(n \log ^3 n) = O(n \log ^3 n)\).

For the case of uniform capacity, the same argument holds. Applying Lemmas 5.15.3, and 5.4, we have a total time complexity of \(O(n \log n)\).

5 Minsum k-Sink Problems on Paths

In this section, our task is to find a valid pair \((\mathbf{x},\mathbf{d})\) that minimizes the aggregate evacuation time \(\mathsf {AT}(\mathcal {P}, \mathbf{x}, \mathbf{d})\). This task can be precisely represented as follows:

(Minsum-k-Sink-Path)

Input: A dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\).

Goal: Find a solution \((\mathbf{x}, \mathbf{d})\) to the problem

(Minsum-k-Sink-Path-Confluent-Flow)

Input: A dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\).

Goal: Find a solution \((\mathbf{x}, \mathbf{d})\) to the problem

For the Minsum-k-Sink-Path problem, [16] reported the following result, which is the best so far:

Theorem 5.2

([16]) The Minsum-k-Sink-Path/Minsum-k-Sink-Path-Confluent-Flow problems can be solved in \(\min \{ O(kn\log ^3n),n 2^{O(\sqrt{\log k \log \log n})} \log ^3n \}\) time. Moreover, if the capacities of \(\mathcal {P}\) are uniform, then both the problems can be solved in \(\min \{ O(kn\log ^2n),n 2^{O(\sqrt{\log k \log \log n})} \log ^2n \}\) time.

For the confluent flow model, it was shown in [6, 15] that for the minsum k-sink problems, there exists an optimal k-sink such that all of the k sinks are at vertices. [16] extended this fact to the non-confluent flow model.

Lemma 5.6

([6, 15, 16]) For the minsum k-sink problem in a dynamic flow path network, there exists an optimal k-sink such that all of the k sinks are at vertices under the confluent/non-confluent flow model.

Lemma 5.6 implies that it is sufficient to consider only the case where every sink is at a vertex. Thus, we suppose \(\mathbf{x}=(x_1, \ldots , x_k) \in V^{k}\), where \(x_i \prec x_j\) for \(i<j\).

The fundamental idea of [16] for solving the Minsum-k-Sink-Path problem is to reduce it to the minimum k-link path problem. In the minimum k-link path problem, we are given a weighted complete directed acyclic graph (DAG) \(G = (V', E', w')\) with \(V' = \{v'_{i} \mid i \in [1..n]\}\) and \(E' = \{(v'_i, v'_j) \mid i,j \in [1..n], i < j\}\). Each edge \((v'_i, v'_j)\) is associated with a weight \(w'(i, j)\). A k-link path is a path that contains exactly k edges. The task is to find a k-link path from \(v'_1\) to \(v'_n\) that minimizes the sum of weights of k edges. The minimum k-link path problem is represented as follows:

(Minimum-k-Link-Path)

Input: A weighted complete DAG \(G = (V', E', w')\).

Goal: Find a k-link path \((v'_{a_0} = v'_1, v'_{a_1}, v'_{a_2}, \ldots , v'_{a_{k-1}}, v'_{a_k} = v'_n)\) from \(v'_1\) to \(v'_n\).

Schieber [19] showed that the Minimum-k-Link-Path can be solved in almost linear timeFootnote 3 regardless of k if the weight function \(w'\) satisfies the concave Monge property.

Definition 5.1

(Concave Monge property) We say that a function \(f: {\mathbb Z} \times {\mathbb Z} \rightarrow {\mathbb R}\) satisfies the concave Monge property if for any integers ij with \(i+1<j\), \(f(i, j) + f(i+1, j+1) \le f(i+1, j) + f(i, j+1)\) holds.

Lemma 5.7

([19]) Given a weighted complete DAG with n vertices, if the weight function satisfies the concave Monge property, the Minimum-k-Link-Path can be solved in \(\min \{O(kn)\), \(n 2^{O(\sqrt{\log k \log \log n})}\}\) time.

Higashikawa et al. [16] presented a reduction from Minsum-k-Sink-Path to Minimum- \((k+1)\)-link-Path such that the weight function \(w'\) satisfies the concave Monge property. Let a dynamic flow path network \(\mathcal {P}=(P=(V, E),{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\) with n vertices be an instance of Minsum-k-Sink-Path. We prepare a weighted complete DAG \(G = (V', E', w')\) with \(n+2\) vertices, where \(V' = \{v'_i \mid i \in [0..n+1]\}\) and \(E' = \{ (v'_i, v'_j) \mid i,j \in [0..n+1], i<j\}\). We set the weight function \(w'\) as

$$\begin{aligned} w'(i,j) = \left\{ \begin{array}{lll} \mathsf {AT}_\mathsf{OPT}(i, j)&{} \quad &{} i, j \in [1..n], i < j, \\ \mathsf {AT}(\mathcal {P}_{i,n}, (v_i), ()) &{} &{}i \in [1..n] \text { and } j = n+1, \\ \mathsf {AT}(\mathcal {P}_{1,j}, (v_j), ()) &{} &{}i = 0 \text { and } j \in [1..n], \\ \infty &{} &{} i = 0 \text { and } j=n+1, \end{array} \right. \end{aligned}$$
(5.16)

where \(\mathsf {AT}_\mathsf{OPT}(i, j)\) is the optimal aggregate evacuation time required to move all the supply between \(v_i\) and \(v_j\) to one of two sinks \(v_i\) or \(v_j\). On the weighted complete DAG G constructed as above, let us consider a \((k+1)\)-link path \((v'_{a_0}=v'_0, v'_{a_1}, \ldots , v'_{a_{k}}, v'_{a_{k+1}}=v'_{n+1})\) from \(v'_0\) to \(v'_{n+1}\), where \(a_1, \ldots , a_k\) are integers satisfying \(0< a_1< a_2< \cdots< a_k < n+1\). The sum of weights of this \((k+1)\)-link path is

This value is equivalent to \(\min _{\mathbf{d}} \mathsf {AT}(\mathcal{P}, \mathbf{x}, \mathbf{d})\) for a k-sink \(\mathbf{x} = (v_{a_1}, v_{a_2}, \ldots , v_{a_{k}})\), which implies that a minimum \((k+1)\)-link path on G corresponds to an optimal k-sink location for a dynamic flow path network \(\mathcal {P}\).

Let us consider the following subtasks:

(Minsum-Flow-for-Subpath)

Input: A dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\), integers \(i, j \in [1..n]\) with \(i < j\).

Goal: Find a value d such that

(Minsum-Flow-for-Subpath-Confluent-Flow)

Input: A dynamic flow path network \(\mathcal {P}=(P,{\mathbf{w}},{\mathbf{c}},{\mathbf{l}},\tau )\), integers \(i, j \in [1..n]\) with \(i < j\).

Goal: Find a value d such that

Note that [16] developed a data structure to efficiently solve both of these problems. This data structure can be constructed in \(O(n \log ^2 n)\) time and can be used to solve Minsum-Flow-for-Subpath/Minsum-Flow-for-Subpath-Confluent-Flow in \(O(\log ^3 n)\) time. See [16] for details.

Lemma 5.8

([16]) For a given dynamic flow path network \(\mathcal {P}\) with n vertices, there exists a segment tree \(\mathcal {T}\) that satisfies the following conditions:

  1. 1.

    \(\mathcal {T}\) can be constructed in \(O(n \log ^2 n)\) time.

  2. 2.

    Minsum-Flow-for-Subpath/Minsum-Flow-for-Subpath-Confluent-Flow can be solved in \(O(\log ^3 n)\) time by using \(\mathcal {T}\).

  3. 3.

    If the capacities of \(\mathcal {P}\) are uniform, then Minsum-Flow-for-Subpath/Minsum-Flow-for-Subpath-Confluent-Flow can be solved in \(O(\log ^2 n)\) time by using \(\mathcal {T}\).

Because \(w'\) satisfies the concave Monge property (see Sect. 5.5.2), Lemmas 5.7 and 5.8 lead to Theorem 5.2.

In the rest of this section, we first observe the properties of the aggregate evacuation time in Sect. 5.5.1 and then show that the weighted function \(w'\) obtained by the reduction satisfies the concave Monge property in Sect. 5.5.2.

5.1 Property of Aggregate Evacuation Time

Recalling that we consider only the case where every sink is at a vertex, we simply use \(\theta ^{i,+}(z)\) and \(\theta ^{i,-}(z)\) instead of \(\theta ^{v_i,+}(z)\) and \(\theta ^{v_i,+}(z)\), respectively.

Fig. 5.2
figure 2

Thick half-open segments represent the function \(\theta ^{i,+}(t)\) and the gray area represents \(\phi ^{i,+}(z)\) for some \(z > W_i\)

We next give the general form of the aggregate evacuation time. Let \(\phi ^{i, +}(z)\) denote the aggregate evacuation time when the first \(z - W_{i}\) of supply on the right side of \(v_i\) flows to sink \(v_i\). Similarly, we denote by \(\phi ^{i, -}(z)\) the aggregate evacuation time when the first \(W_{i-1} - z\) of supply on the left side of \(v_i\) flows to sink \(v_i\). Therefore, we have

$$\begin{aligned} \phi ^{i, +}(z)&= \int _{W_{i}}^{z} \theta ^{i, +}(t)dt = \int _{0}^{z} \theta ^{i, +}(t)dt \quad \text {and} \nonumber \\ \phi ^{i, -}(z)&= \int _{z}^{W_{i-1}} \theta ^{i,-}(t)dt = \int _{z}^{W_n} \theta ^{i,-}(t)dt = - \int _{W_n}^{z} \theta ^{i,-}(t)dt \end{aligned}$$
(5.17)

(see Fig. 5.2). For \(i, j \in [1..n]\) with \(i < j\), we define

$$\begin{aligned} \phi ^{i, j}(z) = \phi ^{i, +}(z) + \phi ^{j,-}(z) = \int _{0}^{z} \theta ^{i, +}(t)dt + \int _{z}^{W_n} \theta ^{j, -}(t)dt \end{aligned}$$
(5.18)

for \(z \in [W_{i}, W_{j-1}]\).

Suppose that we are given a k-sink \(\mathbf{x} = (x_1, \ldots , x_k) \in V^{k}\) and a divider \(\mathbf{d} = (d_1, \ldots , d_{k-1})\). Recalling the definition of \(\mathrm {Id}(p)\) for \(p \in P\), we have \(x_i = v_{\mathrm {Id}(x_i)}\) for all \(i \in [1..k]\). Because each sink is at a vertex, by simply modifying the integration intervals in Eq. (5.10), the aggregate evacuation time \(\mathsf {AT}(\mathcal {P}, \mathbf{x}, \mathbf{d})\) is given by

$$\begin{aligned} \mathsf {AT}(\mathcal {P}, \mathbf{x}, \mathbf{d})&= \sum _{i \in [1..k]} \left( \int _{d_{i-1}}^{W_{\mathrm {Id}(x_i)-1}} \theta ^{x_{i},-}(z)dz + \int _{W_{\mathrm {Id}(x_i)}}^{d_i} \theta ^{x_i, +}(z)dz \right) \nonumber \\&= \sum _{i \in [1..k]} \left( \int _{d_{i-1}}^{W_{\mathrm {Id}(x_i)-1}} \theta ^{\mathrm {Id}(x_i),-}(z)dz + \int _{W_{\mathrm {Id}(x_i)}}^{d_i} \theta ^{\mathrm {Id}(x_i), +}(z)dz \right) . \end{aligned}$$
(5.19)

By Eqs. (5.17), (5.18) and (5.19), we have

$$\begin{aligned} \mathsf {AT}(\mathcal {P}, \mathbf{x}, \mathbf{d})&= \sum _{i \in [1..k]} \left( \int _{d_{i-1}}^{W_{\mathrm {Id}(x_i)-1}} \theta ^{\mathrm {Id}(x_{i}),-}(z)dz + \int _{W_{\mathrm {Id}(x_i)}}^{d_i} \theta ^{\mathrm {Id}(x_{i}), +}(z)dz \right) \nonumber \\&= \sum _{i \in [1..k]} \left( \phi ^{\mathrm {Id}(x_{i}),-}(d_{i-1}) + \phi ^{\mathrm {Id}(x_{i}),+}(d_i) \right) \nonumber \\&= \phi ^{\mathrm {Id}(x_1),-}(0) + \sum _{i \in [1..k-1]}\phi ^{\mathrm {Id}(x_i), \mathrm {Id}(x_{i+1})}(d_i) + \phi ^{\mathrm {Id}(x_k),+}(W_n). \end{aligned}$$
(5.20)

In the rest of this section, we show the important properties of \(\phi ^{i, j}(z)\). Let us first confirm that by Eq. (5.17), both \(\phi ^{i, +}(z)\) and \(\phi ^{j, -}(z)\) are convex in z since \(\theta ^{i, +}(z)\) and \(-\theta ^{j, -}(z)\) are non-decreasing in z, and therefore \(\phi ^{i, j}(z)\) is convex in z. We have a more useful lemma that gives the conditions for the minimizer of \(\phi ^{i, j}(z)\).

Lemma 5.9

([16]) For any \(i,j \in [1..n]\) with \(i < j\), there uniquely exists

$$ z^* \in \mathrm{arg\,min} _{_{_{_{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! z \in [W_i,W_{j-1}]}}}}\max \{\theta ^{i,+}(z), \theta ^{j,-}(z)\}. $$

Furthermore, \(\phi ^{i, j}(z)\) is minimized on \([W_i,W_{j-1}]\) when \(z=z^*\).

Proof

By Eqs. (5.4) and (5.5), \(\theta ^{i,+}(z)\) is strictly increasing in \(z \in [W_i,W_n]\). Similarly, by Eqs. (5.6) and (5.7), \(\theta ^{j,-}(z)\) is strictly decreasing in \(z \in [0,W_{j-1}]\). Thus, there uniquely exists \(z^* \in [W_i,W_{j-1}]\).

We then see that for any \(z' \in [W_{i}, z^*]\),

$$\begin{aligned} \phi ^{i, j}(z^*) - \phi ^{i, j}(z')= & {} \phi ^{i,+}(z^*) + \phi ^{j,-}(z^*) - (\phi ^{i,+}(z') + \phi ^{j,-}(z')) \\= & {} \int _{z'}^{z^*} \theta ^{i,+}(t)dt - \int _{z'}^{z^*} \theta ^{j,-}(t)dt \\= & {} \int _{z'}^{z^*} \left\{ \theta ^{i,+}(t) - \theta ^{j,-}(t) \right\} dt \le 0, \end{aligned}$$

and for any \(z'' \in [z^*, W_{j-1}]\),

$$\begin{aligned} \phi ^{i, j}(z^*) - \phi ^{i, j}(z'')= & {} \phi ^{i,+}(z^*) + \phi ^{j,-}(z^*) - (\phi ^{i,+}(z'') + \phi ^{j,-}(z')) \\= & {} \int _{z''}^{z^*} \theta ^{i,+}(t)dt - \int _{z''}^{z^*} \theta ^{j,-}(t)dt \\= & {} -\int _{z^*}^{z''} \left\{ \theta ^{i,+}(t) - \theta ^{j,-}(t) \right\} dt \le 0, \end{aligned}$$

which imply that \(z^*\) minimizes \(\phi ^{i, j}(z)\) on \([W_{i}, W_{j-1}]\).\(\square \)

In the following sections, this \(z^*\) is called the pseudo-intersection pointFootnote 4 of \(\theta ^{i,+}(z)\) and \(\theta ^{j,-}(z)\).

5.2 Concave Monge Property

We now show that the function \(w'\) defined in Eq. (5.16) satisfies the concave Monge property under the non-confluent flow model. We omit the proof for the confluent flow model, since the proof can be constructed similarly to the one for the confluent flow model. See [16] for details.

Let us give some observations of \(\mathsf {AT}_\mathsf{OPT}(i,j)\). Under the non-confluent flow model, for any \(i,j \in [1..n]\) with \(i<j\), \(\mathsf {AT}_\mathsf{OPT}(i,j) = \min _{z \in [W_{i}, W_{j-1}]} \phi ^{i,j}(z)\). Lemma 5.9 implies that \(\phi ^{i,j}(z)\) on \([W_{i}, W_{j-1}]\) is minimized when z is the pseudo-intersection point of \(\theta ^{i,+}(z)\) and \(\theta ^{j,-}(z)\). For any \(i,j \in [1..n]\) with \(i<j\), let \(\alpha ^{i,j}\) denote the pseudo-intersection point of \(\theta ^{i,+}(z)\) and \(\theta ^{j,-}(z)\).

Thus, we have

$$\begin{aligned} \mathsf {AT}_\mathsf{OPT}(i, j) = \phi ^{i,j}(\alpha ^{i,j}) = \int _{0}^{\alpha ^{i,j}} \theta ^{i, +}(z)dz + \int _{\alpha ^{i,j}}^{W_n}\theta ^{j, -}(z)dz. \end{aligned}$$
(5.21)

We give the following two lemmas.

Lemma 5.10

([16]) For any integer \(i \in [1..n-1]\) and any \(z \in [0, W_n]\),

$$\begin{aligned} \theta ^{i,+}(z) \ge \theta ^{i+1,+}(z) \text { and } \theta ^{i,-}(z) \le \theta ^{i+1,-}(z) \end{aligned}$$

hold.

Proof

We give the proof of only \(\theta ^{i,+}(z) \ge \theta ^{i+1,+}(z)\) because the other case can be proved in a similar way. By Eq. (5.5), for any \(j \in [i+2..n]\), we have

$$\begin{aligned} \theta ^{i, +, j}(z) - \theta ^{i+1, +, j}(z) = \left\{ \begin{array}{ll} 0 &{} \text {if } z \le W_{j-1}, \\ \frac{z - W_{j-1}}{C_{i,j}} + \tau \cdot L_{i,j} &{} \text {if } W_{j-1} < z \le W_{j}, \\ \frac{(z - W_{j-1}) (C_{i+1,j} - C_{i,j})}{C_{i,j}C_{i+1,j}}+ \tau \cdot \ell _{i} &{} \text {if } z > W_{j}. \end{array} \right. \end{aligned}$$

Because \(C_{i+1,j} - C_{i,j} = \min \{ c_h \mid h \in [i+1..j-1] \} - \min \{ c_h \mid h \in [i..j-1] \} \ge 0\), \(\theta ^{i, +, j}(z) - \theta ^{i+1, +,j}(z) \ge 0\) holds. Therefore, we have \(\theta ^{i,+}(z) \ge \theta ^{i+1,+}(z)\) since \(\theta ^{i, +}(z) = \max \{ \theta ^{i, +, j}(z) \mid j \in [i+1..n]\}\) by Eq. (5.4).\(\square \)

Lemma 5.11

([16]) For any \(i,j \in [1..n]\) with \(i<j\),

$$\begin{aligned} \alpha ^{i,j} \le \alpha ^{i+1, j} \le \alpha ^{i+1, j+1} \text { and } \alpha ^{i,j} \le \alpha ^{i, j+1} \le \alpha ^{i+1, j+1} \end{aligned}$$

hold.

Proof

We give the proof of only \(\alpha ^{i,j} \le \alpha ^{i+1, j}\) because the other cases can be proved in a similar way. For any \(i,j \in [1..n]\) with \(i<j\) and positive constant \(\epsilon \), we have

$$ \theta ^{i+1,+}(\alpha ^{i,j} - \epsilon ) \le \theta ^{i,+}(\alpha ^{i,j} - \epsilon ) < \theta ^{j,-}(\alpha ^{i,j} - \epsilon ) $$

because \(\theta ^{i,+}(z) \ge \theta ^{i+1,+}(z)\) holds by Lemma 5.10 and \(\theta ^{j,-}(z)\) is a non-increasing function. This implies that \(\alpha ^{i,j} \le \alpha ^{i+1, j}\) holds, which completes the proof.\(\square \)

Let us show that the function \(w'\) defined in Eq. (5.16) satisfies the concave Monge property under the non-confluent flow model.

Lemma 5.12

([16]) The weight function \(w'\) defined in Eq. (5.16) satisfies the concave Monge property under the non-confluent flow model.

Proof

If we show that, for any \(i,j \in [0..n]\) with \(i<j\),

$$\begin{aligned} w'(i, j) + w'(i+1, j+1) \le w'(i, j+1) + w'(i+1, j) \end{aligned}$$
(5.22)

holds, thus completing the proof. Note that condition (5.22) holds for \(i=0\) and \(j=n\), because the right-hand side of (5.22) contains \({w'(0,n+1) = \infty }\) and other terms are finite. Let us consider the following three cases: (1) \(0< i< j < n\), (2) \(i=0\) and \(0< j < n\), (3) \(0< i < n\) and \(j=n\).

Case 1. Consider the case of \(0< i< j < n\). By Eq. (5.16), for any \((i', j') \in \{(i,j), (i, j+1), (i+1,j),(i+1, j+1)\}\), we have \(w'(i',j') = \mathsf {AT}_\mathsf{OPT}(i', j')\). Recall that \(\alpha ^{i,j}\) is the pseudo-intersection point of \(\theta ^{i,+}(z)\) and \(\theta ^{j,-}(z)\), and we have

$$\begin{aligned} w'(i,j) = \mathsf {AT}_\mathsf{OPT}(i, j) = \phi ^{i,j}(\alpha ^{i,j}) = \int _{0}^{\alpha ^{i,j}} \theta ^{i, +}(z)dz + \int _{\alpha ^{i,j}}^{W_n}\theta ^{j, -}(z)dz. \end{aligned}$$
(5.23)

For any \(i,j \in [1..n-1]\) with \(i<j\), Eq. (5.23) and Lemma 5.11 state that

$$\begin{aligned}&w'(i, j+1) + w'(i+1, j) - w'(i, j) - w'(i+1, j+1) \nonumber \\= & {} \phi ^{i,j+1}(\alpha ^{i,j+1}) + \phi ^{i+1,j}(\alpha ^{i+1,j}) - \phi ^{i,j}(\alpha ^{i,j}) - \phi ^{i+1,j+1}(\alpha ^{i+1,j+1}) \nonumber \\= & {} \int _{\alpha ^{i,j}}^{\alpha ^{i, j+1}} \theta ^{i,+}(z)dz + \int _{\alpha ^{i, j+1}}^{\alpha ^{i+1, j+1}}\theta ^{j+1,-}(z)dz \nonumber \\&\quad \quad \quad \quad - \int _{\alpha ^{i, j}}^{\alpha ^{i+1, j}}\theta ^{j,-}(z)dz - \int _{\alpha ^{i+1, j}}^{\alpha ^{i+1, j+1}} \theta ^{i+1,+}(z)dz. \end{aligned}$$
(5.24)

Now, we show that for any \(z \in [\alpha ^{i,j}, \alpha ^{i+1,j+1})\),

$$ \min \{\theta ^{i,+}(z), \theta ^{j+1,-}(z) \} \ge \max \{ \theta ^{j,-}(z), \theta ^{i+1,+}(z) \} $$

holds. First, for any \(z \in [0, W_n]\), \(\theta ^{i,+}(z) \ge \theta ^{i+1,+}(z)\) and \(\theta ^{j,-}(z) \le \theta ^{j+1,-}(z)\) hold by Lemma 5.10. For any \(z \ge \alpha ^{i,j}\), \(\theta ^{i,+}(z) \ge \theta ^{j,-}(z)\) holds because \(\alpha ^{i,j}\) is the pseudo-intersection point of \(\theta ^{i,+}(z)\) and \(\theta ^{j,-}(z)\). Similarly, for any \(z < \alpha ^{i+1,j+1}\), we have \(\theta ^{i+1,+}(z) \le \theta ^{j+1,-}(z)\). Therefore, for any \(z \in [\alpha ^{i,j}, \alpha ^{i+1,j+1})\), \(\min \{\theta ^{i,+}(z), \theta ^{j+1,-}(z) \} \ge \max \{ \theta ^{j,-}(z), \theta ^{i+1,+}(z) \}\) holds.

Thus, Eq. (5.24) continues as

$$\begin{aligned}&w'(i, j+1) + w'(i+1, j) - w'(i, j) - w'(i+1, j+1) \nonumber \\\ge & {} \int _{\alpha ^{i, j}}^{\alpha ^{i+1, j+1}} \min \{ \theta ^{i,+}(z), \theta ^{j+1,-}(z) \} - \int _{\alpha ^{i, j}}^{\alpha ^{i+1, j+1}} \max \{ \theta ^{j,-}(z), \theta ^{i+1,+}(z) \} dz \\\ge & {} 0, \end{aligned}$$

and then condition (5.22) holds for any ij with \(0< i< j < n\).

Case 2. Consider the case of \(i = 0\) and \(j \in [1..n-1]\). Recall that \(w'(0, j) = \phi ^{j,-}(0)\) and \(w'(0, j+1) = \phi ^{j+1,-}(0)\) by Eq. (5.16). In this case, we have

$$\begin{aligned}&w'(0, j+1) + w'(1, j) - w'(0, j) - w'(1, j+1) \nonumber \\= & {} \phi ^{j+1,-}(0) + \phi ^{1,j}(\alpha ^{1,j}) - \phi ^{j,-}(0) - \phi ^{1,j+1}(\alpha ^{1,j+1})\\= & {} \int _{0}^{W_n}\theta ^{j+1,-}(z)dz + \int _{0}^{\alpha ^{1,j}} \theta ^{1, +}(z)dz + \int _{\alpha ^{1,j}}^{W_n}\theta ^{j, -}(z)dz \\&\quad \quad - \int _{0}^{W_n}\theta ^{j,-}(z)dz - \int _{0}^{\alpha ^{1,j+1}} \theta ^{1, +}(z)dz - \int _{\alpha ^{1,j+1}}^{W_n}\theta ^{j+1, -}(z)dz \\= & {} \int _{0}^{\alpha ^{1,j+1}}\theta ^{j+1,-}(z)dz - \int _{0}^{\alpha ^{1,j}}\theta ^{j, -}(z)dz - \int _{\alpha ^{1,j}}^{\alpha ^{1,j+1}} \theta ^{1, +}(z)dz, \end{aligned}$$

where the last equality uses \(\alpha ^{1,j} \le \alpha ^{1,j+1}\) by Lemma 5.11. By Lemma 5.10, we have \(\theta ^{j+1,-}(z) \ge \theta ^{j,-}(z)\) for any \(z \in [0, W_n]\). Using the same argument as in the previous case, for any \(z < \alpha ^{1,j+1}\), we have \(\theta ^{1,+}(z) < \theta ^{j+1,-}(z)\). Thus, we have

$$\begin{aligned}&w'(0, j+1) + w'(1, j) - w'(0, j) - w'(1, j+1) \nonumber \\= & {} \int _{0}^{\alpha ^{1,j+1}}\theta ^{j+1,-}(z)dz - \int _{0}^{\alpha ^{1,j}}\theta ^{j, -}(z)dz - \int _{\alpha ^{1,j}}^{\alpha ^{1,j+1}} \theta ^{1, +}(z)dz \\= & {} \int _{0}^{\alpha ^{1,j}}\left\{ \theta ^{j+1,-}(z) - \theta ^{j, -}(z) \right\} dz + \int _{\alpha ^{1,j}}^{\alpha ^{1,j+1}} \left\{ \theta ^{j+1,-}(z) - \theta ^{1, +}(z)\right\} dz \ge 0. \end{aligned}$$

Case 3. Consider the case of \(j = n\) and \(i \in [1..n-1]\). Recall that \(w'(i, n+1) = \phi ^{i,+}(W_n)\) and \(w'(i+1, n+1) = \phi ^{i+1,+}(W_n)\) by Eq. (5.16). Similar to the second case, we use the facts that \(\alpha ^{i,n} \le \alpha ^{i+1,n}\) by Lemma 5.11, \(\theta ^{i,+}(z) \ge \theta ^{i+1,+}(z)\) for any \(z \in [0, W_n]\) by Lemma 5.10, and \(\theta ^{i,+}(z) \ge \theta ^{n,-}(z)\) for any \(z \ge \alpha ^{i,n}\). Then, we have

$$\begin{aligned}&w'(i, n+1) + w'(i+1, n) - w'(i, n) - w'(i, n+1) \\= & {} \phi ^{i,+}(W_n) + \phi ^{i+1,n}(\alpha ^{i+1,n}) - \phi ^{i,n}(\alpha ^{i,n}) - \phi ^{i+1,+}(W_n)\\= & {} \int _{0}^{W_n}\theta ^{i,+}(z)dz + \int _{0}^{\alpha ^{i+1,n}} \theta ^{i+1, +}(z)dz + \int _{\alpha ^{i+1,n}}^{W_n}\theta ^{n,-}(z)dz \\&\quad \quad - \int _{0}^{\alpha ^{i,n}}\theta ^{i,+}(z)dz - \int _{\alpha ^{i,n}}^{W_n} \theta ^{n, -}(z)dz - \int _{0}^{W_n}\theta ^{i+1,+}(z)dz \\= & {} \int _{\alpha ^{i,n}}^{W_n}\theta ^{i,+}(z)dz - \int _{\alpha ^{i,n}}^{\alpha ^{i+1,n}} \theta ^{n, -}(z)dz - \int _{\alpha ^{i+1,n}}^{W_n}\theta ^{i+1,+}(z)dz \\= & {} \int _{\alpha ^{i,n}}^{\alpha ^{i+1,n}} \left\{ \theta ^{i,+}(z) - \theta ^{n,-}(z) \right\} dz + \int _{\alpha ^{i+1,n}}^{W_n}\left\{ \theta ^{i,+}(z) - \theta ^{i+1,+}(z)\right\} dz \ge 0. \end{aligned}$$

Thus, for any \(i, j \in [0..n]\) with \(i<j\), condition (5.22) holds. This implies that the function \(w'\) satisfies the concave Monge condition.\(\square \)