A Finite Time Combinatorial Algorithm for Instantaneous Dynamic Equilibrium Flows

Instantaneous dynamic equilibrium (IDE) is a standard game-theoretic concept in dynamic traffic assignment in which individual flow particles myopically select en route currently shortest paths towards their destination. We analyze IDE within the Vickrey bottleneck model, where current travel times along a path consist of the physical travel times plus the sum of waiting times in all the queues along a path. Although IDE have been studied for decades, several fundamental questions regarding equilibrium computation and complexity are not well understood. In particular, all existence results and computational methods are based on fixed-point theorems and numerical discretization schemes and no exact finite time algorithm for equilibrium computation is known to date. As our main result we show that a natural extension algorithm needs only finitely many phases to converge leading to the first finite time combinatorial algorithm computing an IDE. We complement this result by several hardness results showing that computing IDE with natural properties is NP-hard.


Introduction
Flows over time or dynamic flows are an important mathematical concept in network flow problems with many real world applications such as dynamic traffic assignment, production systems and communication networks (e.g., the Internet). In such applications, flow particles that are sent over an edge require a certain amount of time to travel through each edge and when routing decisions are being made, the dynamic flow propagation leads to later effects in other parts of the network. A key characteristic of such applications, especially in traffic assignment, is that the network edges have a limited flow capacity which, when exceeded, leads to congestion. This phenomenon can be captured by the fluid queueing model due to Vickrey [27]. The model is based on a directed graph G = (V, E), where every edge e has an associated physical transit time τ e ∈ R + and a maximal rate capacity ν e ∈ R + . If flow enters an edge with higher rate than its capacity the excess particles start to form a queue at the edge's tail, where they wait until they can be forwarded onto the edge (cf. Figure 1). Thus, the total travel time experienced by a single particle traversing an edge e is the sum of the time spent waiting in the queue of e and the physical transit time τ e . This physical flow model then needs to be enhanced with a behavioral model prescribing the actions of flow particles. There are two main standard behavioral models in the traffic assignment literature known as dynamic equilibrium (DE) (cf. Ran  The full information assumption is usually justified by assuming that the game is played repeatedly and a DE is then an attractor of a learning process. The behavioral model of IDE is based on the idea that drivers are informed in real-time about the current traffic situation and, if beneficial, reroute instantaneously no matter how good or bad that route will be in hindsight. Thus, at every point in time and at every decision node, flow only enters those edges that lie on a currently shortest path towards the respective sink. This concept assumes far less information (only the network-wide queue lengths which are continuously measured) and leads to a distributed dynamic using only present information that is readily available via real-time information. IDE has been proposed already in the late 80's (cf. Boyce, Ran and LeBlanc [1,23] and Friesz, Luque, Tobin, and Wie [9]).
A line of fairly recent works starting with Koch and Skutella [18] and Cominetti, Correa and Larré [3] derived very elegant combinatorial characterizations of DE for the fluid queueing model of Vickrey. They derived a complementarity description of DE flows via so-called thin flows with resetting which leads to an α-extension property stating that for any equilibrium up to time θ, there exists α > 0 so that the equilibrium can be extended to time θ + α. An extension that is maximal with respect to α is called a phase in the construction of an equilibrium and the existence of equilibria on the whole R + then follows by a limit argument over the phases. In the same spirit, Graf, Harks and Sering [11] established a similar characterization for IDE flows and also derived an α-extension property.
For both models (DE or IDE), it is an open question whether for constant inflow rates and a finite time horizon, a finite number of phases suffices to construct an equilibrium, see [3,18] and [11]. This problem remains even unresolved for single-source single-sink seriesparallel graphs as explicitly mentioned by Kaiser [17]. Proving finiteness of the number of phases would imply an exact finite time algorithm. Such an algorithm is not known to date neither for DE nor for IDE. 1 More generally, the computational complexity of equilibrium computation is widely open.

Our Contribution and Proof Techniques
In this paper, we study IDE flows and derive algorithmic and computational complexity results. As our main result we settle the key question regarding finiteness of the α-extension algorithm.
Theorem 3.7: For single-sink networks with piecewise constant inflow rates for a finite time horizon, there is an α-extension algorithm computing an IDE after finitely many extension phases. This implies the first finite time combinatorial exact algorithm computing IDE within the Vickrey model.
The proof of our result is based on the following ideas. We first consider the case of acyclic networks and use a topological order of vertices in order to schedule the extension phases in the algorithm. The key argument for the finiteness of the number of extension phases is that for a single node v and any interval with linearly changing distance labels of nodes closer to the sink and constant inflow rate into v this flow can be redistributed to the outgoing edges in a finite number of phases of constant outflow rates from v. We show this using the properties (derivatives) of suitable edge label functions for the outgoing edges (see the graph in Figure 3). The overall finiteness of the algorithm follows by induction over the nodes and time. We then generalize to arbitrary single-sink networks by considering dynamically changing topological orders depending on the current set of active edges. Finally, a closer inspection of the proofs also enables us to give an explicit upper bound on the number of extension steps in the order of where P is the number of constant phases of the network inflow rates, ∆ the maximum out degree in the network, T the termination time, L an upper bound on the absolute value of the derivatives of the distance labels depending on the network inflow rates and the edge capacities of the given network and τ min the shortest physical transit time of all edges of the given network.
We then turn to the computational complexity of IDE flows. Our first result here is a lower bound on the output complexity of any algorithm. We construct an instance in which the unique IDE flow oscillates with a changing periodicity (see Figure 4). Theorem 4.1: There are instances for which the output complexity of an IDE flow is not polynomial in the encoding size of the instance, even if we are allowed to use periodicity to reduce the encoding size of the flow.
• Given some k ∈ N: Is there an IDE with at most k phases?
The proof is a reduction from 3SAT, wherein for any given 3SAT-formula we construct a network (see Figure 10) with the following properties: If the 3SAT-formula is satisfiable there exists a quite simple IDE flow, where all flow particles travel on direct paths towards the sink. If, on the other hand, the 3SAT-formula is unsatisfiable all IDE flows in the corresponding network lead to congestions diverting a certain amount of flow into a separate part of the network. Placing different gadgets in this part of networks then allows for the reduction to various decision problems involving IDE flows.

