0% found this document useful (0 votes)
2 views21 pages

Almost Linear Time Algorithms For Some Problems On

This chapter discusses algorithms for optimizing evacuation planning in dynamic flow networks, which model the movement of people during emergencies. It focuses on locating multiple sinks to minimize evacuation times and presents recent results that enable almost linear time solutions for these problems. The chapter also differentiates between confluent and non-confluent flow models and summarizes previous research on minmax and minsum k-sink problems.

Uploaded by

chronicalsarath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views21 pages

Almost Linear Time Algorithms For Some Problems On

This chapter discusses algorithms for optimizing evacuation planning in dynamic flow networks, which model the movement of people during emergencies. It focuses on locating multiple sinks to minimize evacuation times and presents recent results that enable almost linear time solutions for these problems. The chapter also differentiates between confluent and non-confluent flow models and summarizes previous research on minmax and minsum k-sink problems.

Uploaded by

chronicalsarath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Chapter 5

Almost Linear Time Algorithms for Some


Problems on Dynamic Flow Networks

Yuya Higashikawa, Naoki Katoh, and Junichi Teruyama

Abstract Motivated by evacuation planning, several problems regarding dynamic


flow networks have been studied in recent years. A dynamic flow network consists of
an undirected graph with positive edge lengths, positive edge capacities, and positive
vertex weights. The road network in an area can be treated as a graph where the edge
lengths are the distances along the roads and the vertex weights are the number of
people at each site. An edge capacity limits the number of people that can enter the
edge per unit time. In a dynamic flow network, when particular points on edges or
vertices called sinks are given, all of the people are required to evacuate from the
vertices to the sinks as quickly as possible. This chapter gives an overview of two
of our recent results on the problem of locating multiple sinks in a dynamic flow
path network such that the max/sum of evacuation times for all the people to sinks
is minimized, and we focus on techniques that enable the problems to be solved in
almost linear time.

5.1 Introduction

Recently, many parts of the world have been affected by disasters including earth-
quakes, nuclear plant accidents, volcanic eruptions, and flooding, highlighting the
urgent need for orderly evacuation planning. One powerful tool for evacuation plan-
ning is the dynamic flow model introduced by Ford and Fulkerson [10], which repre-
sents 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.

Y. Higashikawa (B) · N. Katoh · J. Teruyama


University of Hyogo, Kobe, Japan
e-mail: [email protected]
N. Katoh
e-mail: [email protected]
J. Teruyama
e-mail: [email protected]
© The Author(s) 2022 65
N. Katoh et al. (eds.), Sublinear Computation Paradigm,
https://doi.org/10.1007/978-981-16-4095-7_5
66 Y. Higashikawa et al.

Table 5.1 Summary of minmax k-sink problems


Path General capacities: O(n log n + k 2 log4 n), O(n log3 n) [7]
Uniform capacity: O(n + k 2 log2 n), O(n log n) [7]
Tree General capacities: O(max{k, log n} · kn log4 n) [9]
Uniform capacity: O(max{k, log n} · kn log3 n) [9]
General graph General capacities: FPTAS for a fixed k [3]
Uniform capacity: FPTAS for a fixed k [3]

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–9, 14–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–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].1 Tables 5.1 and 5.2
summarize the previous results for the minmax k-sink problems and the minsum
k-sink problems, respectively.
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–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–9, 14–16] have treated each supply as a continuous

1 Note that the minsum 1-sink problem in general networks can be solved in polynomial time
by applying the following two facts: (1) Baumann and Skutella [2] provided a polynomial time
algorithm for the problem of computing a dynamic flow to a fixed sink in a general network while
minimizing the aggregate evacuation time. (2) For the minsum 1-sink problem in general networks,
one can prove that there exists an optimal sink located at a vertex in a similar manner to the
well-known node optimality theorem for the 1-median problem [12].
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 67

Table 5.2 Summary of minsum k-sink problems


Path General capacities: O(kn log4 n) [6]

min{O(kn log3 n), n2 O( log k log log n) log3 n} [16]
Uniform capacity: O(kn log3 n) [5]

min{O(kn log2 n), n2 O( log k log log n) log2 n} [16]
Tree Open
General graph

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.

5.2 Preliminaries

For two real values a, b with a < b, let [a, b] = {t ∈ R | a ≤ t ≤ b}, [a, b) =
{t ∈ R | a ≤ t < b}, (a, b] = {t ∈ R | a < t ≤ b}, and (a, b) = {t ∈ R | a < t <
b}, where R is the set of real values. For two integers i, j with i ≤ j, let [i.. j] = {h ∈
Z | i ≤ h ≤ j}, where Z is the set of integers. A dynamic flow path network P is given
as a 5-tuple (P, w, c, l, τ ), where P is a path with vertex set V = {vi | i ∈ [1..n]} and
edge set E = {ei = (vi , vi+1 ) | i ∈ [1..n − 1]}, w is a vector w1 , . . . , wn  of which
each component wi is the weight of vertex vi representing the amount of supply (e.g.,
the number of evacuees or cars) located at vi , c is a vector c1 , . . . , cn−1  of which
each component ci is the capacity of edge ei representing the upper bound on the
flow amount that can enter ei per unit time, l is a vector 1 , . . . , n−1  of which each
component i is the length of edge ei (i.e., the distance between two end vertices of
ei ), and τ 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 ∈ P, if p lies on
a vertex v ∈ V or an edge e ∈ E. We assume that path P can be represented by a
horizontal line segment along which the vertices v1 , v2 , . . . , vn are arranged in order
from left to right. For two points p, q ∈ P, p ≺ q means that p lies to the left side of q.
For two points p, q ∈ P, p  q means that p ≺ q or p and q lie at the same location.
For two points p, q ∈ P such that p  q, p divides an edge (vi , vi+1 ) in the ratio
r p : 1 − r p , and q divides an edge (v j , v j+1 ) in the ratio rq : 1 − rq , let L( p, q) be the
 j−1
distance between p and q, that is, L( p, q) = (1 − r p )i + rq  j + h=i+1 h (where
i i−1
h=i+1 h = 0 and h=i+1 h = −i ). Let us consider two integers i, j ∈ [1..n]
with i < j. We denote by Pi, j a subpath of P from vi to v j , and by Pi, j a subnetwork
68 Y. Higashikawa et al.

