Abstract 1 Introduction 2 Preliminaries 3 Routing Decompositions 4 Algorithms for Multi-Arrival on Tree-Like Rotor Graphs 5 Conclusion References

A Quasi-Polynomial Time Algorithm for Multi-Arrival on Tree-Like Multigraphs

Ebrahim Ghorbani ORCID Hamburg University of Technology, Institute for Algorithms and Complexity, Hamburg, Germany Jonah Leander Hoff Hamburg University of Technology, Institute for Algorithms and Complexity, Hamburg, Germany Matthias Mnich ORCID Hamburg University of Technology, Institute for Algorithms and Complexity, Hamburg, Germany
Abstract

Propp machines, or rotor-router models, are a classic tool to simulate random systems in forms of Markov chains by deterministic systems. To this end, the nodes of the Markov chain are replaced by switching nodes, which maintain a queue over their outgoing arcs, and a particle sent through the system traverses the top arc of the queue which is then moved to the end of the queue and the particle arrives at the next node. A key question to answer about such systems is whether a single particle can reach a particular target node, given as input an initial configuration of the queues at all switching nodes. This question was introduced by Dohrau et al. (2017) under the name of Arrival. A major open question is whether Arrival can be solved in polynomial time, as it is known to lie in NPco-NP; yet the fastest known algorithm for general instances takes subexponential time (Gärtner et al., ICALP 2021).

We consider a generalized version of Arrival introduced by Auger et al. (RP 2023), which requires routing multiple (potentially exponentially many) particles through a rotor graph. The Multi-Arrival problem is to determine the particle configuration that results from moving all particles from a given initial configuration to sinks. Auger et al. showed that for path-like rotor graphs with a certain uniform rotor order, the problem can be solved in polynomial time.

Our main result is a quasi-polynomial-time algorithm for Multi-Arrival on tree-like rotor graphs for arbitrary rotor orders. Tree-like rotor graphs are directed multigraphs which can be obtained from undirected trees by replacing each edge by an arbitrary number of arcs in either or both directions. For trees of bounded contracted height, such as paths, the algorithm runs in polynomial time and thereby generalizes the result by Auger et al.. Moreover, we give a polynomial-time algorithm for Multi-Arrival on tree-like rotor graphs without parallel arcs.

Keywords and phrases:
Arrival, Rotor-routing, Tree-like Multigraph, Path-Like Multigraph, Fixed-Parameter Tractability
Copyright and License:
[Uncaptioned image] © Ebrahim Ghorbani, Jonah Leander Hoff, and Matthias Mnich; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Randomness, geometry and discrete structures
Funding:
Funded by the project “Hamburg Quantum Computing”, co-financed by ERDF and Fonds of the Hamburg Ministry of Science, Research, Equalities and Districts (BWFGB).
Editors:
Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyễn Kim Thắng

1 Introduction

In 2017, Dohrau et al. [3] introduced the Arrival problem, which they intuitively defined as follows:

“Suppose that a train is running along a railway network, starting from a designated origin, with the goal of reaching a designated destination. The network, however, is of a special nature: every time the train traverses a switch, the switch will change its position immediately afterwards. Hence, the next time the train traverses the same switch, the other direction will be taken, so that directions alternate with each traversal of the switch. Given a network with origin and destination, what is the complexity of deciding whether the train, starting at the origin, will eventually reach the destination?”

One may solve Arrival by running the train iteratively according to the outlined rules until reaching a destination. This may require a number of steps which is exponential in the number of switches. Gärtner et al. [6] devised an algorithm for Arrival which runs in subexponential time. It is further known that Arrival lies in NPco-NP [3], which motivated the conjecture that the problem is polynomial-time decidable. As of now, this conjecture is still open, despite some effort [4, 5, 6].

The routing behaviour in Arrival is also known as switching networks, rotor routing, Propp machines, and Eulerian walkers [4, 7, 10]. We adopt the nomenclature of rotor routing and refer to the trains as particles. In rotor routing, particles are routed from each node along its outgoing arcs in a fixed cyclic order called the rotor order. A directed multigraph equipped with a rotor order at each of its nodes is referred to as a rotor graph. Arrival can be seen as determining the unique particle configuration resulting from routing a single particle until it reaches a sink. As the complexity of Arrival in general is unkown, recent efforts focus on identifying families of instances on which Arrival can be solved in polynomial-time. One such family are tree-like rotor graphs, which are rotor graphs whose underlying undirected simple graphs are trees. Note that the class of tree-like rotor graphs is richer than its name may suggest: they can contain arcs in opposite direction, as well as parallel arcs, between the same two nodes. Tree-like rotor graphs are directed multi-graphs that can be obtained from undirected trees by replacing edge undirected edge {u,v} by any number auv0 of arcs (u,v) and any number avu0 of arcs (v,u), where auv and avu can be different (not both of them should be zero). On tree-like rotor graphs, Arrival was shown to be solvable in polynomial time [1]. More recently, the case of routing multiple (potentially exponentially many) particles on path-like rotor graphs has been studied. Multi-Arrival refers to the problem of determining the particle configuration resulting from a routing that moves all particles from a given initial configuration to the sinks. This resulting configuration has been proved to be unique [2]. Auger et al. [2] showed that for path-like rotor graphs with a certain uniform rotor order, Multi-Arrival can be solved in polynomial-time. Results by Gärtner et al. [6] show that polynomial-time algorithms for Multi-Arrival for a certain family of rotor graphs yield polynomial-time algorithms for Arrival for rotor graphs that belong to after deleting constantly many nodes.

Our Contributions.

Our main contributions are algorithms for Multi-Arrival on tree-like rotor graphs. To state them, we introduce the notion of contracted height 𝖼𝗁(R) of a simple rooted tree R as the minimum height over all trees obtained from R by contracting, for each node v of R, one of the arcs to its children. We now state our main results informally, where κ(T) is the maximum possible 𝖼𝗁(T) over all choices of a root, where T is the simple undirected underlying tree of T.

Theorem 1 (Informal).

Multi-Arrival can be solved on tree-like rotor graph T with |A(T)| arcs in time 𝒪(logκ(T)+1|A(T)|), where 𝒪 hides factors polynomial in the input. In particular, Multi-Arrival can be solved in polynomial time if κ(T)=𝒪(log|A(T)|log(log|A(T)|)).

We further show that if κ(T)=𝒪(1) (which includes path-like rotor graphs), Multi-Arrival can be solved in time polynomial in |A^(T)|, where A^(T) represents the succinct encoding of the arcs, only recording the number of consecutive parallel arcs. Therefore, our results widely generalize the previous algorithms by Auger et al. [2] for path-like rotor graphs with uniform rotor order.

As an important corollary, we deduce that Multi-Arrival on tree-like rotor graphs is fixed-parameter tractable when parameterized by κ(T). That is, Multi-Arrival can be solved in time f(κ(T))m𝒪(1) on tree-like rotor graphs of size m. Such fixed-parameter algorithms are considered to be advantageous over so-called 𝖷𝖯-algorithms, where the degree of the polynomial depends on the parameter. Indeed, for the related parameter “feedback vertex set size” 𝖿𝗏𝗌(G), which measures the node deletion distance of the rotor graph G to an acyclic digraph, Gärtner et al. [6] provided an 𝖷𝖯-algorithm with run time m𝒪(𝖿𝗏𝗌(G)).