Related Work
The concept of flows over time was studied by Ford and Fulkerson [7]. Shortly after, Vickrey [27] introduced a game-theoretic variant using a deterministic queueing model. Since then, dynamic equilibria have been studied extensively in the transportation science literature, see Friesz et al. [9]. New interest in this model was raised after Koch and Skutella [18] gave a novel characterization of dynamic equilibria in terms of a family of static flows (thin flows) which was further refined by Cominetti, Correa and Larré in [3]. Using this new approach Sering and Skutella [25] considered dynamic equlibria in networks with multiple sources or multiple sinks, Correa, Cristi, and Oosterwijk [6] derived a bound on the price of anarchy for dynamic equilibria and Sering and Vargas-Koch [26] incorporated spillbacks in the fluid queuing model. In a very recent work, Kaiser [17] showed that the thin flows needed for the extension step in computing dynamic equilibria can be determined in polynomial time for series-parallel networks. Several of these papers ( [3,6,17,25]) also explicitly mention the problem of possible non-finiteness of the extension steps.
In the traffic assignment literature, the concept of IDE was studied by several papers such as Ran and Boyce [22, § VII-IX], Boyce, Ran and LeBlanc [1,23], Friesz et al. [9]. These works develop an optimal control-theoretic formulation and characterize instantaneous user equilibria by Pontryagin's optimality conditions. For solving the control problem, Boyce, Ran and LeBlanc [1] proposed to discretize the model resulting in finite dimensional NLP whose optimal solutions correspond to approximative IDE. While this approach only gives an approximative equilibrium, there are further difficulties. The control-theoretic formulation is actually not compatible with the deterministic queueing model of Vickrey. In Boyce, Ran and LeBlanc [1], a differential equation per edge governing the cumulative edge flow (state variable) is used. The right-hand side of the differential equation depends on the exit flow function which is assumed to be differentiable and strictly positive for any positive inflow. Both assumptions (positivity and differentiability) are not satisfied for the Vickrey model. For example, flow entering an empty edge needs a strictly positive time after which it leaves the edge again, thus, violating the strict positiveness of the exit flow function. More importantly, differentiability of the exit flow function is not guaranteed for the Vickrey queueing model. Non-differentiability (or equivalently discontinuity w.r.t. the state variable) is a well-known obstacle in the convergence analysis of a discretization of the Vickrey model, see for instance Han, Friesz, and Yao [12]. It is a priori not clear how to obtain convergence of a discretization scheme for an arbitrary flow over time (disregading equilibrium properties) within the Vickrey model. And while a recent computational study by Ziemke, Sering, Vargas-Koch, Zimmer, Nagel, and Skutella [28] shows some positive results with regards to convergence for DE, Otsubo and Rapoport [21] report "significant discrepancies" between the continuous and a discretized solution for the Vickrey model. To overcome the discontinuity issue, Han et al. [12] reformulated the model using a PDE formulation. They obtained a discretized model whose limit points correspond to dynamic equilibria of the continuous model. The algorithm itself, however, is numerical in the sense that a precision is specified and within that precision an approximate equilibrium is computed. The overall discretization approach mentioned above stands in line with a class of numerical algorithms based on fixed point iterations computing approximate equilibrium flows within a certain numerical precision, see Friesz and Han [8] for a recent survey.
The long term behavior of dynamic equilibria with infinitely lasting constant inflow rate at a single source was studied by Cominetti, Correa and Olver [5]. They introduced the concept of a steady state and showed that dynamic equilibria always reach a stable state provided that the network inflow rate is at most the capacity of a minimal s-t cut. Later, Olver, Sering, and Vargas Koch showed in [20] that dynamic equilibria reach such stable states even without the condition on the network inflow rate if one relaxes the definition of stable state to also encompass states wherein all queues grow linearly at a fixed rate forever.
Ismaili [15,16] considered a discrete version of DE and IDE, respectively. He investigated the computational complexity of computing best responses for DE showing that the bestresponse optimization problem is not approximable, and that deciding the existence of a Nash equilibrium is complete for the second level of the polynomial hierarchy. In [16] a sequential version of a discrete routing game is studied and PSPACE hardness results for computing an optimal routing strategy are derived. For further results regarding a discrete packet routing model, we refer to Cao et al. [2], Scarsini et al. [24], Harks et al. [13] and Hoefer et al. [14].

Model and the Extension-Algorithm
Throughout this paper we always consider networks N = (G, (ν e ) e∈E , (τ e ) e∈E , (u v ) v∈V \{ t } , t) given by a directed graph G = (V, E), edge capacities ν e ∈ Q >0 , edge travel times τ e ∈ Q >0 , and a single sink node t ∈ V which is reachable from anywhere in the graph. Every other node v ∈ V \ { t } has a corresponding (network) inflow rate u v : R ≥0 → Q ≥0 indicating for every time θ ∈ R ≥0 the rate u v (θ) at which the infinitesimal small agents enter the network at node v and start traveling through the graph until they leave the network at the common sink node t. We will assume that these network inflow rates are right-constant step functions with bounded support and finitely many, rational jump points and denote by P ∈ N * the total number of jump points for all network inflow rates.
Such a flow f is called a feasible flow for the given set of inflow rates u v : R ≥0 → Q ≥0 , if it satisfies the following constraints (2) to (5). The flow conservation constraints are modeled for all nodes v = t as where δ + v := { vu ∈ E } and δ − v := { uv ∈ E } are the sets of outgoing edges from v and incoming edges into v, respectively. For the sink node t we require and for all edges e ∈ E we always assume Finally we assume that the queues operate at capacity which can be modeled by Following the definition in [11] we call a feasible flow an IDE flow if whenever a particle arrives at a node v = t, it can only ever enter an edge that is the first edge on a currently shortest v-t path. In order to formally describe this property we first define the current or instantaneous travel time of an edge e at θ by We then define time dependent node labels v (θ) corresponding to current shortest path distances from v to the sink t.
We say that an edge e = vw is active at time θ, if v (θ) = w (θ) + c e (θ), denote the set of active edges by E θ ⊆ E and call the subgraph G[E θ ] induced by these edges the active subgraph.
During the computation of an IDE we also need the concept of partial flows/IDE that are only defined up to a certain point in time. First, a partial flow over time is a tupel (f + , f − ) such that for every edge e we have two integrable functions f + e : [0, a e ) → R ≥0 and f − e : [0, a e + τ e ) → R ≥0 for some non-negative number a e , satisfying constraints (4) and (5) for all θ < a e . Such a flow is a feasible (partial) flow up toθ at node v if • the edge outflow rates for all edges leading towards v are defined at least up to timeθ, i.e. a e + τ e ≥θ for all e ∈ δ − v , • the edge inflow rates for all edges leaving v are defined up to timeθ, i.e. a e =θ for all e ∈ δ + v and • constraint (2) or constraint (3), respectively, holds at v for all θ <θ. A partial flow is a feasible (partial) flow up to timeθ, if it is a feasible partial flow up to timê θ at every node. We call such a flow a partial IDE up to timeθ, if additionally constraint (8) holds for all edges and all times beforeθ. If the given network is acyclic, we can even speak of a partial IDE up timeθ at some node v, denoting a feasible flow up to timeθ at v, at least up to timeθ for all nodes lying on some path from v to the sink t and satisfying constraint (8) for all e ∈ δ + v and θ <θ. Note that, while the edge inflow rates of a feasible partial flow up toθ are defined only on [0,θ), this already determines the queue length functions and, therefore, the instantaneous edge travel times on [0,θ]. In particular, for such a flow we can speak about active edges at timeθ even though the flow itself is not yet defined at that time.
In [11,Section 3] the existence of IDE flows in single-sink networks is proven by the following almost constructive argument: A partial IDE up to some timeθ can always be extended for some additional proper 2 time interval on a node by node basis (starting with the nodes closest to the sink t). The existence of IDE for the whole R ≥0 then follows by a limit argument. This leads to a natural algorithm for computing IDE flows in single-sink networks, which we make explicit here as Algorithm 1, wherein b − v denotes the gross node inflow rate at node v defined by setting