of P consisting of subpaths Pi, j . Let L i, j be the distance between vi and v j , that is,
 j−1
L i, j = h=i h , and let Ci, j be the minimum capacity among all the edges between
vi and v j , that is, Ci, j = min{ch | h ∈ [i.. j − 1]}. For i ∈ [1..n], we denote the sum of

weights from v1 to vi by Wi = ij=1 w j . Note that, given a dynamic flow path network
P, if we construct two lists of Wi and L 1,i for all i ∈ [1..n] in O(n) preprocessing
time, we can obtain Wi for any i ∈ [1..n] and L i, j = L 1, j − L 1,i for any i, j ∈ [1..n]
with i < j in O(1) time. In addition, Ci, j for any i, j ∈ [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 x is a k-tuple (x1 , . . . , xk ) of points on P such that xi ≺ x j for any i < j.
We assume that no two sinks lie on the same edge.2 We define the function Id for
point p ∈ P as follows: the value Id( p) is an integer such that vId( p)  p ≺ vId( p)+1
holds, that is, if p lies on edge (vi , vi+1 ) or at vertex vi , Id( p) = i. A divider d is
a (k − 1)-tuple (d1 , . . . , dk−1 ) of real values such that 0 ≤ di < d j ≤ Wn for any
i < j. A pair (x, d) is called valid if and only if WId(xi ) ≤ di ≤ WId(xi+1 ) holds for
any i. A valid pair (x, d) determines what amount of supply from which vertex flows
to which sink so that the portion di − di−1 of supply is assigned to flow to sink xi ,
where d0 = 0 and dk = Wn . More precisely, given a valid pair (x, d), the portion
WId(xi ) − di−1 of supply that originates from the left side of xi flows to sink xi , and
the portion di − WId(xi ) of supply that originates from the right side of xi also flows to
sink xi . For instance, under the non-confluent flow model, if Wh−1 < di < Wh where
h ∈ [1..n], the portion di − Wh−1 of the wh supply at vh flows to sink xi and the rest
of the Wh − di supply flows to sink xi+1 . The difference between the confluent flow
model and the non-confluent flow model is that the confluent flow model requires
that each value di of a divider d must take a value in {W1 , . . . , Wn }, whereas the
non-confluent flow model does not. For a dynamic flow path network P and a valid
pair (x, d), the evacuation completion time CT(P, x, d) is the time at which all the
supply completes the evacuation. The aggregate evacuation time AT(P, x, d) is the
sum of the evacuation completion time for all the supply. Explicit definitions of these
are given in Sect. 5.3.

5.3 Objective Functions

Suppose that we are given a divider d = (d1 , . . . , dk−1 ). This d implies that we have
k 1-sink subproblems. The ith subproblem consists of a subnetwork Ph,h such that
the weight of v j is w j for j ∈ [h + 1..h − 1], while those of vh and vh are Wh − di−1
and di − Wh −1 , respectively, where Wh−1 < di−1 ≤ Wh and Wh −1 < di ≤ Wh . To
explicitly define the evacuation completion time and the aggregate evacuation time,

2 It turns out that this assumption does not result in a loss of generality once the cost function is
introduced later. If some adjacent two sinks xi and xi+1 lie on edge (v j , v j+1 ), that is, v j ≺ xi ≺
xi+1 ≺ v j+1 , moving xi to v j or moving xi+1 to v j+1 does not increase the cost.
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 69

we first consider the case of the 1-sink problem, and then extend the argument to the
general case of the k-sink problem.

5.3.1 Objective Functions for the 1-Sink Problem

Given a dynamic flow path network P = (P, w, c, l, τ ) with n vertices, we assign


a unique sink to a point x, that is, x = (x) and d = (), which is the 0-tuple. We
consider only the case where x is on an edge ei excluding its end vertices, that is,
vi ≺ x ≺ vi+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 v1 , . . . , vi ) flows to the right toward
sink x, and all the supply on the right side of x (i.e., at vi+1 , . . . , vn ) flows to the left
toward sink x.
To treat this case, we introduce some new notation. Let the function θ x,+ (z)
denote the time at which the first z − Wi of supply on the right side of x completes
its evacuation to sink x (where θ x,+ (z) = 0 for z ∈ [0, Wi ]). Similarly, let θ x,− (z)
denote the time at which the first Wi − z of supply on the left side of x completes
its evacuation to sink x (where θ x,− (z) = 0 for z ∈ [Wi , Wn ]). Higashikawa [13]
showed that the values θ x,+ (Wn ) and θ 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:
 
Wn − W j−1
θ x,+ (Wn ) = max + τ · L(x, v j ) | j ∈ [i + 1..n] , and (5.1)
Ci, j
 
Wj
θ x,− (0) = max + τ · L(v j , x) | j ∈ [1..i] . (5.2)
C j,i+1

Using these, the evacuation completion time CT(P, (x), ()) is given by
 
CT(P, (x), ()) = max θ x,+ (Wn ), θ x,− (0) . (5.3)

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

θ x,+ (z) = max{θ x,+, j (z) | j ∈ [i + 1..n]}, (5.4)

where θ x,+, j (z) for j ∈ [i + 1..n] is defined as



0 if z ≤ W j−1 ,
θ x,+, j
(z) = z−W j−1 (5.5)
Ci, j
+ τ · L(x, v j ) if z > W j−1 ,

and
70 Y. Higashikawa et al.

Fig. 5.1 The blue (resp., red) thick half-open segments indicate the function θ x,+ (z) (resp.,
θ x,− (z)). The gray area indicates AT(P , (x), ())

θ x,− (z) = max{θ x,−, j (z) | j ∈ [1..i]}, (5.6)

where θ x,−, j (z) is defined for j ∈ [1..i] as



W j −z
+ τ · L(v j , x) if z < W j ,
θ x,−, j (z) = C j,i+1 (5.7)
0 if z ≥ W j .

Then, the aggregate evacuation times for the supply on the right and left sides of x
are
 Wn  Wi
θ (z)dz and
x,+
θ x,− (z)dz,
Wi 0

respectively. Thus, the aggregate evacuation time AT(P, (x), ()) is given by
 Wi  Wn