Finally, we show:

Theorem 2 (Informal).

Multi-Arrival is solvable in polynomial time for tree-like rotor graphs without parallel arcs.

2 Preliminaries

2.1 Directed Multigraphs

Throughout, we consider directed multigraphs G with finite node set V(G) and arc set A(G). An arc with tail v and head w is said to be from v to w. A directed multigraph may have parallel arcs which share the same head-tail pair, and self-loops which are from and to the same node.

For a given node vV(G), we denote by A+(v) the set of arcs whose tail is v and define d+(v)=|A+(v)|. Let N+(v) be the set of out-neighbours of v and let N(v) be the set of in-neighbours of v. By d(v,w) we denote the number of arcs from v to w. For a directed multigraph G, let V+(G) be the set of nodes with positive out-degree and let S0(G) be the set of the sinks, that is, the nodes with out-degree 0. The underlying undirected simple graph of G is the undirected simple graph G with node set V(G) which contains an edge {v,w} whenever there is an arc between v and w. We call G tree-like (path-like) if G is a tree (path). A rooted tree is obtained from an undirected tree by designating one node as its root and orienting all edges away from the root.

2.2 Rotor-Routing

Let G be a directed multigraph. For any node vV+(G), a rotor order at v is a cyclic permutation of A+(v). A rotor order for G is a permutation θ of A(G) such that, for each vV+(G), the restriction of θ to A+(v) is a rotor order at v. The directed multigraph G combined with a rotor order θ is a rotor graph.

A rotor configuration of G is a mapping from ρ:V+(G)A(G) such that ρ(v)A+(v) for each vV+(G). Let G be the set of rotor configurations of G. A particle configuration of G is a mapping from σ:V(G). Let V(G) be the set of particle configurations of G.

For node v, denote by 𝒗V(G) the function which is 1 at v, and 0 elsewhere. For example, σ=σ+3𝒗 means σ(v)=σ(v)+3 and σ(u)=σ(u) for uv.

A rotor-particle configuration of G is a pair (ρ,σ) of a rotor configuration ρG and a particle configuration σV(G). Routing at vV+(G) on (ρ,σ) is the operation of moving a particle from v along the arc ρ(v) and then changing the rotor configuration at v to θ(ρ(v)). The resulting rotor-particle configuration (ρ,σ)=rout𝒗(ρ,σ) is then formally defined as

