A Quasi-Polynomial Time Algorithm for Multi-Arrival on Tree-Like Multigraphs
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 ; 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 TractabilityCopyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Theory of computation Randomness, geometry and discrete structuresFunding:
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ắngSeries and Publisher:

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 [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 by any number of arcs and any number of arcs , where and 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 of a simple rooted tree as the minimum height over all trees obtained from by contracting, for each node of , one of the arcs to its children. We now state our main results informally, where is the maximum possible over all choices of a root, where is the simple undirected underlying tree of .
Theorem 1 (Informal).
Multi-Arrival can be solved on tree-like rotor graph with arcs in time , where hides factors polynomial in the input. In particular, Multi-Arrival can be solved in polynomial time if .
We further show that if (which includes path-like rotor graphs), Multi-Arrival can be solved in time polynomial in , where 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 . That is, Multi-Arrival can be solved in time on tree-like rotor graphs of size . 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” , which measures the node deletion distance of the rotor graph to an acyclic digraph, Gärtner et al. [6] provided an -algorithm with run time .
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 with finite node set and arc set . An arc with tail and head is said to be from to . 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 , we denote by the set of arcs whose tail is and define . Let be the set of out-neighbours of and let be the set of in-neighbours of . By we denote the number of arcs from to . For a directed multigraph , let be the set of nodes with positive out-degree and let be the set of the sinks, that is, the nodes with out-degree 0. The underlying undirected simple graph of is the undirected simple graph with node set which contains an edge whenever there is an arc between and . We call tree-like (path-like) if 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 be a directed multigraph. For any node , a rotor order at is a cyclic permutation of . A rotor order for is a permutation of such that, for each , the restriction of to is a rotor order at . The directed multigraph combined with a rotor order is a rotor graph.
A rotor configuration of is a mapping from such that for each . Let be the set of rotor configurations of . A particle configuration of is a mapping from . Let be the set of particle configurations of .
For node , denote by the function which is at , and elsewhere. For example, means and for .
A rotor-particle configuration of is a pair of a rotor configuration and a particle configuration . Routing at on is the operation of moving a particle from along the arc and then changing the rotor configuration at to . The resulting rotor-particle configuration is then formally defined as
and . Routing decomposes into two operators. First, a move at , denoted by . Second, a turn at , denoted by , where for each and for each . We see that
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 and ; the inverse of is defined as
Given distinct nodes , observe that and commute, as the move and turn of depend on and affect only at component . 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 is a mapping from . We denote by the operator resulting from composing all for in arbitrary order. Similarly, we let denote the composition of all for . Extending the move operator is more involved. We do so by interpreting to be the displacement of particles when routing. As such, for , we define and . Then we define . It is now straightforward to see that
For the sake of convenience, we extend these notations to sinks. Each routing is identified with the mapping in such that for all . Furthermore, routing sinks has no effect, i.e., and .
2.3 Arrival and Rotor-Routing Games
In the Arrival game we start with a rotor-particle configuration where 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 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 is legal on if . A routing sequence is legal on if each routing of is legal on where . Finally, a non-negative routing is legal if there is a corresponding legal routing sequence , which means that for each .
Such a legal routing is maximal on if is non-positive on . That is, a routing is maximal if no node can be legally routed after routing .
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 with , there is a unique maximal legal routing on .
It follows that the maximal legal routing is an upper bound (component-wise) of all legal routings. We denote by 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 , compute for .
The following generalization of Arrival was introduced by Hoang [8]:
Problem (Legal Multi-Arrival [8]).
Given with , compute for .
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 for all . Such a rotor-particle configuration is called fully routed. We denote by the set of fully routed rotor-particle configurations obtainable by routing .
Proposition 4 ([1, Theorem 2]).
For all there is a routing such that with one has on all . Furthermore, for any two such routings and , resulting in and , respectively, we have that .
This leads to the following problem, which is our main concern in this paper:
Problem (Multi-Arrival [1]).
Given , compute for arbitrary .
For , after applying the maximal legal routing it holds that for . It follows that and that Legal Multi-Arrival reduces to Multi-Arrival. Conversely, finding full routings reduces to finding a maximal legal routing in and in , where is obtained from by reversing the rotor order i.e. using .
Proposition 5.
Let and such that . Then given the maximal legal routing on in and the maximal legal routing on in , we have that is a full routing on in .
Proof.
We define by . The function transforms rotor-particle configurations such that negative move-then-turn routings in correspond to positive turn-then-move routings in . We let and denote the move and displacement operators in .
Claim.
It holds that .
Proof.
We show that , from which the claim follows. Recall that . First, for the turn operator we see that . Then, for the move operator we derive that
Consequently, it holds that
This proves the claim. We next find that . Since is maximal on with in , it follows that is on . Similarly, as is maximal on , with in we have that is also on . It follows that 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 , assuming some to be fixed.
3.1 Destination Graphs
Given a rotor configuration and routing , the destination graph is a subgraph of whose nodes consist of all those that either sent or received particles during routing . For each node , that is , the destination graph contains only the outgoing arc that the last particle traversing was sent over when routing . That is, is the subgraph of induced by the arcs , where is the rotor configuration after routing . Each node has one outgoing arc in and every other node in has no outgoing arcs.
Furthermore, the destination graph 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.
3.2 Compensated Routings
Any legal routing must satisfy the condition that, for each node , the number of particles sent out of during the routing process must not exceed the number of particles initially present at and those sent into 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 is compensated at with respect to if
where denotes the number of particles sent to when routing particles out of .
A routing is called compensated if it is compensated at each . Equivalently, is compensated if and only if . 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 and rotor-particle configuration with . Let . The routing is legal on if and only if, is compensated on and each cycle in contains some node such that . In particular, if is acyclic, legality and compensation are equivalent.
Proof.
Suppose that is legal. So it is compensated. If contains a cycle , then given some corresponding legal routing sequence, there is some node that is routed last in . Let denote the successor of in . Then a particle is sent from to , but is not routed afterwards. Hence, as the particle distribution is non-negative during the legal routing sequence, we have that .
Conversely, assume that is compensated on and each cycle in contains some node such that . Let be a legal routing with obtained by routing until for each node either or .
Since is legal, it suffices to show that . Assume, for the sake of contradiction, that . We then consider the set of nodes that still need to be routed (if any).
It follows that for each . In the remaining routing , each particle sent out from a node in must be replaced afterward; otherwise, we would end up with a node such that , which is impossible since is compensated. This implies that during the routing , no particle from is sent outside of ; otherwise, that particle could not be replaced in as no node outside of is routed in . It follows that in the subgraph of induced by , the nodes have out-degree of 1, implying that contains a cycle. This contradicts the assumption that every cycle in contains a node such that .
3.3 -Directed Routings
The compensated routings are those for which each satisfies an inequality that relates to for all in-neighbours of . 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 , 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 . 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 .
Given a rotor configuration and sink , we say that node is -directed in a routing if and there is a path in from to . Routing is -directed if every is -directed in . Our aim, to be established in Theorem 9, is to decompose into a set of -directed routings for each sink . The idea is that each such need only match the number of particles sent into by . We denote by the number of particles sent to when routing .
Lemma 7.
Let be a rotor-particle configuration with and be a legal routing. Then, for each sink , there is an -directed legal routing such that and .
Proof.
We construct a series of legal routings with denoting the -directed nodes of the respective routing, such that each equals on and each has the same in-flow in as in .
Suppose that we constructed and that there is flow from to when routing . Consider an arbitrary legal routing sequence corresponding to with and .
Let be maximal such that and . That is, the routing step is the last time a particle is sent into from . Now, we remove each routing step with . Let be the corresponding routing vector. Then must be legal since for we have and has in the -th routing step the same number of particles as before the removals. By construction satisfies the required conditions and as sent its last particle towards in .
Otherwise, suppose there is no flow from to when routing . We set to be on , and zero on . Then is an -directed legal routing with . Since we have . This procedure is finite as it terminates once and each step increases the size of .
Next, we show that in the maximal legal routing the -directed nodes already route only as much as is required to achieve the flow towards . We therefore derive that a corresponding -directed routing matches on those nodes.
Lemma 8.
Let be a rotor-particle configuration with . If is an -directed legal routing such that , then for each -directed node of .
Proof.
Suppose is -directed in such that . We denote by the successor on the path from to in . As is maximal and is legal, it must be that . Since the last particle sent from in is towards we have . In particular, . If , then as routes for each received particle and receives less particles on , it follows that . Now, is also -directed in with . We repeat the argument along the path from to in until we end up with . Then contradicts the assumption that .
Theorem 9.
Let be a rotor-particle configuration with . For each , let be an optimal solution of the following optimization problem:
maximize |
Then is given by for all .
Proof.
Let . As is -directed, it has an acyclic destination graph. Since it is also compensated, it follows from 6 that is legal. In particular, as is maximal we have and . Now, as shown by 7 there is some legal -directed routing such that . It follows from maximizing that .
For each the claim holds as for each . Let . Then as is acyclic and each node in has out-degree at most one, there is some that the unique path starting at ends on. If , then . But then receives a particle in but is not routed, which contradicts the maximality of . Thus, and is -directed in . Consequently, due to 8 we find that .
4 Algorithms for Multi-Arrival on Tree-Like Rotor Graphs
In the following, let be a tree-like rotor graph. Henceforth assume, without loss of generality, that the induced subgraph of on is strongly connected, and each sink to have exactly one in-neighbour. Indeed, if 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 , each has a unique successor on its paths to in . We denote by the successor on the paths from to in , and by the set of predecessors whose successor is on their respective paths towards . When a routing is -directed, its destination graph can be seen to be an -rooted directed subtree of .
Throughout this section, we fix a sink and a rotor-particle configuration with . For the sake of convenience, we leave this dependence on and implicit in the introduced notation. Further, we simplify the notation and let denote , and similarly extend this simplification to and .
We proceed to show that -directed routings can be characterized by their restrictions to nested rotor subgraphs. For any node with let be the rotor graph obtained from as follows. We remove the arcs between and , and then, remove the nodes not reachable from . Finally, we add again with only the original arcs from to (but not the reverse arcs). In , node is thus a sink. See Figure 2 for an example.
For any integers , we denote by the set of -directed compensated routings in on rotor-particle configuration such that .
Furthermore, we define .
Note that for a given , from 7 it follows that is the flow from to that is legally achievable in when dispersing an additional particles on .
Lemma 10.
Given and such that , we have for any . In particular, if and only if .
Proof.
Let and let be some legal routing such that in , where . Note that such a exists as we may truncate a legal routing sequence of up to the -th routing towards . Then, using 7 with on , we obtain an -directed compensated routing with . Hence, . As the zero routing is always compensated and -directed, the second claim follows as well.
Let and . We define the function as the minimum number of routings required to send particles from to . Formally, . It is also convenient to specify the notation which is the number of particles that sends to as a by-product.
The following crucial lemma will enable us to recursively construct routings in .
Lemma 11.
Let and . Consider a routing on and for let denote the restriction of on . Then, , and for ,
if and only if
(1) |
and there exist non-negative integers , for , such that
(2) | ||||
(3) |
In particular, if and only if
(4) |
Proof.
Let . Then , as and is -directed. It follows that is not in , and since every path from to in is through , it must be that .
Now, for the case , assume that and therefore . Thus, the last routing of at should be towards , which is equivalent to (1).
Set . Then we see that (2) is a rearrangement of being compensated at . For (3), consider . As the nodes of are -directed in and their paths towards in go through , it follows that is -directed in . It remains to show that being compensated in is equivalent to being compensated in . With , note that needs to be compensated on in . Clearly, the only non-trivial case is the compensation at , which follows from the in-flow being equal in both cases:
Consequently, .
Now suppose that is a routing that satisfies (1)–(3). Notably, as we have . As mentioned above, (1) is equivalent to being -directed in . From (3) it follows that , which together with (2) implies that is compensated at . Also, is -directed and compensated on , because by (3), each restriction is -directed and compensated.
The following properties of the functions are needed in our argument.
Lemma 12.
For any , define for all . Then the following properties hold for the functions and :
-
(i)
,
-
(ii)
, for ,
-
(iii)
, for .
Proof.
(i) We know that equals the largest with , which, by 11, is the largest satisfying (4), that is, the largest such that .
(ii) Let denote the maximal legal routing in on . Then, by definition of and 7, we see that . Thus, with , we see that if that additional particle ends up in and otherwise.
(iii) Being integer-valued function, it suffices to show that is strictly increasing.
Observe that is the number of arcs until and including the next that has head . But is then the number of those arcs that have head . Consequently, , where by (ii), the right-hand side is as large as . It then follows that .
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 and . We could take in a sequence of nodes and let each index identify an outgoing arc with head . Arc with label is taken to be before in with index wrapping around to . We can improve upon this by merging consecutive duplicates by associating with each the number of times that entry is repeated. We denote by the reduced arc set of the rotor graph obtained by removing arcs in that vanish due to this encoding of consecutive parallel arcs. This encoding is called succinct [4, 11]. Hence, is polynomial in the input size, while may be exponential in the input size.
For a rooted simple tree , its contracted height is defined as the minimum height over all trees which are obtained from by contracting, for each node of , one of the arcs to its children.
Lemma 13.
For any rooted simple tree , it holds that , where is the number of nodes of with at least two children.
Proof.
We proceed by induction on the height of ; 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 is zero, the assertion holds trivially. Thus, assume now that the height of is at least . Let be the connected components of after removing its root, with . If there is a unique such , then since the edge to that subtree can be contracted, and we are thus done by the induction hypothesis.
Otherwise, there is another such , say . We may assume that . Then
Let be the tree rooted at . We define
By 13, , where denotes the number of nodes in that have more than two neighbors.
Notice that , where is the upper bound on the contracted heights of 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 with arc set in time where . In particular, Multi-Arrival can be solved in time polynomial in if . Furthermore, if (which includes path-like rotor graphs as then ), Multi-Arrival can be solved in time polynomial in .
Furthermore, in the procedure, a full routing for Multi-Arrival is obtained.
When is fixed, we have that for some computable function , and thus the run time of our algorithm would be at most . Therefore, we conclude:
Corollary 14.
Multi-Arrival on tree-like rotor graphs is fixed-parameter tractable with parameter .
One of the main ingredients of our approach is an affine approximation for the function , which is provided by the following lemma:
Lemma 15.
For any , there is an affine function such that
(5) |
A set of these functions can be determined in time .
Proof.
We first observe that for , it holds that
These properties suggest the following approximations:
Let with . Then
(6) | ||||
(7) |
Similarly, (6) and (7) hold for as then and lie within an interval of size , and and lie within an interval of size . Now, define inductively
Claim.
For any with , it holds that
(8) | ||||
(9) |
Proof.
We first observe that for each node , (9) follows from (8). Let . So . Then . As is strictly increasing, we must have .
Now, we establish (8) by induction. We have that
If , then . Next, assume that and (8) holds for all . Then by the above argument, (9) also holds for , implying that
It follows that , as required.
Claim 16.
If for all , , then for all .
Proof.
Suppose that . Then and . Thus, , that is . That means . On the other hand, . So , and thus which implies that .
Now, we complete the proof by induction. If , then is an affine function that satisfies (5), because of (6) and 16.
So assume that and the assertion holds for for every . The property of being an affine function follows directly from the definition of .
For an integer , we have:
(10) |
The induction hypothesis implies that
Combining (7) and (9), we see that
Thus, the right-hand side of (10) is at most . It follows that for every , it holds that
Then applying 16, for every we have that
The inductive constructing of for each can be done in time . Therefore, the set can be constructed in time .
In following, we let where is the rooted simple tree rooted at .
Lemma 17.
Let be the unique in-neighbour of . Then the maximum over every -directed compensated routing can be obtained in time .
Proof.
We first determine the set of affine functions in time using 15. For given , let be the time complexity required to query , that is to return a routing from the set or to confirm that it is empty.
We will prove that
(11) |
Once we established this, for a given we can determine if there is some , that is an -directed compensated routing such that , within time .
Moreover, by employing an exponential search using the approximation , we only need to check the non-emptiness of for distinct values of . This process enables us to compute
in time , which completes the proof.
So it remains to prove (11). To do so, we first establish the following claim.
Claim 18.
For and any choice of , it holds that
Proof.
Given , our objective is to either find a routing or confirm that the set is empty. We may assume as otherwise we simply return .
For each , let .
First, we determine . Then, for each , we determine .
Using the induced bound of that approximation on , we perform an exponential search to obtain and .
To perform this, due to 15, we require at most queries to . As for , we set
If , we let and be the zero routing which belongs to . Otherwise, we let and query . If no such exists, we terminate and assert .
Finally, we return as given by and whose restrictions to is given by for every .
Now, the procedure takes the claimed time if and can be calculated in time . This can be done using a straightforward procedure employing two Euclidean divisions and two iterations through the encoding .
As for correctness, if we failed to obtain , we must have . Hence:
which by 11 implies . Otherwise, satisfies every condition of 11 and thus .
To complete the proof of (11) we now proceed by induction. If , we have which satisfies the hypothesis as . Otherwise, by the induction hypothesis, for each , we have that .
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 , an -directed compensated routing which maximizes . This by Theorem 9 allows us to obtain the maximal legal routing given by for .
Hence, for each we need only show that can be obtained in time, which is established by 17.
If for some constant , we have , then it is seen that , and thus the run time of the algorithm is .
Further, if for some constant , we have , by the fact that , the run time is .
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 with arc set , sink set and without parallel arcs in time . Furthermore, in the procedure, a full routing is obtained.
We now employ a dynamic program that given bounds that contain some unknown -directed compensated routing , constructs lower bounds of . Then, as is contained in those bounds, these lower bounds allow us to obtain an -directed compensated routing in time proportional to the size of these bounds.
Lemma 19.
Let be a tree-like rotor graph, and let be two vectors such that there exists an -directed compensated routing with . Then we can construct an -directed compensated routing such that in time where .
Proof.
First, we inductively construct for each a strictly increasing function where and a function . The function will serve as a lower bound for .
Suppose has been constructed for each . We define and as follows:
It is clear that is strictly increasing and is an increasing function by arguments analogous to that of 12. Similarly, as by induction we have for all , it follows that .
Next, we will show that
(12) |
To this end, suppose that, by induction, for . Then as is a compensated routing, we have:
Since the function is increasing and , we have . Also, , as is -directed.
Next, we inductively construct an -directed routing and begin by setting .
We assume by induction that is defined and satisfies .
Now, if and , we set . From 11 we see that . Otherwise, we define
(13) |
From and (12) it follows that .
Taking from the left and right sides of this inequality, we get .
Since , it remains to show that is -directed and compensated. We accomplish this by showing that the conditions of 11 are satisfied by . Let and assume for each we have where denotes the restriction of to . We will show that belongs to . By construction, if and only if . The case is trivial as then we see that . Otherwise, we need to show that (1)–(3) of 11 hold. By the assumption, (3) is already satisfied.
Hence, the procedure returns the desired -directed compensated routing .
Note that is increasing. Hence, it is straightforward to see that we can construct by iterating through while keeping track of the index for each that corresponds to the maximal . Hence, we can construct in time . In total, including the construction of , we thus take time at most .
Proof of 2.
We proceed analogously to the proof of 1. It suffices to show how to obtain for each sink .
We will demonstrate that for the simple tree-like rotor graph , we can obtain bounds in time , which contain an -directed compensated routing which maximizes . Additionally, we show that the parameter , defined as in 19, satisfies . We then plug these into 19, which allows us to construct the desired routing in time . Note that, since is simple, we have . The remainder of the proof is therefore devoted to finding the required vectors and .
Let and let denote the component-wise maximal routing in . We first construct, for each , the affine approximations given in 15. To this end, define . Now, for and , assume we have constructed . Hence:
Since is maximal we have that . From being -directed it follows that
Hence, using with denoting a bound on the error, we define:
Our next task, is to show that for each , it holds that
(14) |
We prove this relation by induction starting at . The base case is trivial, as
Assume that (14) holds for ; we now prove it for . Since is simple, we have that and
Furthermore, as is a contraction (see (9)), we obtain:
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.