Algorithm 1: IDE-Construction Algorithm from [11]
Input: A single-sink network N with piecewise constant network inflow rates Output: An IDE flow f in N 1 Let f be the zero flow and θ ← 0 2 while not all flow particles have reached the sink t do /* f is a partial IDE up to time θ */ and determine a constant distribution of this inflow to edges in δ + v i such that the used edges remain active for some proper interval 6 end for 7 Determine the largest α ≥ 0 such that all b − v are constant on (θ, θ + α) and the set of active edges does not change 8 Extend f up to time θ + α with constant edge inflow rates and set θ ← θ + α 9 end while 2 We call an interval [a, b) proper if a < b.
For the extension at a single node v in line 5 we can use a solution to the following convex optimization problem, which can be determined in polynomial time using a simple water filling procedure (see Appendix A for more details): where g e denotes the right side derivative of the queue length function q e depending on the inflow rate into e, i.e. g e (z) The right side derivatives ∂ + w (θ) exist because we only need them for nodes w closer to the sink with respect to the current topological order. And for those we already determined (constant) edge inflow rates for all outgoing edges for some additional proper time interval beginning with θ. The integrand of the objective function is, thus, the right derivative of the shortest instantaneous travel time towards the sink when entering edge vw at time θ and assuming a constant inflow rate of z into this edge starting at time θ. Using this observation one can show (cf. [11,Lemma 3.1]) that any solution to (OPT-b − v (θ)) corresponds to a flow distribution to active edges so that for every edge e = vw ∈ δ + v ∩ E θ the following condition is satisfied Because the network inflow rates as well as all already constructed edge inflow rates are piecewise constant and the node label functions as well as the queue length functions are continuous, (9) ensures that the used edges will remain active for some proper time interval. It is, however, not obvious whether a finite number of such extension phases suffices to construct an IDE flow for all of R ≥0 . Since IDE flows always have a finite termination time in single-sink networks ( [11,Theorem 4.6]) it is at least enough to extend the flow for some finite time horizon (in [10] we even provide a way to explicitly compute such a time horizon). This leaves the possibility of continuously decreasing lengths of the extension phases as possible reason for Algorithm 1 not to terminate within finite time, e.g. some sequence of extension phases of lengths α 1 , α 2 , . . . such that ∞ i=1 α i converges to some point strictly before the IDE's termination time (see Remark 4.7 for an example where we can in fact achieve arbitrarily small extension phases). Thus, the question of whether IDE flows can actually be computed was left as an open question in [11]. A first partial answer was found in [19], where finite termination was shown for graphs obtained by series composition of parallel edges. In the following section we give a full answer by showing that the α-extension algorithm terminates for all single-sink networks.

Finite IDE-Construction Algorithm
In this chapter we will show that IDE flows can be constructed in finite time using Algorithm 1 or slight variations thereof. We will first show this only for acyclic networks since there we can use a single constant order of the nodes for the whole construction. Building on that, we will then prove the general case by showing that we can always compute IDE flows while changing the node order only finitely many times.

Acyclic Networks
For each extension step, Algorithm 1 takes a partial IDE and determines a network-wide constant extension of all edge in-and outflow rates. This flow distribution then continues until an event (change of gross node inflow rate or change of the set of active edges) anywhere in the network requires a new flow split. In [11] such a maximal extension is called a phase of the constructed IDE. After each phase, one then has to determine a new topological order with respect to the active subgraph at the beginning of the next phase.
For an acyclic network, we can instead use a single static topological order of the nodes with respect to the whole graph, which is then in particular a topological order with respect to any possible active subgraph. This allows us to rearrange the order of the extension steps: Considering the nodes according to the fixed topological order, at each node, we then already know the gross node inflow rate for the whole interval [θ, θ + τ min ) as well as the flow distribution for all nodes closer to the sink over the same time interval. Thus, we have enough information to determine a (possibly infinite) sequence of extensions covering the whole interval [θ, θ+τ min ), where each extension is defined through constant flow distributions at this node. Within this sequence, each extension lasts until an event at the current node happens, which forces us to compute a new flow distribution. We call such a maximal extension using one constant flow distribution at a single node a local phase. The restructured version of the extension algorithm is formalized in Algorithm 2.

