Abstract 1 Introduction 2 Definitions and main result 3 Finding the value of the max flow References

Brief Announcement: A Special Case of Maximum Flow over Time with Network Changes

Shuchi Chawla ORCID Department of Computer Science, University of Texas, Austin, TX, USA    Kristin Sheridan222A part of this research performed while at NASA’s Glenn Research Center, Cleveland, OH, USA ORCID Department of Computer Science, University of Texas, Austin, TX, USA
Abstract

We consider the problem of finding the value of a maximum flow over time in a network with uniform edge lengths where the edge capacities change over time. We assume that the capacity of every edge in the network is a piecewise constant function and parameterize the running time of our algorithm by the total number of pieces in the capacity functions across all edges, denoted μ. The key technical component in our approach is a condensed version of a Time Expanded Network (that we call a cTEN) whose classical max flow value is the same as the max flow over time on the original network. We show that a graph with n nodes, m edges, and μ capacity changes, admits a cTEN with O(n2μ) nodes and O(μmn) edges. This implies that the problem can be solved in O(μ2n3m) time using the combinatorial max flow algorithm of Orlin [7], or in O(μ(1+o(1))(nm)1+o(1)log(nUT)) time using the algorithm of Chen et al. [2], where U is the maximum capacity of any edge and T is the time horizon. When μ>>m,n, this is faster than previously known algorithms for this problem.

Keywords and phrases:
maximum flow, dynamic flows, flows over time
Funding:
Kristin Sheridan: Additional funding provided by JPMorgan Chase & Co.
Copyright and License:
[Uncaptioned image] © Shuchi Chawla and Kristin Sheridan; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Network optimization
Related Version:
Full Version: https://arxiv.org/abs/2605.00277
Funding:
This research was funded in part by NSF awards CCF-2217069 and CCF-2225259.
Editors:
George B. Mertzios and Andréa W. Richa

1 Introduction

This paper investigates the maximum flow over time problem in temporal networks.333By “temporal” we mean that some network parameters change over time; networks with unchanging parameters are called “static”. Motivated by applications in satellite networks where movement of the satellites causes frequent changes to the network, we study the effect of the number of changes on the computation of a flow over time.444It is important to note that even in static networks (where all network properties stay the same over time), flow over time computation (see, e.g., [8]) can be different from steady-state or classical flow problems (e.g. [3]), as in the former case flow takes time to traverse edges. Our primary question is: Given a temporal network N, a source s, a sink d, and a time T, what is the maximum amount of flow that can be moved from s to d over time horizon [0,T]? We call this the maximum flow over time problem on temporal networks.

We focus on the special case of a temporal network where all edge lengths are uniform (the same) and static (unchanging over time), but edge capacities change over time. We assume that all edge capacities are piecewise constant, and denote by μ the total number of changes across all edges. Our primary result is stated in Theorem 1.

Theorem 1.

Let T>0 be an integer, and N=(V,E,τ,{uij}) be a temporal network where each edge ijE has length τ and its capacity at time t[T] is given by uij(t).555For integer x>0, we use [x] to denote the set {0,1,,x}. In particular [x] has x+1 elements. We assume that τ and uij(t) for all ijE and times t[T] are integral. Let μij denote the number of pieces in the function uij over the time horizon [T], and μ=ijEμij.

Then the maximum s-d flow value on N over time horizon T can be found in time O(MF(O(n2μ),O(mnμ))), where n=|V|,m=|E|, and MF(n,m) is the runtime for a steady-state (classical) max flow algorithm on a network with n nodes and m edges.

Employing Orlin’s [7] O(nm) max flow algorithm, we can achieve a strongly polynomial runtime O(μ2n3m). Alternatively, leveraging the algorithm by Chen et al. [2] allows us to solve the problem in O(μ1+o(1)(nm)1+o(1)log(nUT)) time, where U is the maximum edge capacity at any time. Previous results solve the feasibility variant of this problem (checking if a given flow value is feasible) in strongly polynomial time O(μ5polylog(μ)) or weakly polynomial time O(μ3+o(1)logO(1)(TU)) for networks with general edge lengths and piecewise constant capacities [4, 5, 6, 2]. These other techniques can be paired with binary search or parametric search to find the maximum flow value, at a cost of increased runtime, whereas our method directly finds the maximum feasible flow. In the regime where μ>>n,m (meaning the graph experiences a large number of changes relative to the number of nodes and edges), our approach yields faster runtimes than existing algorithms in both the strongly and weakly polynomial settings, even compared to algorithms that only test feasibility. If for example n,m=O(μ1/4), our runtimes improve to O(μ3) and O(μ3/2+o(1)log(nTU)).