AT(P, (x), ()) = θ x,− (z)dz + θ x,+ (z)dz. (5.8)
0 Wi

See also Fig. 5.1.

5.3.2 Objective Functions for k-Sink

Let us consider a valid pair consisting of a k-sink x = (x1 , . . . , xk ) and a divider


d = (d1 , . . . , dk−1 ) such that each sink is on an edge excluding its end vertices, that
is, vId(xi ) ≺ xi ≺ vId(xi )+1 . In this situation, for each i ∈ [1..k], the first di − WId(xi )
of supply on the right side of xi and the first WId(xi ) − di−1 of supply on the left
side of xi move to sink xi . By the argument of the previous section, the evacuation
completion times for the supply on the right and left sides of xi are represented by
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 71

θ xi ,+ (di ) and θ xi ,− (di−1 ),

respectively. Thus, the evacuation completion time CT(P, x, d) is given by


 
CT(P, x, d) = max θ xi ,+ (di ), θ xi ,− (di−1 ) | i ∈ [1..k] , (5.9)

where d0 = 0 and dk = Wn . The aggregate evacuation times for the supply on the
right and left sides of xi are
 di  WId(xi )
xi ,+
θ (z)dz and θ xi ,− (z)dz,
WId(xi ) di−1

respectively. Thus, the aggregate evacuation time AT(P, x, d) is given by


 WId(xi )  di
xi ,−
AT(P, x, d) = θ (z)dz + θ xi ,+ (z)dz , (5.10)
i∈[1..k] di−1 WId(xi )

where d0 = 0 and dk = Wn .

5.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 P = (P, w, c, l, τ ).
Goal: Find a solution (x, d) to the problem

min. CT(P, x, d)
s.t. x = (x1 , . . . , xk ) ∈ P k , x h ≺ xl ∀h < l,
d = (d1 , . . . , dk−1 ) ∈ {Wh | h ∈ [1..n]}k−1 , WId(xh ) ≤ dh ≤ WId(xh+1 ) ∀h.

For the Minmax-k-Sink-Path-Confluent-Flow problem, [7] reported the fol-