Algorithm 2: IDE-Construction Algorithm for acyclic networks
Input: An acyclic single-sink network N with piecewise constant network inflow rates Output: An IDE flow f in N 1 Choose T ∈ Q large enough such that all IDE flows in N terminate before T 2 Let f be the zero flow, θ ← 0 and t = v 1 < · · · < v n a topological order 3 for k = 0, . . . , T /τ min do /* f is a partial IDE up to time θ = kτ min */ 4 for i = 2, . . . , n do 5 Compute the piecewise constant gross node inflow function b − v i for the interval [θ, θ + τ min ) 6 Distribute this inflow for the whole interval to active edges in δ + v i using maximal local phases of constant flow distribution 7 end for 8 θ ← θ + τ min 9 end for Observation 3.1. For acyclic networks both variants of the general algorithm (Algorithm 1 and Algorithm 2) construct the same IDE provided that they use the same tie-breaking rules. Thus, showing that one of them terminates in finite time, also proves the same for the other variant.
Using the water filling procedure (Algorithm 4) we can compute an IDE compliant flow distribution with constant edge-inflow rates at a node v i for any interval wherein the inflow into node v i is constant, the labels on all the nodes w with v i w ∈ δ + v i change linearly and t w 1 Figure 2.: The situation in Lemma  Proof. We want to show that a finite number of maximal constant extensions of the flow at node v using the water filling algorithm is enough to extend the given flow for the whole interval [θ 1 , θ 2 ) at node v. So, let f be the flow after an, a priori, infinite number of extension steps getting us to a partial IDE up to someθ ∈ (θ 1 , θ 2 ] at node v. Let δ + v = { vw 1 , . . . , vw p } be the set of outgoing edges from v. Then, by the lemma's assumption, the label functions w i : [θ 1 , θ 2 ) → R ≥0 are affine functions and, since we extended f at node v up toθ, the queue length functions q vw i are well defined on the interval [θ 1 ,θ). Thus, for all i ∈ [p] we can define functions such that h i (θ) is the shortest current travel time to the sink t for a particle entering edge vw i at time θ. Then, for any edge vw i ∈ δ + v and any time θ ∈ [θ 1 ,θ) we have We start by stating two important observations and then proceed by showing two keyproperties of the functions h i and v , which are also visualized in Figure 3: If, additionally, no edge becomes newly active at time θ, we also have Proof of Claim 1. By the lemma's assumption w i is linear on the whole interval. For an inactive edge vw i its queue length function consists of at most two linear sections: One where the queue depletes at a constant rate of −ν e and one where it remains constant 0. Thus, h i is convex as sum of two convex functions for any interval, where vw i is inactive.
Proof of Claim 2. To show (11), let I be the set of indices of edges active immediately after θ, i.e.
Since the total outflow from node v is constant during [θ 1 ,θ) and flow may only enter edges vw i with i ∈ I after θ, there exists some j ∈ I , where the inflow rate into vw j after θ is the same or larger than before. But then we have ∂ + h j (θ) ≥ ∂ − h j (θ) and, thus, If, additionally, no edge becomes newly active at time θ, all edges vw i with i ∈ I have been active directly before θ as well implying We also need the following observation which is an immediate consequence of the way the water filling algorithm determines the flow distribution (see Observation A.1) combined with the lemma's assumption that all label functions w i have constant derivative during the interval [θ 1 , θ 2 ). Using these properties we can now first show a claim which implies that the smallest I,J can only be the derivative of v for a finite number of intervals. Inductively the same then holds for all of the finitely many I,J . The proof of the lemma finally concludes by observing that an interval with constant derivative of v can contain only finitely many local phases.  ∈ (b 1 , a 2 ) where the derivative exists, then there exists an edge vw i such that 1. the first local phase of (a 2 , b 2 ) begins because vw i becomes newly active and 2. this edge is not active for any time in the interval [a 1 , a 2 ). In particular, the first local phase of (a 1 , b 2 ) is not triggered by vw i becoming active.
Proof of Claim 4. Since we have ∂ + v (a 2 ) = c, Claim 2 implies that there exists some edge vw i with h i (a 2 ) = v (a 2 ) and ∂ − h i (a 2 ) ≤ c. As (a 2 , b 2 ) was chosen to be maximal and v (θ) ≥ c holds almost everywhere between b 1 and a 2 , we have ∂ − v (a 2 ) > c. Thus, vw i was inactive before a 2 . Now letθ < a 2 be the last time before a 2 , where vw i was active. By Claim 1 we know then that h i (θ) ≤ c holds almost everywhere on [θ, a 2 ]. At the same time we have v (θ) ≥ c almost everywhere on [a 1 , a 2 ] and v (θ) > c for at least some proper subinterval of [b 1 , a 2 ], since the intervals (a 1 , b 1 ) and (a 2 , b 2 ) were chosen to be maximal. Combining these two facts . As both functions are continuous we must haveθ < a 1 . Thus, vw i is inactive for all of [a 1 , a 2 ).
This claim directly implies that the lowest derivative of v during [θ 1 ,θ] only appears in a finite number of intervals, as each of these intervals has to start with a different edge becoming newly active. But then, iteratively applying this claim for the intervals between these intervals shows that any derivative of v can only appear in a finite number of intervals. Since, by Claim 3, v can only attain a finite number of values, this implies that [θ 1 ,θ) consists of a finite number of intervals with constant derivative of v . Then (a, b) contains at most 2p local phases, where p denotes the out-degree of v.
Proof of Claim 5. By Claim 1 an edge that changes from active to inactive during the interval (a, b) will remain inactive for the rest of this interval. Thus, at most p local phases can start because an edge becomes newly active. By Claim 4 if a local phase begins because the queue on an active edge vw i runs empty at time θ, we have meaning that this edge will become inactive. Thus, at most p local phases start because the queue of an active edge runs empty. Since by observation (ii) these are the only ways to start a new local phase, we conclude that there can be no more than 2p local phases during (a, b).
Combining Claims 4 and 5 we see that [θ 1 ,θ) only contains a finite number of local phases and, thus, we achieveθ = θ 2 with finitely many extensions.
With this lemma the proof of the following theorem is straightforward. Proof. First, note that by [10, Theorem 1] for any given single-sink network N there exists an (easily computable) time T such that all IDE in N terminate before T . This makes the first line of Algorithm 2 possible. Thus, it remains to show that in line 6 a finite number of local phases always suffices. We show this by induction over θ and i ∈ [n], i.e. we can assume that the currently constructed flow f is a partial IDE up to time θ for all nodes v j , j ≥ i and up to time θ + τ min for all nodes v j , j < i with only a finite number of (local) phases. In particular, this means that we can partition the interval [θ, θ + τ min ) into a finite number of proper subintervals such that within each such subinterval there is a constant gross node inflow rate into node v i and the labels at all the vertices w with v i w ∈ δ + v i change linearly. Then, by Lemma 3.2, we can distribute the flow at node v i to the outgoing edges using a finite number of local phases for each of these subintervals. Note that, aside from the queue lengths on the edges leaving v i , the so distributed flow has no influence on the flow distribution in later subintervals and, in particular, does not influence the partition into subintervals or the flow distribution at nodes closer to t than v i . Thus, we can distribute the outflow from v i for the whole interval [θ, θ + τ min ) using only a finite number of local phases.
Closer inspection of the proofs above also allows us to derive a rough but explicit bound on the number of phases the constructed IDE flow can have.