2 Definitions and main result

We begin by formally defining the special class of temporal networks we study.

Definition 2.

A temporal network N=(V,E,τ,{uij:0}ijE) consists of

  • a set of vertices V,

  • a set of directed edges EV×V, each of integral length τ, and

  • capacity functions uij for each edge that denote the capacity of edges at each integral time.

Note that a network whose edge capacities are piecewise constant and are nonzero only at times in [T] can be specified in space Θ(μlog(U)log(T)), where U is the maximum capacity of any edge at any time, and μ is the total number of constant pieces across all capacity functions. In particular, the input size is linear in μ but logarithmic in T. Our objective is to design algorithms that run in time polynomial in μ with no dependence on T.

We can now formally define flows over time on temporal networks. A flow f is a vector of functions fij for ijE, where fij(t) denotes the flow amount carried by edge ij at time tT. Let ηi,f(t) be the net flow into i at time t under flow f. That is, ηi,f(t):=j:jiEt=0tτfji(t)j:ijEt=0tfij(t). The value of flow f at over time horizon T is defined to be ηd,f(T), where the network sink is d.

Definition 3.

An s-d flow over time T in a network (V,E,τ,{uij}) is a set of functions fij:[T]0 for each ijE such that the following hold:

  1. 1.

    For all integers t[T],ijE, fij(t)uij(t) (edge capacity constraint)

  2. 2.

    For all t[T],iV{s}: ηi,f(t)0 (net flow into a node is always non-negative)

  3. 3.

    For all iV{s,d}: ηi,f(T)=0, (net flow over the whole period is 0 for all but s and d)

Time Extended Networks (TENs)

We approach the maximum flow over time problem by reducing to a classical max flow problem. The most basic way to relate these two problems is using a Time Extended Network of the temporal network N over time horizon T, denoted TEN(N,T). Specifically, TEN(N,T) has vertex set V×[T], and there is an edge from (i,t) to (j,t) of capacity uij(t) for ij if and only if ijE and t=t+τ. For all iV,t<T, there is also an edge of infinite capacity from (i,t) to (i,t+1). The source and sink of this network are (s,0) and (d,T), respectively.

For any s,d and T, the value of a maximum s-d flow over time horizon [T] in N is the same as that of a maximum steady-state (s,0)-(d,T) flow in TEN(N,T) [1]. Thus, one solution to this problem is to run any steady-state max flow algorithm on TEN(N,T). However, the size of TEN(N,T) can be exponential in the size of N when Tn,m,μ. To avoid this exponential blow up, we define a “compressed” version of TEN(N,T), which we call a condensed time extended network, or cTEN(N,A,T) (where A[T] is a set to be defined). The basic idea is to compress multiple layers of the TEN corresponding to certain intervals of time into a single layer without changing the capacity of the network. The set A defines the appropriate time intervals.

Definition 4.

Let N=(V,E,τ,{uij}) be a temporal network with source s and sink d, and let A[T] with 0,TA. Let 0=t1<t2<<tk=T denote the times in A. We define cTEN(N,A,T) as a classical (steady-state) flow network as follows:

  • The vertex set is V:=V×A.

  • For all xV and all 1j<k, there is an edge from (x,tj) to (x,tj+1) with infinite capacity.

  • For all xyE and all 1i,j<k, there is an edge from (x,ti) to (y,tj) with the following capacity if it is non-zero:

    t:(tit<ti+1),(tjt+τij<tj+1)uxy(t).

Further, we treat (s,0) as the source and (d,T) as the sink. For brevity, we may write cTEN(N,A) if T is clear from the context.

Note that cTEN(N,[T],T) is the same as TEN(N,T). The size of cTEN(N,A,T) is polynomial in the size of N and |A|, and therefore can be much smaller than the size of TEN(N,T) when A is much smaller than [T]. Furthermore, it is easy to see that cTEN(N,A,T) can be computed efficiently in time polynomial in the size of N and |A|.

Finite cuts and cut functions

Our proof methods primarily involve analyzing minimum cuts on the TEN and cTEN of a network. Note that in TEN(N,T), if an (s,0)-(d,T) cut CV has finite capacity, then (i,t)C(i,t+1)C for all i and all t<T. We represent finite capacity cuts in a TEN by a cut function that maps every vertex iV to the earliest time t[T] such that (i,t)C, or to T+1 if no such time exists.