lowing 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 log4 n, n log3 n}) time. Moreover, if the capacities of P
are uniform, the Minmax-k-Sink-Path-Confluent-Flow problem can be solved
in O(min{n + k 2 log2 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 log4 n) time
72 Y. Higashikawa et al.

algorithm based on the parametric search method, and the other is an O(n log3 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 prob-
lem of locating 1-sink on Pi, j is a point x ∗ that minimizes the following expression
over x ∈ Pi, j
 
CT(Pi, j , (x), ()) = max θ x,+ (W j ), θ x,− (Wi−1 ) . (5.11)

Both algorithms also require repeatedly performing feasibility tests for multiple
choices of different subnetworks. We say that Pi, j is (t, q)-feasible if and only if
the answer of the following decision problem is “yes”:
(Feasibility-Test-for-Subpath)
Input: A dynamic flow path network P = (P, w, c, l, τ ), a positive real t ∈ R+ ,
integers q, i, j satisfying q ∈ [1..k] and i, j ∈ [1..n] with i < j.
Goal: Determine whether there exists a pair of vectors (x , d ) such that

CT(Pi, j , x , d ) ≤ t,
q
x = (x1 , . . . , xq ) ∈ Pi, j , x h ≺ xl ∀h < l,
d = (d1 , . . . , dq−1 ) ∈ {Wh | h ∈ [i.. j]}
q−1
, WId(xh ) ≤ dh ≤ WId(xh+1 ) ∀h.

Note that [7] developed a data structure called the CUE tree to efficiently compute
θ x,− (Wi−1 ) and θ x,+ (W j ) for any integers i, j ∈ [1..n] with i < j and any x ∈ Pi, j .
For the case of general edge capacities, the CUE tree can be constructed in O(n log n)
time, and θ x,− (Wi−1 ) and θ x,+ (W j ) can be computed in O(log2 n) time by using the
CUE tree. See [7] for more detail.

Lemma 5.1 ([7]) Given a dynamic flow path network P = (P, w, c, l, τ ) with n
vertices, the CUE tree can be constructed in O(n log n) time. Moreover, if the capac-
ities of P are uniform, the CUE tree can be constructed in O(n) time.

Lemma 5.2 ([7]) Given a dynamic flow path network P = (P, w, c, l, τ ) with n
vertices, suppose that the CUE tree is available. Then, for any integers i, j ∈ [1..n]
with i < j and any x ∈ Pi, j , θ x,− (Wi−1 ) and θ x,+ (W j ) can be computed in O(log2 n)
time. Moreover, if the capacities of P are uniform, θ x,− (Wi−1 ) and θ 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.
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 73

5.4.1 Feasibility Test

In [7], to solve the Minmax-k-Sink-Path-Confluent-Flow problem, an algorithm


repeatedly tests the (t, q)-feasibility of Pi, j for multiple choices of different 4-tuples
(t, q, i, j). Let CTOPT (q, i, j) denote the optimal cost for the problem of locating
q-sink on Pi, j . Then, for a positive real t ∈ R+ , integers q, i, j satisfying q ∈ [1..k]
and i, j ∈ [1..n] with i < j, Pi, j is (t, q)-feasible if and only if CTOPT (q, i, j) ≤ t
holds.

Lemma 5.3 ([7]) Given a dynamic flow path network P = (P, w, c, l, τ ) with n
vertices, suppose that the CUE tree is available. For integers q, i, j satisfying
q ∈ [1..k] and i, j ∈ [1..n] with i < j, the (t, q)-feasibility of Pi, j can be tested
in O(min{n log2 n, k log3 n}) time. Moreover, if the capacities of P are uniform, the
(t, q)-feasibility of Pi, 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 (t, q)-feasibility of Pi, 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 θ vh ,− (Wi−1 ) ≤ t and θ vh+1 ,− (Wi−1 ) > t holds. Next, we solve

θ vh+1 ,− (Wi−1 ) − α · τ h = t (5.12)

for α. If α < 1, we move the leftmost sink x1 to the point that divides edge eh =
(vh , vh+1 ) at a ratio of 1 − α : α, otherwise we place x1 at vh . We then compute the
maximum integer l1 such that θ x1 ,+ (Wl1 ) ≤ t and θ x1 ,+ (Wl1 +1 ) > t holds. We thus
determine the maximal subnetwork Pi,l1 such that CTOPT (1, i, l1 ) ≤ t. In the same
manner, we repeatedly isolate the maximal subnetworks Pi,l1 , Pl1 +1,l2 , Pl2 +1,l3 , . . .,
and if the qth subnetwork is found to have lq < j, then Pi, j is not (t, q)-feasible,
otherwise it is (t, q)-feasible.
Let us now look at the time complexity. Isolating Pi,l1 consists of (a) computing
h, (b) solving the equation for α, and (c) computing l1 . Obviously (b) takes O(1)
time. For (a), applying a binary search takes O(log3 n) time because we compute
θ va ,− (Wi−1 ) over a ∈ [i.. j] O(log n) times and each θ va ,− (Wi−1 ) can be computed in
O(log2 n) time using the CUE tree by Lemma 5.2. Similarly (c) takes O(log3 n) time
by binary search. In this way, we can isolate at most q subnetworks in O(q log3 n) =
O(k log3 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 θ va ,− (Wi−1 ) for a = i, i +
1, . . . , h, h + 1 and θ x1 ,− (Wb ) for b = h + 1, h + 2, . . . , l1 , l1 + 1, it takes O((l1 −
i) log2 n) time to determine Pi,l1 . In this way, we can isolate at most p subnetworks
in O(( j − i) log2 n) = O(n log2 n) time. 
74 Y. Higashikawa et al.

5.4.2 Solving the 1-Sink Problem

Lemma 5.4 ([7]) Given a dynamic flow path network P = (P, w, c, l, τ ) with n
vertices, suppose that the CUE tree is available. For any integers i, j satisfying i, j ∈
[1..n] with i < j, CTOPT (1, i, j) can be computed in O(log3 n) time. Moreover, if
the capacities of P are uniform, CTOPT (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

CTOPT (1, i, j) = min CT(Pi, j , (x), ())


x∈Pi, j
 
= min max θ x,+ (W j ), θ x,− (Wi−1 ) . (5.13)
x∈Pi, j

Because θ x,+ (W j ) and θ x,− (Wi−1 ) are monotonically decreasing and monotonically
increasing, respectively, in x ∈ Pi, j , if an integer h ∈ [i.. j] satisfies θ vh ,− (Wi−1 ) ≤
θ vh ,+ (W j ) and θ vh+1 ,− (Wi−1 ) > θ vh+1 ,+ (W j ), then there exists x ∗ that minimizes
CT(Pi, j , (x), ()) on edge eh including vh and vh+1 . We can apply binary search
to compute this h, which can be done in O(log3 n) time using the CUE tree (see
Lemma 5.2). Once h is determined, x ∗ can be computed as follows: We solve

θ vh+1 ,− (Wi−1 ) − α · τ h = θ vh ,+ (W j ) − (1 − α) · τ h (5.14)

for α in O(1) time. If α ≤ 0, let x ∗ = vh+1 and compute CTOPT (1, i, j) =


CT(Pi, j , (vh+1 ), ()). If α ≥ 1, let x ∗ = vh and compute CTOPT (1, i, j) =
CT(Pi, j , (vh ), ()). Otherwise, let x ∗ be the point that divides edge eh = (vh , vh+1 )
at a ratio of 1 − α : α and compute CTOPT (1, i, j) = θ vh+1 ,− (Wi−1 ) − α · τ h =
θ vh ,+ (W j ) − (1 − α) · τ h . Using the CUE tree, we can compute these values in
O(log2 n) time. Thus, CTOPT (1, i, j) can be computed in O(log3 n) + O(1) +
O(log2 n) = O(log3 n) time. 

5.4.3 Parametric Search Method

In the parametric search method, we first compute the maximum integer i 1 such
that Pi1 +1,n is not (CTOPT (1, 1, i 1 ), k − 1)-feasible and store t1 = CTOPT (1, 1, i 1 +
1) as a feasible value. Note that t ∗ = CTOPT (k, 1, n) satisfies CTOPT (1, 1, i 1 ) <
t ∗ ≤ t1 . To compute i 1 , we apply binary search by executing O(log n) tests for
(CTOPT (1, 1, a), k − 1)-feasibility of Pa+1,n over 1 ≤ a ≤ n. For an integer a, we
can compute CTOPT (1, 1, a) in O(log3 n) time by Lemma 5.4. Also, by Lemma 5.3,
we can test whether Pa+1,n is (CTOPT (1, 1, a), k − 1)-feasible in O(k log3 n) time.
Summarizing these arguments, we can compute i 1 and t1 in {O(log3 n) + O(k log3 n)}
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 75

× O(log n) = O(k log4 n) time. Next, we compute the maximum integer i 2 such that
Pi2 +1,n is not (CTOPT (1, i 1 + 1, i 2 ), k − 2)-feasible and store t2 = CTOPT (1, i 1 +
1, i 2 + 1) as a feasible value, which can be done in O(k log4 n) time in the same man-
ner as in the computation of (i 1 , t1 ). Sequentially, we determine (i 3 , t3 ), . . . , (i k−1 ,
tk−1 ) in (k − 3) × O(k log4 n) time and eventually compute tk = CTOPT (1, i k−1 +
1, n) in O(log3 n) time. Note that t ∗ = min{ti | i = 1, 2, . . . , k} holds, which can be
computed in O(k) time. We then execute a (t ∗ , k)-feasibility test for P in O(k log3 n)
time, so that the optimal k-sink is obtained. We thus see that the problem can be solved
in (k − 1) × O(k log4 n) + O(log3 n) + O(k) + O(k log3 n) = O(k 2 log4 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 log4 n).
For the case of uniform capacity, the same argument holds. Applying
Lemmas 5.1, 5.3, and 5.4, we have a total time complexity of O(n + k 2 log2 n).

5.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 I of size n.
Suppose that the feasibility of any value for I can be tested in g(n) time. Let A be an
n × 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 × n matrix A is defined such that the (i, j)th entry of A is given by

CTOPT (1, n − i + 1, j) if n − i + 1 ≤ j
A[i, j] = (5.15)
0 otherwise.

Note that we do not actually compute all the elements of A, but compute the element
A[i, j] on demand as needed.
Let us confirm that matrix A is sorted. It is also clear that matrix A includes
CTOPT (1, l, r ) for every pair of integers (l, r ) such that l, r ∈ [1..n] with l < r . In
addition, there exists a pair (l, r ) such that CTOPT (1, l, r ) = CTOPT (k, 1, n). These
facts imply that the minimum element A[i, j] such that P is (A[i, j], k)-feasible is
CTOPT (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(log3 n) by Lemma 5.4 and g(n) = O(n log2 n) by Lemma 5.3,
so the problem can be solved in O(n log3 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 log3 n) = O(n log3 n).
76 Y. Higashikawa et al.

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

5.5 Minsum k-Sink Problems on Paths

In this section, our task is to find a valid pair (x, d) that minimizes the aggregate
evacuation time AT(P, x, d). This task can be precisely represented as follows:
(Minsum-k-Sink-Path)
Input: A dynamic flow path network P = (P, w, c, l, τ ).
Goal: Find a solution (x, d) to the problem

min. AT(P, x, d)
s.t. x = (x1 , . . . , xk ) ∈ P k , x h ≺ xl ∀h < l,
d = (d1 , . . . , dk−1 ) ∈ R k−1
, WId(xh ) ≤ dh ≤ WId(xh+1 ) ∀h.

(Minsum-k-Sink-Path-Confluent-Flow)
Input: A dynamic flow path network P = (P, w, c, l, τ ).
Goal: Find a solution (x, d) to the problem

min. AT(P, x, d)
s.t. x = (x1 , . . . , xk ) ∈ P k , x h ≺ xl ∀h < l,
d = (d1 , . . . , dk−1 ) ∈ {Wh | h ∈ [1..n]}k−1 , WId(xh ) ≤ dh ≤ WId(xh+1 ) ∀h.

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 log3 n), n2 O( log k log log n)
log3 n} time. Moreover, if the capacities √of P are uniform, then both the problems
can be solved in min{O(kn log2 n), n2 O( log k log log n) log2 n} 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 x = (x1 , . . . , xk ) ∈ V k , where xi ≺ x j for i < j.
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 77

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 = {vi | i ∈ [1..n]} and E = {(vi , v j ) | i, j ∈ [1..n], i < j}. Each edge
(vi , 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 v1 to vn 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 (va0 = v1 , va1 , va2 , . . . , vak−1 , vak = vn ) from v1 to vn .

k
min. w (ai−1 , ai )
i=1
s.t. ai ∈ [0..n], a0 = 1, ak = n, ah < al ∀h < .

Schieber [19] showed that the Minimum-k-Link-Path can be solved in almost


linear time3 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 : Z × Z → R
satisfies the concave Monge property if for any integers i, j with i + 1 < j, f (i, j) +
f (i + 1, j + 1) ≤ f (i + 1, j) + f (i, j + 1) holds.
Lemma 5.7 ([19]) Given a weighted complete DAG with n vertices, if the weight
√ Monge property, the Minimum-k-Link-Path can be
function satisfies the concave
solved in min{O(kn), n2 O( 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 P = (P = (V, E), w, c, l, τ ) 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 = {vi | i ∈ [0..n + 1]} and
E = {(vi , v j ) | i, j ∈ [0..n + 1], i < j}. We set the weight function w as


⎪ ATOPT (i, j) i, j ∈ [1..n], i < j,

AT(Pi,n , (vi ), ()) i ∈ [1..n] and j = n + 1,
w (i, j) = (5.16)

⎪ AT(P1, j , (v j ), ()) i = 0 and j ∈ [1..n],

∞ i = 0 and j = n + 1,

where ATOPT (i, j) is the optimal aggregate evacuation time required to move all
the supply between vi and v j to one of two sinks vi or v j . On the weighted com-
plete DAG G constructed as above, let us consider a (k + 1)-link path (va0 =

3Note that we assume that the weight function w is not given explicitly, but that a value w (i, j)
can be obtained in constant time whenever required.
78 Y. Higashikawa et al.

v0 , va1 , . . . , vak , vak+1 = vn+1 ) from v0 to vn+1 , where a1 , . . . , ak are integers sat-
isfying 0 < a1 < a2 < · · · < ak < n + 1. The sum of weights of this (k + 1)-link
path is

k k−1
w (ai , ai+1 ) = AT(P1,a1 , (va1 ), ()) + ATOPT (ai , ai+1 ) + AT(Pak ,n , (vak ), ()).
i=0 i=1

This value is equivalent to mind AT(P, x, d) for a k-sink x = (va1 , va2 , . . . , vak ),
which implies that a minimum (k + 1)-link path on G corresponds to an optimal
k-sink location for a dynamic flow path network P.
Let us consider the following subtasks:
(Minsum-Flow-for-Subpath)
Input: A dynamic flow path network P = (P, w, c, l, τ ), integers i, j ∈ [1..n] with
i < j.
Goal: Find a value d such that

min. AT(Pi, j , x = (vi , v j ), d = (d))


s.t. Wi ≤ d ≤ W j−1 .

(Minsum-Flow-for-Subpath-Confluent-Flow)
Input: A dynamic flow path network P = (P, w, c, l, τ ), integers i, j ∈ [1..n] with
i < j.
Goal: Find a value d such that

min. AT(Pi, j , x = (vi , v j ), d = (d))


s.t. d ∈ {Wh | h ∈ [i.. j − 1]}.

Note that [16] developed a data structure to efficiently solve both of these prob-
lems. This data structure can be constructed in O(n log2 n) time and can be used to
solve Minsum-Flow-for-Subpath/Minsum-Flow-for-Subpath-Confluent-
Flow in O(log3 n) time. See [16] for details.
Lemma 5.8 ([16]) For a given dynamic flow path network P with n vertices, there
exists a segment tree T that satisfies the following conditions:

1. T can be constructed in O(n log2 n) time.


2. Minsum-Flow-for-Subpath/Minsum-Flow-for-Subpath-Confluent-
Flow can be solved in O(log3 n) time by using T .
3. If the capacities of P are uniform, then Minsum-Flow-for-Subpath/Minsum-
Flow-for-Subpath-Confluent-Flow can be solved in O(log2 n) time by
using T .

Because w satisfies the concave Monge property (see Sect. 5.5.2), Lemmas 5.7
and 5.8 lead to Theorem 5.2.
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 79

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.5.1 Property of Aggregate Evacuation Time

Recalling that we consider only the case where every sink is at a vertex, we simply
use θ i,+ (z) and θ i,− (z) instead of θ vi ,+ (z) and θ vi ,+ (z), respectively.
We next give the general form of the aggregate evacuation time. Let φ i,+ (z) denote
the aggregate evacuation time when the first z − Wi of supply on the right side of vi
flows to sink vi . Similarly, we denote by φ i,− (z) the aggregate evacuation time when
the first Wi−1 − z of supply on the left side of vi flows to sink vi . Therefore, we have
 z  z
φ i,+ (z) = θ i,+ (t)dt = θ i,+ (t)dt and
Wi 0
 Wi−1  Wn  z
φ i,−
(z) = θ i,−
(t)dt = θ i,−
(t)dt = − θ i,− (t)dt (5.17)
z z Wn

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


 z  Wn
φ (z) = φ
i, j i,+
(z) + φ j,−
(z) = θ i,+
(t)dt + θ j,− (t)dt (5.18)
0 z

for z ∈ [Wi , W j−1 ].

Fig. 5.2 Thick half-open segments represent the function θ i,+ (t) and the gray area represents
φ i,+ (z) for some z > Wi
80 Y. Higashikawa et al.

Suppose that we are given a k-sink x = (x1 , . . . , xk ) ∈ V k and a divider d =


(d1 , . . . , dk−1 ). Recalling the definition of Id( p) for p ∈ P, we have xi = vId(xi ) for
all i ∈ [1..k]. Because each sink is at a vertex, by simply modifying the integration
intervals in Eq. (5.10), the aggregate evacuation time AT(P, x, d) is given by
 WId(xi )−1  di
AT(P, x, d) = θ xi ,− (z)dz + θ xi ,+ (z)dz
i∈[1..k] di−1 WId(xi )
 WId(xi )−1  di
= θ Id(xi ),− (z)dz + θ Id(xi ),+ (z)dz . (5.19)
i∈[1..k] di−1 WId(xi )

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


 WId(xi )−1  di
Id(xi ),−
AT(P, x, d) = θ (z)dz + θ Id(xi ),+ (z)dz
i∈[1..k] di−1 WId(xi )
 Id(xi ),− 
= φ (di−1 ) + φ Id(xi ),+ (di )
i∈[1..k]

= φ Id(x1 ),− (0) + φ Id(xi ),Id(xi+1 ) (di ) + φ Id(xk ),+ (Wn ). (5.20)
i∈[1..k−1]

In the rest of this section, we show the important properties of φ i, j (z). Let us first
confirm that by Eq. (5.17), both φ i,+ (z) and φ j,− (z) are convex in z since θ i,+ (z)
and −θ j,− (z) are non-decreasing in z, and therefore φ i, j (z) is convex in z. We have
a more useful lemma that gives the conditions for the minimizer of φ i, j (z).
Lemma 5.9 ([16]) For any i, j ∈ [1..n] with i < j, there uniquely exists

z ∗ ∈ arg min max{θ i,+ (z), θ j,− (z)}.


z∈[Wi ,W j−1 ]

Furthermore, φ i, j (z) is minimized on [Wi , W j−1 ] when z = z ∗ .

Proof By Eqs. (5.4) and (5.5), θ i,+ (z) is strictly increasing in z ∈ [Wi , Wn ]. Simi-
larly, by Eqs. (5.6) and (5.7), θ j,− (z) is strictly decreasing in z ∈ [0, W j−1 ]. Thus,
there uniquely exists z ∗ ∈ [Wi , W j−1 ].
We then see that for any z ∈ [Wi , z ∗ ],

φ i, j (z ∗ ) − φ i, j (z ) = φ i,+ (z ∗ ) + φ j,− (z ∗ ) − (φ i,+ (z ) + φ j,− (z ))


 z∗  z∗
= θ i,+ (t)dt − θ j,− (t)dt
z z
 z∗  i,+ 
= θ (t) − θ j,− (t) dt ≤ 0,
z
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 81

and for any z ∈ [z ∗ , W j−1 ],

φ i, j (z ∗ ) − φ i, j (z ) = φ i,+ (z ∗ ) + φ j,− (z ∗ ) − (φ i,+ (z ) + φ j,− (z ))


 z∗  z∗
= θ (t)dt −
i,+
θ j,− (t)dt
z z
 z  
=− θ i,+ (t) − θ j,− (t) dt ≤ 0,
z∗

which imply that z ∗ minimizes φ i, j (z) on [Wi , W j−1 ]. 

In the following sections, this z ∗ is called the pseudo-intersection point4 of θ i,+ (z)
and θ j,− (z).

5.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 ATOPT (i, j). Under the non-confluent flow
model, for any i, j ∈ [1..n] with i < j, ATOPT (i, j) = minz∈[Wi ,W j−1 ] φ i, j (z).
Lemma 5.9 implies that φ i, j (z) on [Wi , W j−1 ] is minimized when z is the pseudo-
intersection point of θ i,+ (z) and θ j,− (z). For any i, j ∈ [1..n] with i < j, let α i, j
denote the pseudo-intersection point of θ i,+ (z) and θ j,− (z).
Thus, we have
 α i, j  Wn
ATOPT (i, j) = φ i, j (α i, j ) = θ i,+ (z)dz + θ j,− (z)dz. (5.21)
0 α i, j

We give the following two lemmas.


Lemma 5.10 ([16]) For any integer i ∈ [1..n − 1] and any z ∈ [0, Wn ],

θ i,+ (z) ≥ θ i+1,+ (z) and θ i,− (z) ≤ θ i+1,− (z)

hold.

Proof We give the proof of only θ i,+ (z) ≥ θ i+1,+ (z) because the other case can be
proved in a similar way. By Eq. (5.5), for any j ∈ [i + 2..n], we have

4 The reason why we use the term “pseudo-intersection” is that the two functions θ i,+ (z) and
θ j,− (z) are not continuous, in general, whereas the “intersection” is usually defined for continuous
functions.
82 Y. Higashikawa et al.


⎨ 0z−W if z ≤ W j−1 ,
θ i,+, j
(z) − θ i+1,+, j
(z) = C
j−1
+ τ · L i, j if W j−1 < z ≤ W j ,
⎪ i, j
⎩ (z−W j−1 )(Ci+1, j −Ci, j ) + τ ·  if z > W .
Ci, j Ci+1, j i j

Because Ci+1, j − Ci, j = min{ch | h ∈ [i + 1.. j − 1]} − min{ch | h ∈ [i.. j − 1]} ≥


0, θ i,+, j (z) − θ i+1,+, j (z) ≥ 0 holds. Therefore, we have θ i,+ (z) ≥ θ i+1,+ (z) since
θ i,+ (z) = max{θ i,+, j (z) | j ∈ [i + 1..n]} by Eq. (5.4). 

Lemma 5.11 ([16]) For any i, j ∈ [1..n] with i < j,

α i, j ≤ α i+1, j ≤ α i+1, j+1 and α i, j ≤ α i, j+1 ≤ α i+1, j+1

hold.

Proof We give the proof of only α i, j ≤ α i+1, j because the other cases can be proved
in a similar way. For any i, j ∈ [1..n] with i < j and positive constant , we have

θ i+1,+ (α i, j − ) ≤ θ i,+ (α i, j − ) < θ j,− (α i, j − )

because θ i,+ (z) ≥ θ i+1,+ (z) holds by Lemma 5.10 and θ j,− (z) is a non-increasing
function. This implies that α i, j ≤ α i+1, j holds, which completes the proof. 

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 con-
cave Monge property under the non-confluent flow model.

Proof If we show that, for any i, j ∈ [0..n] with i < j,

w (i, j) + w (i + 1, j + 1) ≤ w (i, j + 1) + w (i + 1, j) (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) = ∞ 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 ) ∈
{(i, j), (i, j + 1), (i + 1, j), (i + 1, j + 1)}, we have w (i , j ) = ATOPT (i , j ).
Recall that α i, j is the pseudo-intersection point of θ i,+ (z) and θ j,− (z), and we have
 α i, j  Wn
w (i, j) = ATOPT (i, j) = φ (α ) = i, j i, j
θ i,+
(z)dz + θ j,− (z)dz.(5.23)
0 α i, j

For any i, j ∈ [1..n − 1] with i < j, Eq. (5.23) and Lemma 5.11 state that
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 83

w (i, j + 1) + w (i + 1, j) − w (i, j) − w (i + 1, j + 1)
= φ i, j+1 (α i, j+1 ) + φ i+1, j (α i+1, j ) − φ i, j (α i, j ) − φ i+1, j+1 (α i+1, j+1 )
 αi, j+1  αi+1, j+1
= θ (z)dz +
i,+
θ j+1,− (z)dz
α i, j α i, j+1
 α i+1, j  α i+1, j+1
− θ j,− (z)dz − θ i+1,+ (z)dz. (5.24)
α i, j α i+1, j

Now, we show that for any z ∈ [α i, j , α i+1, j+1 ),

min{θ i,+ (z), θ j+1,− (z)} ≥ max{θ j,− (z), θ i+1,+ (z)}

holds. First, for any z ∈ [0, Wn ], θ i,+ (z) ≥ θ i+1,+ (z) and θ j,− (z) ≤ θ j+1,− (z) hold
by Lemma 5.10. For any z ≥ α i, j , θ i,+ (z) ≥ θ j,− (z) holds because α i, j is the pseudo-
intersection point of θ i,+ (z) and θ j,− (z). Similarly, for any z < α i+1, j+1 , we have
θ i+1,+ (z) ≤ θ j+1,− (z). Therefore, for any z ∈ [α i, j , α i+1, j+1 ), min{θ i,+ (z), θ j+1,−
(z)} ≥ max{θ j,− (z), θ i+1,+ (z)} holds.
Thus, Eq. (5.24) continues as

w (i, j + 1) + w (i + 1, j) − w (i, j) − w (i + 1, j + 1)
 αi+1, j+1  αi+1, j+1
≥ min{θ i,+ (z), θ j+1,− (z)} − max{θ j,− (z), θ i+1,+ (z)}dz
α i, j α i, j
≥ 0,

and then condition (5.22) holds for any i, j with 0 < i < j < n.
Case 2. Consider the case of i = 0 and j ∈ [1..n − 1]. Recall that w (0, j) =
φ j,− (0) and w (0, j + 1) = φ j+1,− (0) by Eq. (5.16). In this case, we have

w (0, j + 1) + w (1, j) − w (0, j) − w (1, j + 1)


= φ j+1,− (0) + φ 1, j (α 1, j ) − φ j,− (0) − φ 1, j+1 (α 1, j+1 )
 Wn  α1, j  Wn
= θ j+1,− (z)dz + θ 1,+ (z)dz + θ j,− (z)dz
0 0 α 1, j
 Wn  α 1, j+1  Wn
− θ j,−
(z)dz − θ 1,+
(z)dz − θ j+1,− (z)dz
0 0 α 1, j+1
 α 1, j+1  α 1, j  α 1, j+1
= θ j+1,− (z)dz − θ j,− (z)dz − θ 1,+ (z)dz,
0 0 α 1, j

where the last equality uses α 1, j ≤ α 1, j+1 by Lemma 5.11. By Lemma 5.10, we have
θ j+1,− (z) ≥ θ j,− (z) for any z ∈ [0, Wn ]. Using the same argument as in the previous
case, for any z < α 1, j+1 , we have θ 1,+ (z) < θ j+1,− (z). Thus, we have
84 Y. Higashikawa et al.

w (0, j + 1) + w (1, j) − w (0, j) − w (1, j + 1)


 α1, j+1  α1, j  α1, j+1
= θ j+1,−
(z)dz − θ (z)dz −
j,−
θ 1,+ (z)dz
0 0 α 1, j
 α 1, j  α 1, j+1
 j+1,−   j+1,− 
= θ (z) − θ j,− (z) dz + θ (z) − θ 1,+ (z) dz ≥ 0.
0 α 1, j

Case 3. Consider the case of j = n and i ∈ [1..n − 1]. Recall that w (i, n + 1) =
φ i,+ (Wn ) and w (i + 1, n + 1) = φ i+1,+ (Wn ) by Eq. (5.16). Similar to the second
case, we use the facts that α i,n ≤ α i+1,n by Lemma 5.11, θ i,+ (z) ≥ θ i+1,+ (z) for any
z ∈ [0, Wn ] by Lemma 5.10, and θ i,+ (z) ≥ θ n,− (z) for any z ≥ α i,n . Then, we have

w (i, n + 1) + w (i + 1, n) − w (i, n) − w (i, n + 1)


= φ i,+ (Wn ) + φ i+1,n (α i+1,n ) − φ i,n (α i,n ) − φ i+1,+ (Wn )
 Wn  αi+1,n  Wn
= θ i,+ (z)dz + θ i+1,+ (z)dz + θ n,− (z)dz
0 0 α i+1,n
 α i,n  Wn  Wn
− θ i,+ (z)dz − θ n,− (z)dz − θ i+1,+ (z)dz
0 α i,n 0
 Wn  α i+1,n  Wn
= θ i,+ (z)dz − θ n,− (z)dz − θ i+1,+ (z)dz
α i,n α i,n α i+1,n
 αi+1,n 
  Wn  i,+ 
= θ i,+ (z) − θ n,− (z) dz + θ (z) − θ i+1,+ (z) dz ≥ 0.
α i,n α i+1,n

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

Acknowledgements We thank Robert Benkoczi, Binay Bhattacharya, Mordecai J. Golin, and


Tsunehiko Kameda for many helpful discussions on this topic. This work was supported by JST
CREST Grant Number JPMJCR1402, JSPS KAKENHI Grant Number 19H04068, and JSPS KAK-
ENHI Grant Number 20K19746.

References

1. S. Alstrup, C. Gavoille, H. Kaplan, T. Rauhe, Nearest common ancestors: a survey and a new
distributed algorithm, in Proceedings of the fourteenth annual ACM symposium on Parallel
algorithms and architectures (2002), pp. 258–264
2. Nadine Baumann, Martin Skutella, Earliest arrival flows with multiple sources. Math. Operat.
Res. 34(2), 499–512 (2009)
3. R. Belmonte, Y. Higashikawa, N. Katoh, Y. Okamoto, Polynomial-time approximability of the
k-sink location problem. CoRR (2015). arXiv:abs/1503.02835
4. M.A. Bender, M. Farach-Colton, The lca problem revisited, in Latin American Symposium on
Theoretical Informatics (Springer, Berlin, 2000), pp. 88–94
5 Almost Linear Time Algorithms for Some Problems on Dynamic Flow Networks 85

5. R. Benkoczi, B. Bhattacharya, Y. Higashikawa, T. Kameda, N. Katoh, Minsum k-sink problem


on dynamic flow path networks, in International Workshop on Combinatorial Algorithms,
(Springer, Berlin, 2018), pp. 78–89
6. Robert Benkoczi, Binay Bhattacharya, Yuya Higashikawa, Tsunehiko Kameda, Naoki Katoh,
Minsum k-sink problem on path networks. Theor. Comput. Sci. 806, 388–401 (2020)
7. B. Bhattacharya, M.J. Golin, Y. Higashikawa, T. Kameda, N. Katoh, Improved algorithms
for computing k-sink on dynamic flow path networks, in Workshop on Algorithms and Data
Structures (Springer, Berlin, 2017), pp. 133–144
8. D. Chen, M. Golin, Sink evacuation on trees with dynamic confluent flows, in 27th International
Symposium on Algorithms and Computation (ISAAC 2016). Schloss Dagstuhl-Leibniz-Zentrum
fuer Informatik (2016)
9. D. Chen, M.J. Golin, Minmax centered k-partitioning of trees and applications to sink evacu-
ation with dynamic confluent flows. CoRR (2018). arXiv:abs/1803.09289
10. L.R. Jr Ford, D.R. Fulkerson, Constructing maximal dynamic flows from static flows. Opera-
tions research, 6(3), 419–433 (1958)
11. G.N. Frederickson, D.B. Johnson, Finding kth paths and p-centers by generating and searching
good data structures. J. Algorithms 4(1):61–80 (1983)
12. S.L. Hakimi, Optimum locations of switching centers and the absolute centers and medians of
a graph. Operat. Res. 12(3), 450–459 (1964)
13. Y. Higashikawa, Studies on the space exploration and the sink location under incomplete
information towards applications to evacuation planning (2014)
14. Y. Higashikawa, M.J. Golin, N. Katoh, Minimax regret sink location problem in dynamic tree
networks with uniform capacity. J. Graph Algorithms Appl. 18.4, 539–555 (2014)
15. Y. Higashikawa, M.J. Golin, N. Katoh, Multiple sink location problems in dynamic path net-
works. Theor. Comput. Sci. 607, 2–15D (2015)
16. Y. Higashikawa, N. Katoh, J. Teruyama, K. Watase, Almost linear time algorithms for minsum
k-sink problems on dynamic flow path networks, in International Conference on Combinatorial
Optimization and Applications (Springer, Berlin, 2020), pp. 198–213
17. Bruce Hoppe, Éva. Tardos, The quickest transshipment problem. Math. Operat. Res. 25(1),
36–62 (2000)
18. Satoko Mamada, Takeaki Uno, Kazuhisa Makino, Satoru Fujishige, An o(n log2 n) algorithm
for the optimal sink location problem in dynamic tree networks. Discrete Appl. Math. 154(16),
2387–2401 (2006)
19. Baruch Schieber, Computing a minimum weight k-link path in graphs with the concave monge
property. J. Algorithms 29(2), 204–222 (1998)
20. M. Skutella, An introduction to network flows over time, in Research Trends in Combinatorial
Optimization (Springer, Berlin, 2009), pp. 451–482

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0
International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing,
adaptation, distribution and reproduction in any medium or format, as long as you give appropriate
credit to the original author(s) and the source, provide a link to the Creative Commons license and
indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative
Commons license, unless indicated otherwise in a credit line to the material. If material is not
included in the chapter’s Creative Commons license and your intended use is not permitted by
statutory regulation or exceeds the permitted use, you will need to obtain permission directly from
the copyright holder.

You might also like