maximum out-degree in the given network and P is the number of intervals with constant network inflow rates.
Proof. First, we look at an interval [θ 1 , θ 2 ) and a single node v as in Lemma 3.2. Here we can use Claim 4 to bound the number of intervals of constant derivative of v by each of them containing at most 2 δ + v local phases by Claim 5. Together this shows that any such interval will be subdivided into at most 2(∆ + 1) 4 ∆ +1 local phases. Thus, whenever we execute line 6 of Algorithm 2 every currently existing (local) phase may be subdivided further into at most 2(|∆| + 1) 4 ∆ +1 local phases. Consequently, for every pass of the outer for-loop the number of local phases can be multiplied by at most v∈V 2(|∆| + 1) 4 ∆ +1 in total during the extension over the interval [θ, θ + τ min ). Combining this with the at most P phases triggered by changing network inflow rates results in the bound of

General Single-Sink Networks
We now want to extend this result to general single-sink networks, i.e. we want to show that Algorithm 1 terminates within finite time not only for acyclic graphs, but for all graphs. We first note that the requirement for input-graphs of Algorithm 2 to be acyclic is somewhat too strong. It is actually enough to have some (static) order on the nodes such that it is always a topological order with respect to the active subgraph. That is, for a general single-sink network we can still apply Algorithm 2 to determine an IDE-extension with finitely many phases for any interval during which we have such a static node ordering. Thus, Algorithm 1

Algorithm 3: IDE-Construction Algorithm for general single-sink networks
Input: A single-sink network N with piecewise constant network inflow rates Output: An IDE flow f in N 1 Choose T large enough such that all IDE flows in N terminate before T 2 Let f be the zero flow, θ ← 0 andẼ ← E 0 3 Determine a topological order t = v 1 < v 2 < · · · < v n w.r.t. the edges inẼ 4 while θ < T do /* f is a partial IDE up to time θ */ 5 for i = 2, . . . , n do 6 Compute b − v i (θ) and determine a constant distribution of this inflow to edges in δ + v i such that the used edges remain active for some proper interval 7 end for 8 Determine the largest α ≥ 0 such that all b − v are constant on (θ, θ + α) and the set of active edges does not change 9 Extend f up to time θ + α with constant edge inflow rates and set θ ← θ + α 10 if E θ \Ẽ = ∅ then 11 DefineẼ ←Ẽ ∪ E θ .

12
while there exists a cycle C inẼ do 13 Remove an edge e = xy with the largest value y (θ) − x (θ) of all edges in C 14 end while 15 Determine a topological order t = v 1 < v 2 < · · · < v n w.r.t. the edges inẼ 16 end if 17 end while will also use finitely many extension phases for each interval with such a static ordering. This observation gives rise to Algorithm 3, another slight variant of Algorithm 1.
We will prove that this algorithm does indeed construct an IDE for arbitrary single-sink networks within finite time by first showing that this algorithm is a special case of the original algorithm. Thus, it is correct and uses only a finite number of phases for any interval in which the topological order does not change. We then conclude the proof by showing that it is indeed enough to change the topological order a finite number of times for any given time horizon.
Lemma 3.5. Algorithm 3 is a special case of Algorithm 1. In particular it is correct.
Proof. As in Algorithm 2 the existence of an upper bound T on the termination time of all IDE flows for a given single-sink network is guaranteed by [10, Theorem 1]. Next, note that E is clearly always acyclic (except in lines 11 and 13) which guarantees that we can always find a topological order with respect toẼ. We now only need to show that such an ordering is also a topological order with respect to the active edges, i.e. that for any time θ we have E θ ⊆Ẽ. For this we will use the following observation Claim 6. Any edge xy removed fromẼ in line 13 of Algorithm 3 satisfies x (θ) < y (θ).
Proof. Let C ⊆Ẽ be a cycle containing the removed edge xy. SinceẼ was acyclic before we added the newly active edges in line 11, this cycle also has to contain some currently active edge vw. This gives us Thus, C contains at least one edge uz with z (θ) − u (θ) > 0 and, by the way it was chosen, this then holds in particular for edge xy.
This claim immediately implies that in line 13 we only remove inactive edges and that, afterwards, we still have E θ ⊆Ẽ. Lemma 3.6. For any single-sink network there exists some constant C > 0 such that for any time interval of length C the setẼ changes at most |E| times during this interval in Algorithm 3.
Proof. The proof of this lemma mainly rest on the following claim stating that for any fixed network we can bound the slope of the node labels of any feasible flow in this network by some constant. Proof. First note that for any node v we can bound the maximal inflow rate into this node by some constant L v as follows: Using flow conservation (2) this, in turn, allows us to bound the inflow rates into all edges e ∈ δ + v and, thus, the rate at which the queue length and the current travel time on these edges can change: Since this rate of change is also lower bounded by −1 setting L := e∈E max { 1, L e } proves the claim, as for all nodes v and times θ we then have Now, from Claim 6 we know that, whenever we remove an edge xy fromẼ at time θ we must have x (θ) < y (θ). But at the time where we last added this edge toẼ, say at time θ < θ, it must have been active (since we only ever add active edges toẼ) and, thus, we had x (θ ) = y (θ ) + c xy (θ ) ≥ y (θ ) + τ min . Therefore, the difference between the labels at x and y has changed by at least by τ min between θ and θ. Claim 7 then directly implies θ − θ ≥ τ min 2L . So, for any time interval of length at most τ min 2L each edge can be added at most once toẼ. SinceẼ only ever changes when we add at least one new edge to it, setting C := τ min 2L proves the lemma.