Definition 5.

A cut function ϕ on TEN(N,T) maps vertices iV to the interval [T+1] with ϕ(s)=0 and ϕ(d)=T+1, where s is the source and d is the sink. The cut function uniquely represents the (s,0)-(d,T) cut Cϕ with Cϕ:={(i,t):iV,t[T],tϕ(i)}. We let cost(ϕ) be the cost of the cut defined by Cϕ.

We analogously define a cut function ϕ on a cTEN(N,A,T) as a map from vertices iV to the set A{T+1}, that represents the cut Cϕ:={(i,t):iV,tA,tϕ(i)}.

Note that finite capacity cuts in a cTEN form a subset of finite capacity cuts in a TEN. Our goal is to argue that there is a small cTEN that has the same min cut capacity as the TEN. To this end, we focus on identifying the “critical” times corresponding to edges crossing a min cut in the TEN. For a cut function ϕ, Range(ϕ):={t:iV with ϕ(i)=t}. The following observation then follows from the correspondence between the cut functions of a cTEN and a TEN.

Observation 6.

Let A[T] be such that there exists a cut function ϕ corresponding to a min (s,0)-(d,T) cut in TEN(N,T) with Range(ϕ)[T]A. Then, any min (s,0)-(d,T) cut in cTEN(N,A,T) is also a min s-d cut in TEN(N,T). In particular, the capacity of the min cut in cTEN(N,A,T) is equal to the capacity of the min cut in TEN(N,T).

The critical times of a network

Having established the basic structure of cuts in a TEN, we now identify a small set that contains all of the critical times of some min cut of TEN(N,T). Such a small set A can then be used to construct a small cTEN that captures the min cut capacity of the TEN as per Observation 6. Intuitively, we construct our set of critical times to include all times at which some edge changes capacity, as well as certain “offset” times from each such change. The idea is that information about the change in some edge capacity may propagate down a path of nodes in the network, so the offset values should correspond to some possible path length in the network. As τ is uniform across all edges, all paths in the network have length τ for some [0,n]. Thus, we define our critical times as follows.

Definition 7.

Given a temporal network N=(V,E,τ,{uij}), let 𝒯 be the set of times at which some uij changes value: 𝒯={t[T]:ij with uij(t)uij(t1)}{0,T,T+1}. Then we define CriticalTimes(N):={θ±τ:θ𝒯,[n]}.

Note that we have |𝒯|μ+3, and therefore, |CriticalTimes(N)|=O(nμ). We can now state our main technical lemma, which we discuss further in Section 3.

Lemma 8.

For any TEN(N,T) there exists a cut function ϕ corresponding to a min (s,0)-(d,T) cut with Range(ϕ)CriticalTimes(N).

Note that Lemma 8 combined with Lemma 6 implies that the maximum s-d flow over T on N is exactly the steady-state maximum flow value on cTEN(N,A,T), where A=CriticalTimes(N)[T]. Using Lemma 8 and a short argument to bound the size of cTEN(N,A,T) (which we give in the full version of this paper), we get Theorem 1.

3 Finding the value of the max flow

In this section we discuss Lemma 8. Our goal is to show the existence of a min cut ϕ in TEN(N,T) with Range(ϕ)[T]CriticalTimes(N). We first define a local operation on cuts that allows us to move from one min cut to another. Let ϕ denote a cut function in TEN(N,T). We use Xϕ to denote vertices that are mapped to 0 or T+1 in ϕ: Xϕ:={iV:ϕ(i){0,T+1}}. Then for any subset CVXϕ, we can define two variants of the cut function ϕ – one where the assignments to vertices in C move “up” and the other where the assignments move “down”. Formally,

Definition 9.

Given a cut function ϕ in TEN(N,T) and a set CVXϕ, define the cut functions ϕC+ and ϕC as follows:

  • ϕC+(i):=ϕ(i)+1 if iC, and ϕC+(i):=ϕ(i) otherwise.

  • ϕC(i):=ϕ(i)1 if iC, and ϕC(i):=ϕ(i) otherwise.

Next we identify properties the set C needs to satisfy to ensure that ϕC+ and ϕC have the same (minimum) capacity as ϕ.

Definition 10.

Given a cut function ϕ in TEN(N,T), a set CVXϕ, and some vertex iC, define forbiddenϕ,C(i) as the union of the following sets:

  • 𝒯{θ+τ:θ𝒯}

  • {ϕ(j)τ,ϕ(j):ijE and jVC}

  • {ϕ(j)+τ,ϕ(j):jiE and jVC}