ρ(u) ={θ(ρ(u))u=v,ρ(u)uv,

and σ=σ+head(ρ(v))tail(ρ(v)). Routing decomposes into two operators. First, a move at v, denoted by ϕ(ρ;𝒗)=head(ρ(v))tail(ρ(v)). Second, a turn at v, denoted by θ𝒗, where θ𝒗(a)=θ(a) for each aA+(v) and θ𝒗(a)=a for each aA+(v). We see that

rout𝒗(ρ,σ)=(θ𝒗ρ,σ+ϕ(ρ;𝒗))=(ρ,σ).

This kind of routing is referred to as move-then-turn, as opposed to turn-then-move. It is easy to see that both kinds of routing are isomorphic by advancing or reverting the rotor configuration. We will use this isomorphism in the proof of 5.

We define θ𝒗=(θ𝒗)1 and ϕ(ρ;𝒗)=ϕ(θ𝒗ρ;𝒗); the inverse of rout𝒗 is defined as

rout𝒗(ρ,σ)=(θ𝒗ρ,σ+ϕ(ρ;𝒗))=(ρ,σ).

Given distinct nodes vu, observe that rout𝒗 and rout𝒖 commute, as the move and turn of v depend on and affect ρ only at component v. Hence, compositions of the routing operators are characterized by the number of times each node is routed.

A routing vector (or simply a routing) of G is a mapping from r:V+(G). We denote by routr the operator resulting from composing all (rout𝒗)r(v) for vV+(G) in arbitrary order. Similarly, we let θr denote the composition of all (θ𝒗)r(v) for vV+(G). Extending the move operator ϕ(ρ;𝒗) is more involved. We do so by interpreting ϕ to be the displacement of particles when routing. As such, for k, we define ϕ(ρ;k𝒗)=i=0k1ϕ(θi𝒗ρ;𝒗) and ϕ(ρ;k𝒗)=i=1kϕ(θi𝒗ρ;𝒗). Then we define ϕ(ρ;r)=vV+(G)ϕ(ρ;r(v)𝒗). It is now straightforward to see that

routr(ρ,σ) =(θrρ,σ+ϕ(ρ;r)).

For the sake of convenience, we extend these notations to sinks. Each routing rV+(G) is identified with the mapping in V(G) such that r(s)=0 for all sS0. Furthermore, routing sinks has no effect, i.e., θ𝒔=id and ϕ(ρ;𝒔)=𝟎.

2.3 Arrival and Rotor-Routing Games

In the Arrival game we start with a rotor-particle configuration (ρ,𝒖) where uV+(G) is the initial location of the particle. We then repeatedly route the node on which the particle is located. This makes the particle walk through the rotor graph until it ends up on a sink, at which point the game terminates. To ensure termination, throughout this article we require G to be stopping, meaning that every node has a directed path to some sink.

We now introduce the rotor-routing game, which generalizes Arrival. We say that routing node v is legal on (ρ,σ) if σ(v)>0. A routing sequence (v0,,vk1)(V+(G))k is legal on (ρ0,σ0) if each routing of vi is legal on (ρi,σi) where (ρi+1,σi+1)=rout𝒗𝒊(ρi,σi). Finally, a non-negative routing r is legal if there is a corresponding legal routing sequence (v0,,vk1), which means that r(v)=|{i{0,,k1}vi=v}| for each vV+(G).

Such a legal routing r is maximal on (ρ,σ) if σ=σ+ϕ(ρ;r) is non-positive on V+(G). That is, a routing r is maximal if no node can be legally routed after routing r.

In the rotor-routing game, at each step an arbitrary legal node is routed until all particles are on sinks. It is easy to see that in Arrival, the legal routing sequence is unique, but in rotor-routing at any point there may be multiple nodes that can be legally routed.

An important consequence of routing a node behaving independent of the configuration of other nodes is that every legal routing sequence eventually terminates with the same corresponding maximal legal routing.

Lemma 3 ([9, Lemma 3.9]).

For all (ρ,σ)G×V(G) with σ𝟎, there is a unique maximal legal routing r on (ρ,σ).

It follows that the maximal legal routing is an upper bound (component-wise) of all legal routings. We denote by (ρ,σ)=routL(ρ,σ) the rotor-particle configuration resulting from the unique maximal legal routing on (ρ,σ).

We are now ready to formally define the problems discussed in this paper through the notion of routings.

Problem (Arrival [3]).

Given (ρ,𝐮)G×V(G), compute σ for (ρ,σ)=routL(ρ,𝐮).

The following generalization of Arrival was introduced by Hoang [8]:

Problem (Legal Multi-Arrival [8]).

Given (ρ,σ)G×V(G) with σ𝟎, compute σ for (ρ,σ)=routL(ρ,σ).

An even more general scenario was introduced by Auger et al. [1]. Namely, if we do not require routings to be legal, for arbitrary σ any routing can be extended such that σ(v)=0 for all vV+(G). Such a rotor-particle configuration is called fully routed. We denote by rout(ρ,σ) the set of fully routed rotor-particle configurations obtainable by routing (ρ,σ).

Proposition 4 ([1, Theorem 2]).

For all (ρ,σ)G×V(G) there is a routing r such that with (ρ,σ)=routr(ρ,σ) one has σ(v)=0 on all vV+(G). Furthermore, for any two such routings r1 and r2, resulting in (ρ1,σ1) and (ρ2,σ2), respectively, we have that σ1=σ2.

This leads to the following problem, which is our main concern in this paper:

Problem (Multi-Arrival [1]).

Given (ρ,σ)G×V(G), compute σ for arbitrary (ρ,σ)rout(ρ,σ).

For σ𝟎, after applying the maximal legal routing it holds that σ(v)=0 for vV+(G). It follows that routL(ρ,σ)rout(ρ,σ) and that Legal Multi-Arrival reduces to Multi-Arrival. Conversely, finding full routings reduces to finding a maximal legal routing in G and in G(1), where G(1) is obtained from G by reversing the rotor order i.e. using θ1.

Proposition 5.

Let (ρ,σ)G×V(G) and σ=σ1σ2 such that σ1,σ2𝟎. Then given the maximal legal routing r1 on (ρ,σ1) in G and the maximal legal routing r2 on (θr1𝟏ρ,σ2) in G(1), we have that r=r1r2 is a full routing on (ρ,σ) in G.

Proof.

We define g:G×V(G)G×V(G) by g(ρ,σ)=(θ1ρ,σ). The function g transforms rotor-particle configurations such that negative move-then-turn routings in G correspond to positive turn-then-move routings in G(1). We let θ=θ1 and ϕ denote the move and displacement operators in G(1).

Claim.

It holds that routGr(ρ,σ)=g1(routG(1)r(g(ρ,σ))).

Proof.

We show that routG𝒗(ρ,σ)=g1(routG(1)𝒗(g(ρ,σ))), from which the claim follows. Recall that routG(1)𝒗(ρ,σ)=(θ𝒗ρ,σϕ(θ𝒗ρ;𝒗)). First, for the turn operator we see that θ𝒗θ1=θ1θ𝒗. Then, for the move operator we derive that

ϕ(θ𝒗θ1ρ;𝒗) =ϕ(ρ;𝒗).

Consequently, it holds that

g1(routG(1)𝒗(g(ρ,σ))) =g1routG(1)𝒗(θ1ρ,σ)
=g1(θ1θ𝒗ρ,σϕ(ρ;𝒗))
=(θ𝒗ρ,σ+ϕ(ρ;𝒗))=routG𝒗(ρ,σ).

This proves the claim. We next find that σ+ϕ(ρ;r1r2)=(σ1+ϕ(ρ;r1))(σ2+ϕ(θr1𝟏ρ;r2)). Since r1 is maximal on (ρ,σ1) with σ1𝟎 in G, it follows that σ1+ϕ(ρ;r1) is 0 on V+(G). Similarly, as r2 is maximal on (θr1𝟏ρ,σ2), with σ2𝟎 in G(1) we have that σ2+ϕ(θr1𝟏ρ;r2) is also 0 on V+(G). It follows that r is a full routing.

Our approach finds maximal legal routings which enables us to solve both Legal Multi-Arrival and Multi-Arrival on tree-like rotor graphs.

3 Routing Decompositions

In this section we show how to decompose maximal legal routings into legal routings whose most recently used arcs are directed towards sinks. We shall always denote the maximal legal routing by r^, assuming some (ρ,σ) to be fixed.

3.1 Destination Graphs

Given a rotor configuration ρ and routing r𝟎, the destination graph G[ρ;r] is a subgraph of G whose nodes consist of all those that either sent or received particles during routing r. For each node vsupp(r), that is r(v)0, the destination graph G[ρ;r] contains only the outgoing arc that the last particle traversing v was sent over when routing r. That is, G[ρ;r] is the subgraph of G induced by the arcs {θ1(ρ(v))vsupp(r)}, where ρ=θrρ is the rotor configuration after routing r. Each node vsupp(r) has one outgoing arc in G[ρ;r] and every other node in G[ρ;r] has no outgoing arcs.

Furthermore, the destination graph G[ρ;r^] of the maximal legal routing is acyclic and the connected components are directed subtrees rooted at sinks. Figure 1 depicts a rotor graph with the rotor order being clockwise, and a corresponding destination graph.

(a) On (ρ,σ).
(b) On (ρ,σ).
Figure 1: (a) A rotor graph G with a rotor-particle configuration (ρ,σ), where solid lines represent ρ, labels on the nodes represent the particle distribution σ=1𝒗2+2𝒗3. A possible maximal legal routing sequence is v2v4v2s2, v3v4v1v2v4v2s2 and v3s3, with corresponding maximal legal routing r^=1𝒗1+4𝒗2+2𝒗3+3𝒗4.  (b) Thick red lines are the arcs in the destination graph G[ρ;r^] for the maximal legal routing r^. Note that G[ρ;r^] does not contain s1.

3.2 Compensated Routings

Any legal routing r must satisfy the condition that, for each node v, the number of particles sent out of v during the routing process must not exceed the number of particles initially present at v and those sent into v during the routing. This establishes one of the main constraints for a routing to be legal. We call such a routing “compensated”.

Formally, we say that a routing r is compensated at v with respect to (ρ,σ) if

σ(v)+uN(v)ϕvu(ρ;r(u))wN+(v)ϕwv(ρ;r(v))=r(v),

where ϕwv(ρ;j) denotes the number of particles sent to w when routing j particles out of v.

A routing is called compensated if it is compensated at each vV+(G). Equivalently, r is compensated if and only if σ+ϕ(ρ;r)𝟎. Note that compensated routings are not necessarily legal.

The following proposition, which is a special case of a theorem by Tóthmérész [11, Theorem 3.4], provides a characterization of compensated routings that are legal. For sake of completeness, we include a simplified proof.

Proposition 6.

Given a routing r𝟎 and rotor-particle configuration (ρ,σ) with σ𝟎. Let (ρ,σ)=routr(ρ,σ). The routing r is legal on (ρ,σ) if and only if, r is compensated on (ρ,σ) and each cycle in G[ρ;r] contains some node v such that σ(v)>0. In particular, if G[ρ;r] is acyclic, legality and compensation are equivalent.

Proof.

Suppose that r is legal. So it is compensated. If G[ρ;r] contains a cycle C, then given some corresponding legal routing sequence, there is some node vV(C) that is routed last in C. Let wV(C) denote the successor of v in C. Then a particle is sent from v to w, but w is not routed afterwards. Hence, as the particle distribution is non-negative during the legal routing sequence, we have that σ(w)>0.

Conversely, assume that r is compensated on (ρ,σ) and each cycle in G[ρ;r] contains some node v such that σ(v)>0. Let rr be a legal routing with (ρ,σ)=routr(ρ,σ) obtained by routing until for each node v either σ(v)=0 or r(v)=r(v).

Since r is legal, it suffices to show that r=r. Assume, for the sake of contradiction, that rr. We then consider the set B={vV+(G)r(v)<r(v)} of nodes that still need to be routed (if any).

It follows that σ(v)=0 for each vB. In the remaining routing rr, each particle sent out from a node in B must be replaced afterward; otherwise, we would end up with a node vB such that σ(v)<0, which is impossible since r is compensated. This implies that during the routing rr, no particle from B is sent outside of B; otherwise, that particle could not be replaced in B as no node outside of B is routed in rr. It follows that in the subgraph H of G[ρ;r] induced by B, the nodes have out-degree of 1, implying that H contains a cycle. This contradicts the assumption that every cycle in G[ρ;r] contains a node v such that σ(v)>0.

3.3 𝒔-Directed Routings

The compensated routings r are those for which each vV+(G) satisfies an inequality that relates r(v) to r(u) for all in-neighbours u of v. Enforcing this inequality is much simpler than enforcing the stricter property of legality. If restricted to routings with acyclic destination graph, these properties coincide. For finding the maximal legal routing r^, we may restrict the search to only those routings. But the destination graph being acyclic is also a non-trivial property. Instead, we consider an even more restricted case in which the destination graph is oriented towards some fixed sink s. In tree-like rotor graphs, this implies a unique destination graph (up to parallel arcs), which can be enforced by an appropriate parametrization of routings. But first, we need to show that these restricted routings still allow us to recover r^.

Given a rotor configuration ρ and sink s, we say that node v is s-directed in a routing r if vsupp(r) and there is a path in G[ρ;r] from v to s. Routing r is s-directed if every vsupp(r) is s-directed in r. Our aim, to be established in Theorem 9, is to decompose r^ into a set of s-directed routings rs for each sink s. The idea is that each such rs need only match the number of particles sent into s by r^. We denote by ϕw(ρ;r) the number of particles sent to w when routing r.

Lemma 7.

Let (ρ,σ) be a rotor-particle configuration with σ𝟎 and b𝟎 be a legal routing. Then, for each sink s, there is an s-directed legal routing r𝟎 such that rb and ϕs(ρ;r)=ϕs(ρ;b).

Proof.

We construct a series of legal routings b=r1r2 with A1A2 denoting the s-directed nodes of the respective routing, such that each ri+1 equals ri on Ai and each vAi has the same in-flow in ri+1 as in ri.

Suppose that we constructed ri and that there is flow from V+(G)Ai to Ai when routing ri. Consider an arbitrary legal routing sequence (v0,,vm1) corresponding to ri with (ρ0,σ0)=(ρ,σ) and (ρ+1,σ+1)=rout𝒗(ρ,σ).

Let j be maximal such that vjAi and head(ρj(vj))Ai. That is, the jth routing step is the last time a particle is sent into Ai from V+(G)Ai. Now, we remove each routing step >j with vAi. Let ri+1 be the corresponding routing vector. Then ri+1 must be legal since for >j we have vAi and v has in the -th routing step the same number of particles as before the removals. By construction ri+1 satisfies the required conditions and Ai{vj}Ai+1 as vj sent its last particle towards Ai in ri+1.

Otherwise, suppose there is no flow from V+(G)Ai to Ai when routing ri. We set r to be ri on Ai, and zero on V+(G)Ai. Then r is an s-directed legal routing with rr1=b. Since sA1A2 we have ϕs(ρ;r1)=ϕs(ρ;r2)==ϕs(ρ;r). This procedure is finite as it terminates once supp(b)Ai and each step increases the size of Ai.

Next, we show that in the maximal legal routing r^ the s-directed nodes already route only as much as is required to achieve the flow towards s. We therefore derive that a corresponding s-directed routing matches r^ on those nodes.

Lemma 8.

Let (ρ,σ) be a rotor-particle configuration with σ𝟎. If r𝟎 is an s-directed legal routing such that ϕs(ρ;r)=ϕs(ρ;r^), then r(v)=r^(v) for each s-directed node of r^.

Proof.

Suppose u is s-directed in r^ such that r(u)r^(u). We denote by v the successor on the path from u to s in G[ρ;r^]. As r^ is maximal and r is legal, it must be that r(u)<r^(u). Since the last particle sent from u in r^ is towards v we have ϕvu(ρ;r(u))<ϕvu(ρ;r^(u)). In particular, ϕv(ρ;r)<ϕv(ρ;r^). If vs, then as r^ routes v for each received particle and r receives less particles on v, it follows that r(v)<r^(v). Now, v is also s-directed in r^ with r(v)r^(v). We repeat the argument along the path from u to s in G[ρ;r^] until we end up with v=s. Then ϕs(ρ;r)<ϕs(ρ;r^) contradicts the assumption that ϕs(ρ;r)=ϕs(ρ;r^).

Theorem 9.

Let (ρ,σ) be a rotor-particle configuration with σ𝟎. For each sS0, let rs be an optimal solution of the following optimization problem:

maximize ϕs(ρ;r)subject to ris an s-directed compensated routing.

Then r^ is given by r^(v)=max{rs(v)sS0} for all vV+(G).

Proof.

Let sS0. As rs is s-directed, it has an acyclic destination graph. Since it is also compensated, it follows from 6 that rs is legal. In particular, as r^ is maximal we have rsr^ and ϕs(ρ;rs)ϕs(ρ;r^). Now, as shown by 7 there is some legal s-directed routing rs such that ϕs(ρ;rs)=ϕs(ρ;r^). It follows from rs maximizing ϕs(ρ;r) that ϕs(ρ;rs)=ϕs(ρ;r^).

For each vsupp(r^) the claim holds as 0rs(v)r^(v)=0 for each sS0. Let vsupp(r^). Then as G[ρ;r^] is acyclic and each node in G[ρ;r^] has out-degree at most one, there is some u that the unique path starting at v ends on. If uS0, then usupp(r^). But then u receives a particle in r^ but is not routed, which contradicts the maximality of r^. Thus, uS0 and v is u-directed in r^. Consequently, due to 8 we find that r^(v)=ru(v)=max{rs(v)sS0}.

4 Algorithms for Multi-Arrival on Tree-Like Rotor Graphs

In the following, let T be a tree-like rotor graph. Henceforth assume, without loss of generality, that the induced subgraph of T on V+(T) is strongly connected, and each sink to have exactly one in-neighbour. Indeed, if T were not strongly connected, then we can solve Multi-Arrival in some ordering of the strongly connected components as each component has no particles flowing to the prior. Furthermore, if some sink had multiple in-neighbours, we split it into one sink per in-neighbor.

4.1 Relative Rotor Subgraphs

With the above assumptions on T, each vV+(T) has a unique successor on its paths to s in T. We denote by Ns+(v) the successor on the paths from v to s in T, and by Ns(v) the set of predecessors whose successor is v on their respective paths towards s. When a routing is s-directed, its destination graph can be seen to be an s-rooted directed subtree of T.

Throughout this section, we fix a sink sS0 and a rotor-particle configuration (ρ,σ) with σ𝟎. For the sake of convenience, we leave this dependence on s and (ρ,σ) implicit in the introduced notation. Further, we simplify the notation and let ϕ(r) denote ϕ(ρ;r), and similarly extend this simplification to ϕwv and ϕv.

We proceed to show that s-directed routings can be characterized by their restrictions to nested rotor subgraphs. For any node vV+(T) with w=Ns+(v) let Tv be the rotor graph obtained from T as follows. We remove the arcs between v and w, and then, remove the nodes not reachable from v. Finally, we add w again with only the original arcs from v to w (but not the reverse arcs). In Tv, node w is thus a sink. See Figure 2 for an example.

Figure 2: Example of a relative subtree Tv. Grey dashed lines show the arcs oriented away from s. Note that, e.g., the rotor graph Tv2 contains v1 as a sink, which therefore has no arcs from v1 to v2.

For any integers x,y, we denote by Hv(x,y) the set of w-directed compensated routings r in Tv on rotor-particle configuration (ρ,σ+y𝒗) such that ϕwv(r(v))=x.

Furthermore, we define hv(y)=max{xHv(x,y)}.

Note that for a given y, from 7 it follows that hv(y) is the flow from v to w that is legally achievable in Tv when dispersing an additional y particles on v.

Lemma 10.

Given vV+(T) and x,y such that Hv(x,y), we have Hv(x,y) for any 0xx. In particular, Hv(x,y) if and only if 0xhv(y).

Proof.

Let rHv(x,y) and let b be some legal routing such that x=ϕw(ρ;b)ϕw(ρ;r)=x in Tv, where w=Ns+(v). Note that such a b exists as we may truncate a legal routing sequence of r up to the x-th routing towards w. Then, using 7 with b on Tv, we obtain an w-directed compensated routing r with x=ϕw(ρ;r). Hence, rHv(x,y). As the zero routing is always compensated and s-directed, the second claim follows as well.

Let w=Ns+(v) and uNs(v). We define the function qv: as the minimum number of routings required to send x particles from v to w. Formally, qv(x)=min{kϕwv(ρ;k)=x}. It is also convenient to specify the notation quv(x)=ϕuv(qv(x)), which is the number of particles that v sends to u as a by-product.

The following crucial lemma will enable us to recursively construct routings in Hv(x,y).

Lemma 11.

Let vV+(T) and w=Ns+(v). Consider a routing r𝟎 on Tv and for uNs(v) let ru denote the restriction of r on V+(Tu). Then, Hv(0,y)={𝟎}, and for x>0,

rHv(x,y)

if and only if

r(v) =qv(x), (1)

and there exist non-negative integers xu, for uNs(v), such that

uNs(v)xu r(v)yσ(v), (2)
ru Hu(xu,ϕuv(r(v))),for each uNs(v) . (3)

In particular, Hv(x,y) if and only if

uNs(v)hu(quv(x))qv(x)yσ(v). (4)

Proof.

Let rHv(0,y). Then r(v)=0, as ϕwv(r(v))=0 and r is w-directed. It follows that v is not in Tv[ρ;r], and since every path from V+(Tv) to w in Tv is through v, it must be that supp(r)=.

Now, for the case x>0, assume that rHv(x,y) and therefore r(v)>0. Thus, the last routing of r at v should be towards w, which is equivalent to (1).

Set xu=ϕvu(ru(u))=ϕvu(r(u)). Then we see that (2) is a rearrangement of r being compensated at v. For (3), consider uNs(v). As the nodes of Tu are w-directed in r and their paths towards w in Tv[ρ;r] go through v, it follows that ru is v-directed in Tu. It remains to show that ru being compensated in Tv is equivalent to ru being compensated in Tu. With yu=ϕuv(r(v)), note that ru needs to be compensated on (ρ,σ+yu𝒖) in Tu. Clearly, the only non-trivial case is the compensation at u, which follows from the in-flow being equal in both cases:

ϕu(r) =ϕu(ru)+ϕuv(r(v))+σ(u)=ϕu(ru)+σ(u)+yu.

Consequently, ruHu(xu,yu).

Now suppose that r𝟎 is a routing that satisfies (1)–(3). Notably, as x>0 we have qv(x)>0. As mentioned above, (1) is equivalent to v being w-directed in r. From (3) it follows that xu=ϕvu(r(u)), which together with (2) implies that r is compensated at v. Also, r is w-directed and compensated on V+(Tv){v}, because by (3), each restriction ru is v-directed and compensated.

The following properties of the functions hv are needed in our argument.

Lemma 12.

For any vV+(T), define fv(x)=qv(x)σ(v)uNs(v)hu(quv(x)) for all x. Then the following properties hold for the functions fv and hv:

  1. (i)

    hv(y)=max{xfv(x)y},

  2. (ii)

    hv(y)hv(y+1)hv(y)+1, for y,

  3. (iii)

    fv(x+1)fv(x)+1, for x.

Proof.

(i) We know that hv(y) equals the largest x with Hv(x,y), which, by 11, is the largest x satisfying (4), that is, the largest x such that fv(x)y.

(ii) Let r^y denote the maximal legal routing in Tv on (ρ,σ+y𝒗). Then, by definition of hv(y) and 7, we see that hv(y)=ϕw(ρ;r^y). Thus, with hv(y+1)=ϕs(ρ;r^y+1), we see that hv(y+1)=hv(y)+1 if that additional particle ends up in w and hv(y+1)=hv(y) otherwise.

(iii) Being integer-valued function, it suffices to show that fv is strictly increasing.

Observe that qv(x+1)qv(x) is the number of arcs until and including the next that has head w. But quv(x+1)quv(x) is then the number of those arcs that have head u. Consequently, qv(x+1)qv(x)>uNs(v)(quv(x+1)quv(x)), where by (ii), the right-hand side is as large as uNs(v)(h(quv(x+1))h(quv(x))). It then follows that fv(x+1)>fv(x).

4.2 MULTI-ARRIVAL for Tree-Like Multigraphs

In this subsection, we prove the main result of the paper, 1. To do so, we first need to specify how a rotor graph is computationally represented.

Suppose we wanted to represent A+(v) and θv. We could take in a sequence of nodes w1,,wk and let each index i identify an outgoing arc with head wi. Arc with label i is taken to be before i+1 in θv with index k+1 wrapping around to 1. We can improve upon this by merging consecutive duplicates wi=wi+1 by associating with each wi the number of times that entry is repeated. We denote by A^ the reduced arc set of the rotor graph obtained by removing arcs in A that vanish due to this encoding of consecutive parallel arcs. This encoding is called succinct [4, 11]. Hence, |A^| is polynomial in the input size, while |A| may be exponential in the input size.

For a rooted simple tree R, its contracted height 𝖼𝗁(R) is defined as the minimum height over all trees which are obtained from R by contracting, for each node v of R, one of the arcs to its children.

Lemma 13.

For any rooted simple tree R, it holds that 𝖼𝗁(R)log(1+(R)), where (R) is the number of nodes of R with at least two children.

Proof.

We proceed by induction on the height of R; recall that the height of a rooted tree is the maximum length of a path from its root to any of its other nodes. If the height of R is zero, the assertion holds trivially. Thus, assume now that the height of R is at least 1. Let R1,,Rk be the connected components of R after removing its root, with 𝖼𝗁(Rj)=max{𝖼𝗁(Ri)i=1,,k}. If there is a unique such j, then 𝖼𝗁(R)=𝖼𝗁(Rj) since the edge to that subtree can be contracted, and we are thus done by the induction hypothesis.

Otherwise, there is another such j, say j. We may assume that (Rj)(Rj). Then

𝖼𝗁(R) 1+𝖼𝗁(Rj)log(2+2(Rj))log(1+(R)).

Let Ru be the tree T[V+] rooted at u. We define

k(T)=1+max{𝖼𝗁(Ru)uN(S0)}.

By 13, k(T)1+log(n>2(T)+1), where n>2(T) denotes the number of nodes in T that have more than two neighbors.

Notice that k(T)κ(T), where κ(T) is the upper bound on the contracted heights of T as mentioned in introduction for the sake of stating an informal version of the main result.

We can thus now state our main result formally.

Theorem 1.

Multi-Arrival can be solved on any tree-like rotor graph T with arc set A in time 𝒪(|S0||A^|logk(|A|)), where k=k(T)1+log(n>2(T)+1). In particular, Multi-Arrival can be solved in time polynomial in |A| if k=𝒪(log|A|log(log|A|)). Furthermore, if k=𝒪(1) (which includes path-like rotor graphs as then k=1), Multi-Arrival can be solved in time polynomial in |A^|.

Furthermore, in the procedure, a full routing for Multi-Arrival is obtained.

When k is fixed, we have that logk(|A|)f(k)|A| for some computable function f, and thus the run time of our algorithm would be at most f(k)|A|3. Therefore, we conclude:

Corollary 14.

Multi-Arrival on tree-like rotor graphs is fixed-parameter tractable with parameter k.

One of the main ingredients of our approach is an affine approximation for the function hv(y), which is provided by the following lemma:

Lemma 15.

For any vV+(T), there is an affine function h¯v: such that

|h¯v(y)hv(y)|2|A(Tv)|,y. (5)

A set of these functions {h¯vvV+(T)} can be determined in time 𝒪(|A^|).

Proof.

We first observe that for x>0, it holds that

qv(x+d(v,w)) =qv(x)+d+(v),
quv(x+d(v,w)) =quv(x)+d(v,u).

These properties suggest the following approximations:

q¯v(x) =(d+(v)qv(d(v,w)))+xd+(v)d(v,w)to approximate qv(x), and
q¯uv(x) =(d(v,u)quv(d(v,w)))+xd(v,u)d(v,w)to approximatequv(x).

Let x=d(v,w)+td(v,w) with 0t<d(v,w). Then

|qv(x)q¯v(x)| =|(qv(d(v,w)+t)qv(d(v,w)))td+(v)d(v,w)|<d+(v), (6)
|quv(x)q¯uv(x)| =|(quv(d(v,w)+t)quv(d(v,w)))td(v,u)d(v,w)|<d(v,w). (7)

Similarly, (6) and (7) hold for x<d(v,w) as then qv(x) and q¯v(x) lie within an interval of size d+(v), and quv(x) and q¯uv(x) lie within an interval of size d(v,w). Now, define inductively

h¯v(y) =max{xf¯v(x)y},
f¯v(x) =q¯v(x)σ(v)uNs(v)h¯u(q¯uv(x)).
Claim.

For any x,y,δ with δ>0, it holds that

f¯v(x+δ) f¯v(x)+δ, (8)
h¯v(y+δ) h¯v(y)+δ. (9)

Proof.

We first observe that for each node v, (9) follows from (8). Let h¯v(y)=x. So f¯v(x)=y. Then f¯v(x+δ)f¯v(x)+δ=y+δ. As f¯v is strictly increasing, we must have h¯v(y+δ)x+δ=h¯v(y)+δ.

Now, we establish (8) by induction. We have that

f¯v(x+δ)f¯v(x) =q¯v(x+δ)q¯v(x)uNs(v)(h¯u(q¯uv(x+δ))h¯u(q¯uv(x))).

If Ns(v)=, then f¯v(x+δ)f¯v(x)δd+(v)d(v,w)δ. Next, assume that Ns(v) and (8) holds for all uNs(v). Then by the above argument, (9) also holds for uNs(v), implying that

h¯u(q¯uv(x+δ))h¯u(q¯uv(x)) =h¯u(q¯uv(x)+δd(v,u)d(v,w))h¯u(q¯uv(x))δd(v,u)d(v,w).

It follows that f¯v(x+δ)f¯v(x)δd+(v)d(v,w)uNs(v)δd(v,u)d(v,w)=δ, as required.

Claim 16.

If for all x, |f¯v(x)fv(x)|L, then |h¯v(y)hv(y)|L+1 for all y.

Proof.

Suppose that h¯v(y)=x. Then f¯v(x)f¯v(x)y and f¯v(x+1)>y. Thus, fv(x+1+L)fv(x+1)+Lf¯v(x+1), that is fv(x+1+L)>y. That means hv(y)x+L. On the other hand, fv(xL)fv(x)Lf¯v(x)y. So hv(y)xL, and thus |hv(y)x|L which implies that |hv(y)h¯v(y)|L+1.

Now, we complete the proof by induction. If Ns(v)=, then h¯v(y)=d(v,w)d+(v)(y+σ(v)) is an affine function that satisfies (5), because of (6) and 16.

So assume that Ns(v) and the assertion holds for h¯u(y) for every uNs(v). The property of being an affine function follows directly from the definition of h¯v(y).

For an integer x, we have:

|hu(quv(x))h¯u(q¯uv(x))||hu(quv(x))h¯u(quv(x))|+|h¯u(quv(x))h¯u(q¯uv(x))|. (10)

The induction hypothesis implies that

|hu(quv(x))h¯u(quv(x))| 2|A(Tu)|.

Combining (7) and (9), we see that

|h¯u(quv(x))h¯u(q¯uv(x))| d(v,u).

Thus, the right-hand side of (10) is at most d(v,u)+2|A(Tu)|. It follows that for every x, it holds that

|f¯v(x)fv(x)|d+(v)+uNs(v)(d(v,u)+2|A(Tu)|).

Then applying 16, for every y we have that

|h¯v(y)hv(y)|1+d+(v)+uNs(v)(d(v,u)+2|A(Tu)|)2|A(Tv)|.

The inductive constructing of h¯v for each vV+(T) can be done in time 𝒪(|A^+(v)|). Therefore, the set {h¯vvV+(T)} can be constructed in time 𝒪(|A^+|).

In following, we let kv=1+𝖼𝗁(Tv) where Tv is the rooted simple tree Tv(S0{s}) rooted at w.

Lemma 17.

Let t be the unique in-neighbour of s. Then the maximum ϕs(r) over every s-directed compensated routing r can be obtained in time 𝒪(|A^|logkt(|A|)).

Proof.

We first determine the set of affine functions {h¯vvV+(T)} in time 𝒪(|A^|) using 15. For given x,y, let 𝒯v be the time complexity required to query Hv(x,y), that is to return a routing from the set or to confirm that it is empty.

We will prove that

𝒯v=𝒪(|A^(Tv)|logkv1(|A(Tv)|)). (11)

Once we established this, for a given x we can determine if there is some rHt(x,0), that is an s-directed compensated routing rs such that ϕs(rs)=x, within time 𝒯t.

Moreover, by employing an exponential search using the approximation h¯t(0), we only need to check the non-emptiness of Ht(x,0) for 𝒪(log|A|) distinct values of x. This process enables us to compute

ht(0) =max{ϕs(r)s-directed compensated routing r}

in time 𝒪(𝒯tlog|A|)=𝒪(|A^|logk(|A|)), which completes the proof.

So it remains to prove (11). To do so, we first establish the following claim.

Claim 18.

For vV+(T) and any choice of uNs(v), it holds that

𝒯v=𝒪(|A^+(v)|+𝒯u+uNs(v){u}𝒯ulog|A(Tu)|).

Proof.

Given x,y, our objective is to either find a routing rHv(x,y) or confirm that the set is empty. We may assume x>0 as otherwise we simply return r=𝟎.

For each uNs(v), let yu=quv(x).

First, we determine r(v)=qv(x). Then, for each uNs(v){u}, we determine h¯u(yu).

Using the induced bound of that approximation on hu(yu), we perform an exponential search to obtain xu=hu(yu) and ruHu(xu,yu).

To perform this, due to 15, we require at most 1+log|A(Tu)| queries to Hu. As for xu, we set

z=r(v)σ(v)yuNs(v){u}xu.

If z0, we let xu=0 and ru be the zero routing which belongs to Hu(0,yu). Otherwise, we let xu=z and query ruHu(xu,yu). If no such ru exists, we terminate and assert Hv(x,y)=.

Finally, we return r as given by r(v) and whose restrictions to V(Tu) is given by ru for every uNs(v).

Now, the procedure takes the claimed time if r(v) and {yuuNs(v)} can be calculated in time 𝒪(|A^+(v)|). This can be done using a straightforward procedure employing two Euclidean divisions and two iterations through the encoding A^+(v).

As for correctness, if we failed to obtain ru, we must have xu>hu(yu). Hence:

0 >r(v)σ(v)yuNs(v)hu(yu),

which by 11 implies Hv(x,y)=. Otherwise, r satisfies every condition of 11 and thus rHv(x,y).

To complete the proof of (11) we now proceed by induction. If Ns(v)=, we have 𝒯v=𝒪(|A^+(v)|) which satisfies the hypothesis as kv=1. Otherwise, by the induction hypothesis, for each uNs(v), we have that 𝒯u=𝒪(|A^(Tu)|logku1(|A(Tu)|)).

Now, using 18, we obtain

𝒯v=𝒪(|A^+(v)|+|A^(Tu)|logku1(|A(Tu)|)+uNs(v){u}|A^(Tu)|logku(|A(Tu)|)).

We choose uNs(v) such that ku=max{kuuNs(v)}. Then

kv=max{ku}{ku+1uuNs(v)},

from which (11) follows.

Proof of 1.

By 5, it suffices to show that Legal Multi-Arrival can be solved in the claimed time.

Our algorithm for 1 finds, for every sS0, an s-directed compensated routing rs which maximizes ϕs(r). This by Theorem 9 allows us to obtain the maximal legal routing r^ given by r^(v)=max{rs(v)sS0} for vV+(T).

Hence, for each sS0 we need only show that rs can be obtained in time𝒪(|A^|logk(|A|)), which is established by 17.

If for some constant C>0, we have kClog|A|log(log|A|), then it is seen that logk(|A|)|A|C, and thus the run time of the algorithm is 𝒪(|A|max(1,C)).

Further, if for some constant C>0, we have kC, by the fact that log(|A|)|A^|, the run time is 𝒪(|A^|C+2).

4.3 MULTI-ARRIVAL for Tree-like Simple Graphs

In this subsection, we focus on tree-like rotor graphs without parallel arcs, for which we prove that Multi-Arrival can be solved in polynomial time.

Theorem 2.

Multi-Arrival can be solved on tree-like rotor graphs T with arc set A, sink set S0 and without parallel arcs in time 𝒪(|S0||A|3). Furthermore, in the procedure, a full routing is obtained.

We now employ a dynamic program that given bounds b1b2 that contain some unknown s-directed compensated routing r, constructs lower bounds of {hvvV+(T)}. Then, as r is contained in those bounds, these lower bounds allow us to obtain an s-directed compensated routing rr in time proportional to the size of these bounds.

Lemma 19.

Let T be a tree-like rotor graph, and let b1,b2 be two vectors such that there exists an s-directed compensated routing r with b1rb2. Then we can construct an s-directed compensated routing r such that rr in time 𝒪(Δ|A^|) where Δ=1+max{ϕwv(b2(v))ϕwv(b1(v))vV+(T) and w=Ns+(v)}.

Proof.

First, we inductively construct for each vV+(T) a strictly increasing function f^v:Iv where Iv={ϕwv(b1(v)),,ϕwv(b2(v))} and a function h^v:. The function h^v will serve as a lower bound for hv.

Suppose h^u has been constructed for each uNs(v). We define f^v and h^v as follows:

f^v(x) =qv(x)σ(v)uNs(v)h^u(quv(x)),forxIv,
h^v(y) ={0y<minf^v,max{xIvf^v(x)y}minf^vy.

It is clear that f^v is strictly increasing and h^v is an increasing function by arguments analogous to that of 12. Similarly, as by induction we have h^uhu for all uNs(v), it follows that h^vhv.

Next, we will show that

h^v(ϕvw(r(w)))ϕwv(r(v)). (12)

To this end, suppose that, by induction, h^u(ϕuv(r(v)))ϕvu(r(u)) for uNs(v). Then as r is a compensated routing, we have:

ϕvw(r(w)) r(v)σ(v)uNs(v)ϕvu(r(u)).

Since the function ϕwv() is increasing and b1(v)r(v)b2(v), we have ϕwv(r(v))Iv. Also, qv(ϕwv(r(v)))=r(v), as r is s-directed.

Consequently,

f^v(ϕwv(r(v))) =r(v)σ(v)uNs(v)h^u(ϕuv(r(v)))
r(v)σ(v)uNs(v)ϕvu(r(u))ϕvw(r(w)).

From this, by the definition of h^v, (12) readily follows.

Next, we inductively construct an s-directed routing r and begin by setting r(s)=r(s)=0.

We assume by induction that r(w) is defined and satisfies r(w)r(w).

Now, if ws and r(w)=r(w)=0, we set r(v)=0. From 11 we see that r(v)=0. Otherwise, we define

r(v)=qv(h^v(ϕvw(r(w)))). (13)

From r(w)r(w) and (12) it follows that h^v(ϕvw(r(w)))h^v(ϕvw(r(w)))ϕwv(r(v)).

Taking qv from the left and right sides of this inequality, we get r(v)r(v).

Since rr, it remains to show that r is s-directed and compensated. We accomplish this by showing that the conditions of 11 are satisfied by r. Let vV+(T) and assume for each uNs(v) we have ruHu(ϕvu(r(u)),ϕuv(r(v))) where ru denotes the restriction of r to Tu. We will show that rv belongs to Hv(ϕwv(r(v)),ϕvw(r(w))). By construction, ϕwv(r(v))>0 if and only if rv(v)>0. The case rv(v)=0 is trivial as then we see that rv=𝟎. Otherwise, we need to show that (1)–(3) of 11 hold. By the assumption, (3) is already satisfied.

Taking ϕwv() from the both sides of (13), we obtain ϕwv(r(v))=h^v(ϕvw(r(w))). So r(v) satisfies (1).

Finally, by definition of h^v and r, we have:

ϕvw(r(w)) f^v(ϕwv(r(v)))
=r(v)σ(v)uNs(v)h^u(ϕuv(r(v)))=r(v)σ(v)uNs(v)ϕvu(r(u)).

Consequently, (2) holds as well.

Hence, the procedure returns the desired s-directed compensated routing rr.

Note that h^v is increasing. Hence, it is straightforward to see that we can construct h^v by iterating through x{ϕwv(b1(v)),,ϕwv(b2(v))} while keeping track of the index xu for each uNs(v) that corresponds to the maximal f^u(xu)ϕuv(qv(x)). Hence, we can construct h^v in time 𝒪(|A^+(v)|Δ+|Ns(v)|Δ). In total, including the construction of r, we thus take time at most 𝒪(Δ|A^|).

Proof of 2.

We proceed analogously to the proof of 1. It suffices to show how to obtain rs for each sink sS0.

We will demonstrate that for the simple tree-like rotor graph T, we can obtain bounds b1b2 in time 𝒪(|A|), which contain an s-directed compensated routing r which maximizes ϕs(r). Additionally, we show that the parameter Δ, defined as in 19, satisfies Δ𝒪(|A|2). We then plug these into 19, which allows us to construct the desired routing rs in time 𝒪(|A|3). Note that, since T is simple, we have |A^|=𝒪(|A|). The remainder of the proof is therefore devoted to finding the required vectors b1 and b2.

Let {t}=Ns(s) and let r denote the component-wise maximal routing in Ht(ht(0),0). We first construct, for each vV+(T), the affine approximations h¯v given in 15. To this end, define b1(s)=b2(s)=0. Now, for vV+(T) and w=Ns+(v), assume we have constructed b1(w)r(w)b2(w). Hence:

hv(ϕvw(b1(w)))hv(ϕvw(r(w)))hv(ϕvw(b2(w))).

Since r is maximal we have that ϕwv(r(v))=hv(ϕvw(r(w))). From r being s-directed it follows that

qv(hv(ϕvw(b1(w))))r(v)qv(hv(ϕvw(b2(w)))).

Hence, using h¯v with Cv=2|A(Tv)| denoting a bound on the error, we define:

b1(v)=qv(h¯v(ϕvw(b1(w)))Cv)r(v)qv(h¯v(ϕvw(b2(w)))+Cv)=b2(v).

Our next task, is to show that for each vV+(T), it holds that

|b1(v)b2(v)|4d+(v)|A|dist(s,v). (14)

We prove this relation by induction starting at t. The base case is trivial, as

|b1(t)b2(t)| =|qt(h¯t(0)Ct)qt(h¯t(0)+Ct)|4d+(t)|A|.

Assume that (14) holds for v; we now prove it for uNs(v). Since T is simple, we have that qu(x)qu(x)=d+(u)(xx) and

|ϕuv(x)ϕuv(x)| |xx|d+(v).

Furthermore, as h¯v is a contraction (see (9)), we obtain:

|b1(u)b2(u)| =d+(u)(|h¯v(ϕuv(b1(v)))h¯v(ϕuv(b2(v)))|+2Cu)
d+(u)(|ϕuv(b1(v))ϕuv(b2(v))|+2Cu)
d+(u)(|b1(v)b2(v)||d+(v)|+2Cu+1)
4d+(u)(dist(s,v)|A|+|A(Tu)|+1)4d+(u)dist(s,u)|A|.

By (14) it holds that for each vV+(T), |ϕwv(b1(v))ϕwv(b2(v))|=𝒪(|A|2), implying that the error Δ, defined as in 19, satisfies Δ𝒪(|A|2). This completes the proof.

5 Conclusion

Our main result is a quasi-polynomial time algorithm for Multi-Arrival on tree-like multigraphs. We established the polynomial-time solvability of Multi-Arrival on path-like multigraphs, and on tree-like multigraphs with bounded contracted height. Thereby, we extended the polynomial-time algorithm by Auger et al., which was restricted to path-like rotor graphs with certain uniform rotor order, to a much wider class of instances.

The notion of contracted height, as we introduce it in this paper, is related to several other classic notions of height on trees, such as topological height. Nonetheless, we have not found any direct reference of this concept in the literature. It may therefore be interesting to explore its relationship to those well-known concepts of height further.

The complexity of Arrival in general graphs remains widely open. As a next step, it could be valuable to improve the quasi-polynomial time algorithms for Multi-Arrival on tree-like rotor graphs to a polynomial-time algorithm.

References

  • [1] David Auger, Pierre Coucheney, and Loric Duhazé. Polynomial time algorithm for ARRIVAL on tree-like multigraphs. In Proc. MFCS 2022, volume 241 of Leibniz Int. Proc. Inform., pages Art. No. 12, 14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.MFCS.2022.12.
  • [2] David Auger, Pierre Coucheney, Loric Duhazé, and Kossi Roland Etse. Generalized ARRIVAL problem for rotor walks in path multigraphs. In Proc. Reachability problems 2023, volume 14235 of Lecture Notes Comput. Sci., pages 183–198. Springer, 2023. doi:10.1007/978-3-031-45286-4_14.
  • [3] Jérôme Dohrau, Bernd Gärtner, Manuel Kohler, Jiří Matoušek, and Emo Welzl. ARRIVAL: a zero-player graph game in 𝖭𝖯𝖼𝗈𝖭𝖯. In A journey through discrete mathematics, pages 367–374. Springer, Cham, 2017. doi:10.1007/978-3-319-44479-6_14.
  • [4] John Fearnley, Martin Gairing, Matthias Mnich, and Rahul Savani. Reachability switching games. Log. Methods Comput. Sci., 17(2):Paper No. 10, 29, 2021. doi:10.23638/LMCS-17(2:10)2021.
  • [5] Bernd Gärtner, Thomas Dueholm Hansen, Pavel Hubácek, Karel Král, Hagar Mosaad, and Veronika Slívová. ARRIVAL: Next Stop in CLS. In Proc. ICALP 2018, volume 107 of Leibniz Int. Proc. Informatics, pages 60:1–60:13, 2018. doi:10.4230/LIPICS.ICALP.2018.60.
  • [6] Bernd Gärtner, Sebastian Haslebacher, and Hung P. Hoang. A subexponential algorithm for ARRIVAL. In Proc. ICALP 2021, volume 198 of Leibniz Int. Proc. Inform., pages 69:1–69:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ICALP.2021.69.
  • [7] Giuliano Pezzolo Giacaglia, Lionel Levine, James Propp, and Linda Zayas-Palmer. Local-to-global principles for the hitting sequence of a rotor walk. Electron. J. Combin., 19(1):Paper 5, 23, 2012. doi:10.37236/12.
  • [8] Phuc Hung Hoang. On Two Combinatorial Reconfiguration Problems: Reachability and Hamiltonicity. PhD thesis, ETH Zurich, 2022.
  • [9] Alexander E. Holroyd, Lionel Levine, Karola Mészáros, Yuval Peres, James Propp, and David B. Wilson. Chip-firing and rotor-routing on directed graphs. In In and out of equilibrium. 2, volume 60 of Progr. Probab., pages 331–364. Birkhäuser, Basel, 2008. doi:10.1007/978-3-7643-8786-0_17.
  • [10] Vyatcheslav B. Priezzhev, Deepak Dhar, Abhishek Dhar, and Supriya Krishnamurthy. Eulerian walkers as a model of self-organized criticality. Phys. Rev. Lett., 77(25):5079, 1996. doi:10.1103/PhysRevLett.77.5079.
  • [11] Lilla Tóthmérész. Rotor-routing reachability is easy, chip-firing reachability is hard. European J. Combin., 101:Paper No. 103466, 9, 2022. doi:10.1016/j.ejc.2021.103466.