Theorem 3.7. For any single-sink network with piecewise constant network-inflow rates an IDE can be constructed in finite time using Algorithm 3.
Proof. By Lemma 3.5 Algorithm 3 is a special case of Algorithm 1. Thus, for any interval with staticẼ it produces the same flow as Algorithm 2. In particular, by Theorem 3.3, for any such interval the constructed flow consists of finitely many phases. Finally, Lemma 3.6 shows that the whole relevant interval [0, T ] can be partitioned into a finite number of intervals with static setẼ. Consequently, Algorithm 3 constructs an IDE with finitely many phases and, thus, terminates within finite time.
As in the acyclic case we can again also extract an explicit upper bound on the number of phases.

the maximum out-degree in the given network, P is the number of intervals with constant network inflow rates and L the bound on the slopes of the label functions from Claim 7.
Proof. For any time interval with fixed node order Algorithm 3 is equivalent to Algorithm 2 and, thus, the bound from Proposition 3.4 applies. Also note, that in Algorithm 2 we could change the node order after every time step of length τ min without any impact on correctness or the bound on the number of phases (as long as we always choose an order which is a topological order with respect to the active edges). As, by Lemma 3.6, the node order in Algorithm 3 changes at most 2L · |E| /τ min times during any unit time interval, replacing T by 2L · |E| · T /τ min in the bound for Algorithm 2 yields a valid bound for the number of phases of Algorithm 3. Remark 3.9. If presented with rational input data (i.e. rational capacities, node inflow rate, current queue lengths, current distance labels and slopes of distance labels of neighbouring nodes) the water filling procedure Algorithm 4 again produces a rational solution to (OPT-b − v (θ)) (i.e. rational edge inflow rates) which then, in turn, results in a rational maximal extension length α. Thus, Algorithm 3 can be implemented as an exact combinatorial algorithm.
Since DE and IDE coincide for parallel link networks and for DE paths can always be replaced by single edges, the above theorem also implies the following result for DE. Note, however, that, while to the best of our knowledge this result has never explicitly been stated elsewhere, it seems very likely that it could also be shown in a more direct way for this very simple graph class.

Computational Complexity of IDE-Flows
While Theorem 3.7 shows that IDE flows can be constructed in finite time, the bound provided in Proposition 3.8 is clearly superpolynomial. We now want to show that in some sense this is to be expected. Namely, we first look at the output complexity of any such algorithm, i.e. how complex the structure of IDE flows can be. Then we show that many natural decision problems involving IDE are actually NP-hard.

Output Complexity and Steady State
In this section we call an open interval (a, b) ⊆ R ≥0 a phase of a feasible flow f , if it is a maximal interval with constant in-and outflow rates for all edges. Then it seems reasonable to expect of any algorithm computing feasible flows that its output has to contain in some way a list of the flow's phases and corresponding in-and outflow rates. In particular, the number of phases of a flow is a lower bound for the runtime of any algorithm determining that flow. This observation allows us to give an exponential lower bound for the output complexity and therefore also for the worst case runtime of any algorithm determining IDE flows. This remains true even if we only look at acyclic graphs and allow for our algorithm to recognize simple periodic behaviour and abbreviate the output accordingly.
Theorem 4.1. The worst case output complexity of calculating IDE flows is not polynomial in the encoding size of the instance, even if we are allowed to use periodicity to reduce the encoding size of the determined flow. This is true even for series parallel graphs.
Proof. For any given U ∈ N * consider the network pictured in Figure 4 with a constant inflow rate of 2 at s over the interval [0, U ]. This network can clearly be encoded in O(log U ) space. The unique (up to changes on a set of measure zero) IDE is displayed up to time θ = 6.5 in Figure 4 and described for all times in Table 1. As this pattern is clearly non-periodic and continues up to time θ = U , it exhibits Ω(U ) distinct phases. This proves the theorem.    Table 1. Table 1.: Phases of the (unique) IDE in the instance of Figure 4. For all k ∈ N 0 the table includes the (constant) inflow rates into edges on the intervals (4k + 2 −k − 1, 4k + 2 −k ), (4k + 2 −k , 4k + 2 −k + 1),(4k + 2 −k + 1, 4k + 2), (4k + 2, 4k + 2 −k + 2) and (4k + 2 −k + 2, 4k + 2 −(k+1) + 3) as well as the queue lengths on the edges vt and wx at the beginning of these intervals and the rate of change for the queue lengths over the following interval ( stands for an increase at rate 1, for a decrease at rate −1 and → for no change).
The network constructed in the above proof can also be used to gain some insights into the long term behavior of IDE flows, i.e. how such flows behave if the inflow rates continue forever. In order to analyze this long term behavior of dynamic equilibrium flows Cominetti et al. define in [5, Section 3] the concept of a steady state:

Definition 4.3.
A feasible flow f with forever lasting constant inflow rate reaches a steady state if there exists a timeθ such that after this time all queue lengths stay the same forever i.e. q e (θ) = q e (θ) f.a. e ∈ E, θ ≥θ.
For dynamic equilibrium flows Cominetti et al. then show that the obvious necessary condition that the inflow rate is at most the minimal total capacity of any s-t cut is also a sufficient condition for any dynamic equilibrium in such a network to eventually reach a steady state ([5, Theorem 3]). We will show that this is not true for IDE flows -even if we consider a weaker variant of steady states:

Definition 4.4.
A feasible flow f reaches a periodic state if there exists a timeθ and a periodicity p ∈ R ≥0 such that after timeθ all queue lengths change in a periodic manner, i.e. q e (θ + kp) = q e (θ) f.a. e ∈ E, θ ≥θ, k ∈ N * .
Note that, in particular, every flow reaching a stable state also reaches a periodic state (with arbitrary periodicity).