In the full version of the paper, we prove Lemma 11, which states that if ϕ(i) does not fall into one of the “forbidden” points for (i,ϕ,C), then ϕC+ and ϕC have the same cost as ϕ.

Lemma 11.

Given a network N and min s-d cut function ϕ, let CVXϕ satisfy ϕ(i)forbiddenϕ,C(i) for all iC. Then cost(ϕC+)=cost(ϕC)=cost(ϕ).

Figure 1: The center of this figure depicts a min cut ϕ in part of a TEN by denoting nodes on (s,0)’s side of the cut in green and nodes on the other side in red. The images on the left and right depict the same for ϕC and ϕC+, respectively. Note that ϕC incurs an extra cost for edge ij compared to ϕ, as (i,ϕ(i)1) is now on (s,0)’s side of the cut. However, ϕC+ does not incur an equivalent discount for moving (i,ϕ(i)) to the other side of the cut, because the edge leaving that node was already free under ϕ. This is a direct result of the fact that iC,jVC and ϕ(i)+τ=ϕ(j).

We briefly outline the idea of this lemma. Note that some number of copies of each edge ijE crosses the cut defined by ϕ. We want to show that if ϕC+ incurs some additional cost by having an extra copy of ij cross it as compared to ϕ, then ϕC obtains an equivalent “discount” by having one less copy of ij cross it as compared to ϕ. Conversely, ϕC+ gets a total discount equal to the total extra cost of ϕC. As neither ϕC+ nor ϕC can be cheaper than ϕ, it must be the case that all three cuts have the same cost. Figure 1 exhibits an example showing why the property ϕ(i)forbiddeni,C(ϕ) for all iC is important in the statement of the lemma: if this property does not hold for some ϕ and C, the costs and discounts described above might not offset each other.

In the full version of the paper, we use Lemma 11 to prove Lemma 8. At a high level, consider a min cut function ϕ that maximizes iVϕ(i). We show that if Range(ϕ)[T]CriticalTimes(N), there exists an iV such that ϕ(i) is not offset from any θ𝒯 by a multiple of τ. We define C to be i and all of the nodes j such that ϕ(j) is offset from ϕ(i) by a multiple of τ, and we show that C meets the criteria of Lemma 11, so ϕC+ is a min cut with iVϕC+(i)iVϕ(i), which contradicts how we picked ϕ.

References

  • [1] E. J. Anderson, P. Nash, and A. B. Philpott. A class of continuous network flow problems. Mathematics of Operations Research, 7(4):501–514, 1982. doi:10.1287/MOOR.7.4.501.
  • [2] Li Chen, Rasmus Kyng, Yang P Liu, Richard Peng, Maximilian Probst Gutenberg, and Sushant Sachdeva. Maximum flow and minimum-cost flow in almost-linear time. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS), pages 612–623. IEEE, 2022. doi:10.1109/FOCS54457.2022.00064.
  • [3] Lester Randolph Ford and Delbert R Fulkerson. Maximal flow through a network. Canadian journal of Mathematics, 8:399–404, 1956.
  • [4] Bruce Hoppe and Eva Tardos. The quickest transshipment problem. Mathematics of Operations Research, 25(1):36–62, 2000. doi:10.1287/MOOR.25.1.36.15211.
  • [5] Yin Tat Lee, Aaron Sidford, and Sam Chiu-wai Wong. A faster cutting plane method and its implications for combinatorial and convex optimization. In 2015 IEEE 56th Annual Symposium on Foundations of Computer Science, pages 1049–1065. IEEE, 2015. doi:10.1109/FOCS.2015.68.
  • [6] James B Orlin. A polynomial time primal network simplex algorithm for minimum cost flows. Mathematical Programming, 78(2):109–129, 1997. doi:10.1007/BF02614365.
  • [7] James B. Orlin. Max flows in o(nm) time, or better. In Proceedings of the Forty-Fifth Annual ACM Symposium on Theory of Computing, STOC ’13, pages 765–774, New York, NY, USA, 2013. Association for Computing Machinery. doi:10.1145/2488608.2488705.
  • [8] Martin Skutella. An introduction to network flows over time. In William Cook, László Lovász, and Jens Vygen, editors, Research Trends in Combinatorial Optimization: Bonn 2008, pages 451–482. Springer Berlin Heidelberg, Berlin, Heidelberg, 2009. doi:10.1007/978-3-540-76796-1_21.