Theorem 4.5.
There exists a series parallel network with a forever lasting constant inflow rate u at a single node s, satisfying u ≤ e∈δ + X ν e for all s-t cuts X, where no IDE ever reaches a periodic state.
Proof. Consider the network constructed in the proof of Theorem 4.1, i.e. the one pictured in Figure 4, but with a constant inflow rate of 2 at s for all of R ≥0 . A minimal cut is The unique IDE flow is still the one described in Table 1 and, thus, never reaches a periodic state. (1, 2) (1, 1) Remark 4.7. The network considered in the proof of Theorem 4.5 also shows that we can in fact achieve arbitrarily short extension phases even within quite simple networks. Namely, the gross node inflow rate at node x is of the following form b − x (θ) = 0, if θ ∈ [4k + 3, 4k + 3 + 2 −k ] for some k ∈ N 0 1, else.
Thus, the flow distribution at node x requires phases of lengths 2 −k for any k ∈ N 0 . Note however, that these ever smaller getting phases are far enough apart so as to still allow us to reach any finite time horizon within a finite number of extension phases (as it is guaranteed by Theorem 3.3).

NP-Hardness
We will now show that the decision problem whether in a given network there exists an IDE with certain properties is often NP-hard -even if we restrict ourselves to only single-source single-sink networks on acyclic graphs. Note, however, that due to the non-uniqueness of IDE flows this does not automatically imply that computing any IDE must be hard.
We first observe that the restriction to a single source can be made without loss of generality.
Proof. This can be accomplished by using the construction from the proof of [11,Theorem 6.3], which clearly satisfies all four properties. Proof. We will show this theorem by reducing the NP-complete problem 3SAT to the above problems. The main idea of the reduction is as follows: For any given instance of 3SAT we construct a network which contains a source node for each clause with three outgoing edges corresponding to the three literals of the clause. Any satisfying interpretation of the 3SAT-formula translates to a distribution of the network inflow to the literal edges, which leads to an IDE flow that passes through the whole network in a straightforward manner. If, on the other hand, the formula is unsatisfiable every IDE flow will cause a specific type of congestion which will divert a certain amount of flow into a different part of the graph. This part of the graph may contain an otherwise unused edge or a gadget which produces many phases (e.g. the graph constructed for the proof of Theorem 4.1) or a long travel time (e.g. an edge with very small capacity). We start by providing two types of gadgets: One for the clauses and one for the variables of a 3SAT-formula. The clause gadget C (see Figure 6) consists of a source node c with a constant network inflow rate of 12 over some interval of length 1 and three edges with capacity 12 and travel time 1 connecting c to the nodes 1 , 2 and 3 , respectively. This gadget will later be embedded into a larger network in such a way that the shortest paths from the nodes 1 , 2 and 3 to the sink t all have the same length. Thus, the flow entering the gadget at the source node c can be distributed in any way over the three outgoing edges. We will have a copy of this gadget for any clause of the given 3SAT-formula with the three nodes 1 , 2 and 3 corresponding to the three literals of the respective clause. Setting a literal to true will than correspond to sending a flow volume of at least 4 towards the respective node.
The variable gadget V (see Figure 7) has two nodes x and ¬x over which flow can enter the gadget. From both of these nodes there is a path consisting of two edges of length 1 leading towards a common node z, from where another edge of length and capacity 1 leads to node z . From there the gadget will be connected to the sink node t somewhere outside the gadget. The path from ¬x to z has infinite capacity 3 , while the path from x to z consists of one edge with capacity 1 followed by one edge of infinite capacity with a node y between the two edges. The first edge can be bypassed by a path of length 3 and infinite capacity. From the middle node y there is also a path leaving the gadget towards t via some node s 2 outside the gadget. This path has a total length of one more than the path via z and z to t.
We will have a copy of this gadget for every variable of the given 3SAT-formula. Similarly to the clause gadget we will interpret the variable x to be set to true if a flow of volume at least 4 traverses node x and the variable to be set to false if a flow volume of at least 4 passes through node ¬x. If both happens at once, i.e. both x and ¬x each are traversed by a flow of volume at least 4 over the span of a time interval of length 1, we interpret this as an inconsistent setting of the variables. In this case a flow of volume more than 1 will leave the gadget via the edge ys 2 during the unit length time interval three time steps later. To verify this, assume that the flow enters at nodes x and ¬x during [0, 1]. Then the flow entering through ¬x will start to form a queue on edge zz two time steps later. This queue will have reached a length of at least 2 at time 3 and, thus, still has a length of at least 1 at time 4. The flow entering through x at first only uses edge xy until a queue of length 2 has build up there. After that, flow will only enter this edge at a rate of 1 to keep the queue length constant, while the rest of the flow travels through the longer path towards y. This flow (of volume at least 1) as well as some non-zero amount of flow from the queue on edge xy will arrive at node y during the interval [3,4]. Because of the queue on edge zz all of this flow (of volume more than 1) will be diverted towards s 2 . If, on the other hand, flow travels through only one of these two nodes over the course of an interval of length 1 than all this flow will be forced to travel to t via z. The third option, i.e. flow entering the gadget through both nodes but with a volume of less than 4 at at least one of them, will not be relevant for the further proof.
We can now transform a 3SAT-formula into a network as follows: Take one copy of the clause gadget C for every clause of the formula (each with an inflow rate of 12 during the interval [0, 1] at its respective node c), one copy of the variable gadget V for every variable and connect them in the obvious way with edges of infinite capacity and unit travel time (e.g. if the first literal of some clause is ¬x 1 connect the node 1 of this clause's copy of C with the node ¬x of the variable x 1 's copy of V and so on). Then add a sink node t and connect the nodes z of all variable gadgets to t via edges of travel time 1 and infinite capacity. Finally, connect the node s 2 (which is the same for all variable gadgets) to t by first an edge s 2 v of travel time 1 and then another edge vt of travel time 2 and infinite capacity. The resulting network (see Figure 8) has an IDE flow not using edge s 2 v if and only if the 3SAT-formula is satisfiable: Namely, if the formula is satisfiable, take one satisfying interpretation and define a flow as follows: In every clause gadget choose one literal satisfied by the chosen interpretation and send all flow from this gadget over this literal's corresponding edge. This ensures that in the variable gadgets all flow will enter through only one of the two possible entry nodes x and ¬x and, as noted before, will then leave the gadget exclusively over node z . If, on the other hand, the 3SAT-formula is unsatisfiable every IDE flow will sent a flow volume of more than 1 over edge s 2 v during the interval [4,5] since in this case any flow has to have at least one variable gadget where flow volumes of at least four enter at node x as well as node ¬x (otherwise such a flow would correspond to a satisfying interpretation of the given 3SAT-formula). This shows that the first problem stated in Theorem 4.9 is NP-hard.
In order to show that the other problems are NP-hard as well, we will introduce a third type of gadget: The indicator gadget I (see Figure 9). We can construct such a gadget for any given single-source single-sink network N with constant inflow rate over the interval [0, θ 0 ] at its source node. It consists of a new source node s 1 with the same inflow rate as N 's source node shifted by 5 time steps. The node s 1 is connected to the sink node t (outside the gadget) by two paths: One through the network N (entering it at its original source node s N and leaving it from its sink node t N ) and one through two additional nodes s 2 and v and an edge of capacity and travel time 1 between them. All other edges outside N have infinite capacity. The two outgoing edge from s 1 both have a length of θ 0 . The path through the Figure 8.: Schematic representation of the whole network corresponding to a 3SAT-formula with clauses C 1 , . . . , C k in variables x 1 , . . . , x n . The triangles are clause gadgets (cf. fig. 6), the rectangles are variable gadgets (cf. fig. 7).
gadget has length one more than the path via s 2 and v. The node s 2 has a constant network inflow rate of 1 starting at time 4 and ending at time 5 + θ 0 . When embedding this gadget into a larger network (with sink t) the gadget is connected to the larger network by one or more incoming edges into s 2 . If no flow ever enters the gadget via this edge, all flow generated at s 1 will travel through the path containing s 2 v. If, on the other hand, a flow of volume more than 1 comes through this edge before the inflow at node s 1 starts, all the flow generated there will travel through the subnetwork N . Adding this gadget to the network constructed from the 3SAT-formula as described above results in a network with the following properties (see Figure 10 for an example): • If the 3SAT-formula is satisfiable there exists an IDE flow where the subnetwork N inside gadget I is never used but edge s 1 s 2 is used. • If the 3SAT-formula is unsatisfiable every IDE flow will be such that its restriction to the subnetwork N inside I is a (time shifted) IDE flow in the original stand alone network N and the edge s 1 s 2 is never used. Accordingly, if for example we use the network from Figure 4 as sub-network we have a reduction from 3SAT to the fourth problem from Theorem 4.9. Any network N gives us a reduction to the second problem (with edge s 1 s 2 as the special edge). And just an edge with a very small capacity allows a reduction to the third problem. Alternatively, one could also use a network wherein flow gets caught in cycles for a long time before it reaches the sink N has a length of exactly one more than the s 1 -t path using edge s 2 v. If within the interval [4,5] a flow of volume more than 1 arrives at s 2 over the dashed edge, all flow entering the network at s 1 will travel trough N (it will arrive at that subnetworks source node s N at a rate of u N during the interval [5 + θ 0 , 5 + 2θ 0 ]). If, on the other hand, a flow volume of at most 1 reaches s 2 via the dashed edge up to time 5 + θ 0 all flow originating at s 2 will bypass N using edge s 2 v and N will forever remain empty.
as, for example, the network constructed to prove the lower bound on the termination time of IDE in [10]. Remark 4.10. Combining a construction similar to the one above with the single-source multisink network constructed in the proof of [11,Theorem 6.3] to show that multi-commodity IDE flows may cycle forever, shows that the problem to decide whether a given multi-sink network has an IDE terminating in finite time is NP-hard as well.
Remark 4.11. The above construction also shows the following aspect of IDE flows: While a network may trivially contain edges that are never used in any IDE, edges that are only used in some IDE flows and edges that are used in every IDE, there can also be edges that are either not used at all or used for some flow volume of at least c, but never with any flow volume strictly between 0 and c.

Conclusions and Open Questions
We showed that Instantaneous Dynamic Equilibria can be computed in finite time for singlesink networks by applying the natural α-extension algorithm. The obtained explicit bounds on the required number of extension steps are quite large and we do not think that they are tight. Thus, further analysis is needed here. We then turned to the computational complexity of IDE flows. We gave an example of a small instance which only allows for IDE flows with rather complex structure, thus, implying that the worst case output complexity of any algorithm computing IDE flows has to be exponential in the encoding size of the input instances. Furthermore, we showed that several natural decision problems involving IDE flows are NP-hard by describing a reduction from 3SAT.
One common observation that can be drawn from many proofs involving IDE flows (in this paper as well as in [11] and [10]) is that they often allow for some kind of local analysis of their structure -something which seems out of reach for Dynamic Equilibrium flows. This local argumentation allowed us to analyse the behavior of IDE flows in the rather complex instance from Section 4.2 by looking at the local behavior inside the much simpler gadgets from which the larger instance is constructed. At the same time, this was also a key aspect of the positive result in Section 3 where it allowed us to use inductive reasoning over the single nodes of the given network. We think that this local approach to the analysis of IDE flows might also help to answer further open questions about IDE flows in the future. One such topic might be a further investigation of the computational complexity of IDE flows. While both our upper bound on the number of extension steps as well as our lower bound for the worst case computational complexity are superpolynomial bounds, the latter is at least still polynomial in the termination time of the constructed flow, which is not the case for the former. Thus, there might still be room for improvement on either bound.
Cominetti et al. [4] showed (using convergence to a steady-state) that the queue length of dynamic equilibria with infinitely lasting inflow rates are bounded (provided that the inflow rate is at most the capacity of a minimal cut). As shown in Theorem 4.5, convergence to a steady state is not guaranteed for IDE flow. Therefore, we can not deduce much about the long term behavior of queue lengths in IDE flows. On the one hand, it seems intuitive that they should remain bounded as well, since, whenever queue lengths grow to high, flow particles will take a different path until the queue length has decreased again. On the other hand, the instance in Figure 4 shows that there may exist infinitely many phases, where the inflow into the sink is smaller than the network inflow rate while at the same time there are no phases, where the inflow rate into the sink is larger than the network inflow rate. Accordingly, the queue lengths are growing higher every cycle -although in this specific example they are still bounded by 3.
Observation A.1. The flow distribution obtained by using Algorithm 4 at a given node only depends on the set of active edges, which subset of those currently has a non-zero queue, the gross node inflow rate and the label functions w i .
Observation A.2. If all input data for Algorithm 4 (i.e. b − v (θ) as well as all α i , β i and γ i ) is rational, so is the output (i.e. the z i ).