Synchronized Traveling Salesman Problem

We consider a variation of the well-known traveling salesman problem in which there are multiple agents who all have to tour the whole set of nodes of the same graph, while obeying node- and edge-capacity constraints require that agents must not"crash". We consider the simplest model in which the input is an undirected graph with all capacities equal to one. A solution to the synchronized traveling salesman problem is called an"agency". Our model puts the synchronized traveling salesman problem in a similar relation with the traveling salesman problem as the so-called evacuation problem, or the well-known dynamic flow (flow-over-time) problem is in relation with the minimum cost flow problem. We measure the strength of an agency in terms of number of agents which should be as large as possible, and the time horizon which should be as small as possible. Beside some elementary discussion of the notions introduced, we establish several upper and lower bounds for the strength of an agency under the assumption that the input graph is a tree, or a 3-connected 3-regular graph.


Introduction
The purpose of this paper is to explore and study some new problems that are defined from a natural merger of the traveling salesman problem, and the dynamic flow problem.
Our first starting point is the traveling salesman problem, which is one of the best known problems from combinatorial optimization, and there has been a wide range of variations to the original traveling salesman problem that have been investigated over the decades. In this paper we would consider a variation of the traveling salesman problem that has multiple salesman touring the same network. Of course earlier research has been done with multiple salesmen, including the so-called multiple traveling salesmen problem (Laporte, Norbert, [9]), vehicle routing problems (Christofides, Mingozzi, Toth, [5]), price-collecting traveling salesman problem (Balas, [2]), and others. The problem variation considered in this paper will be completely different from those.
The second starting point is the dynamic flow problem first introduced by Ford, Fulkerson [6], also known as flows over time, which came as a variation to the flow problem in which we consider a flow as a dynamic notion that develops over time. See Skutella, [10] and Kotnyek [8] for a broad survey about this topic. The idea is to replace the static notion of a flow by a dynamic notion in which flow is described as the time-dependent motion of particles, either discrete, or continuous. The evacuation problem, quickest transshipment problem (see Hoppe, Tardos [7]), fastest flow problem, dynamic transportation [3], and many others are special cases or variations of the dynamic flow problem.
In this paper we would develop a notion of dynamic (or synchronized) traveling salesmen, that correspond to the original traveling salesman problem in a similar way as dynamic flows correspond to flows. The idea, basically, is to find a way to put several salesmen, "agents", in a network so that they all need to perform a traveling salesman tour, and the lot of them must obey network capacities. In this setting we may consider two different kind of objectives: try to add as many agents to the networks as possible, or try to find tours for the agents to finish in as short time as possible. Of course the tours of the agents must be coordinated between each other in order to let them obey the network capacities, thus our wording to call this problem the synchronized traveling salesmen problem. One case of this problem has been considered in [1]. A more precise definition follows below.

Problem Setting
Let G = (V, E) be an undirected graph with n = |V |. A sequence v(0), v(1), v (2), · · · , v(T ) of nodes v(t) ∈ V is called a walk (with parking) if for all t = 0, 1, · · · , T − 1 we have either v(t) = v(t + 1) or v(t)v(t + 1) ∈ E. A sequence v(0), v(1), v (2), · · · , v(T ) of nodes v(t) ∈ V is called a walk (without parking) if for all t = 0, 1, · · · , T − 1 we have v(t)v(t + 1) ∈ E. Most of the time in this paper, we will consider walks with parking, so even if not expressly written, a walk means a walk with parking. For a walk, T is called the time horizon.
A sequence v(0), v(1), v (2), · · · , v(T ) of nodes v(t) ∈ V is called a traveling salesman tour (with/ without parking), if it is a walk (with/without parking) in the graph such that every node appears at least once, and the tour returns to its initial node, that is, v(0) = v(T ). A traveling salesman tour with parking is called a tour, for short. As a tour returns to its initial node, we may consider a tour by time units modulo T (which is similar to picturing a tour as if it were to repeat all over after the time horizon).
Of course in the usual setting of the traveling salesman problem, there is no need for parking, because it is just a waste of time or cost; here in our setting, however, parking may be needed to avoid two salesmen of crashing into each other: one of them would wait until the other one passes a node or an edge, and move on afterwards. Vaguely speaking: the point is that we introduce a setting in which there are multiple salesmen touring the same graph at the same time so that they are not allowed to crash into each other. In this setting it makes a lot of sense to allow parking, and this is what we do in this paper.
In the synchronized traveling salesman problem, we consider an "agency" of a number of salesmen that each one of them has to do a tour with the same time horizon, though they need to start from different initial nodes, and must not "crash" into each other. Essentially there is a unit capacity for each node or each edge. More precisely, we define an agency as follows.
Definition 1. Let k, T ∈ Z + be positive integers. k denotes the number of salesmen, or agents, and T denotes the joint time horizon. Let a i (t) ∈ V be the node where agent i is supposed to be at time t, where i = 1, 2, · · · , k, and t = 0, 1, · · · , T . This is called an agency with time horizon T and k agents if for any fixed i, v i (t) is a tour (with parking). In practical terms, each i denotes an agent that moves along the unit-length edges of the graph, so that every agent makes a traveling salesman tour of time horizon T . Definition 2. If i and j are agents from the same agency, i = j, then we say that these agents i and j crash in a node v at time t if v = a i (t) = a j (t). In practical terms, this may be understood as the two agents walking around the graph, and at time t they both occupy in the same node v. Definition 3. If i and j are agents from the same agency, i = j, then we say that these agents i and j crash in an edge uv ∈ E at time t if v = a i (t) = a j (t + 1), u = a i (t + 1) = a j (t) or v = a i (t + 1) = a j (t), u = a i (t) = a j (t + 1). In practical terms, this may be understood as the two agents walking around the graph, thinking of edges as links of a unit length, and at time t they both use the same edge, entering from opposite ends, and thus meeting in (the middle of ) the edge. Definition 4. An agency is called a feasible agency if there is no crash between any pair of agents in neither an edge nor a node. In practical terms, this may be understood as a set of agents moving along the unit-length edges of the graph so that they avoid crashing into each other, but each of them manages to visit every node at least once, before finally arriving at their respective nodes of origin.
Given the definition of a feasible agency, we would like to set up a measure the "strength" of an agency. There are two options: we may try to maximize the number of agents, or we may try to minimize the time horizon. Anyway, for any G, k, T there is always the question: is there a feasible agency in graph G with k agents and time horizon T ? Problem 1. Given G, k, T , decide whether there is a feasible agency in G of k agents under time horizon T ?
In Problem 1 if the answer is "yes" for a given G, k, T , then -because parking is allowed -the answer would be "yes" for any other instance G, k , T when k ≤ k and T ≥ T . For a given k we may want to determine the smallest T that admits a feasible agency, and for a given T we may want to determine the largest k that admits a feasible agency. Though these problems are hard to solve in general, we will look for some other ways how to measure the strength of an agency, thus we introduce the following parameters.
Notice that for any connected graph there is an agency of k ≥ 1 and T ≤ 2n − 2. Also notice that k ≤ n, and T ≥ n, for any agency. A more interesting connection is with the Hamiltonian cycle problem.
Claim 1. For a given graph there is an agency with α = 1 if and only if there is a Hamiltonian cycle.
Proof of Claim 1. α = 1 implies α 2 = 1, and thus T = n. The walk a 1 (0), a 1 (0), · · · , a 1 (T ) is a Hamiltonian cycle. On the other hand, if there is a Hamiltonian cycle v(i), then for the first agent we can set up a tour a 1 (t) := v(i), and all the other agents may follow this lead at a delay of 1, 2, · · · n − 1 time units. This makes a feasible agency.
Claim 2. For any graph and any agency we have T /k ≤ α ≤ T /k.
The main objective of this paper is to provide some nontrivial lower and upper bounds on the strength of a feasible agency.

Trees
Theorem 1. If G is a tree, then for any feasible agency we have T /k ≥ 4. Claim 3. In any tree G with n ≥ 3 there is an edge uv such that in G − uv the component that contains v is a star that is centered at v.
(A star is a K 1,m , where m ≥ 1, and the node that corresponds to the color class of a single node is called its center. For ease of discussion, K 2 is called a star, and either of its nodes may be called its center.) Proof of Claim 3. To prove this claim, consider a longest path P in the tree, and let u, v, z be the last three nodes in this path. Edge uv is a node as required: the component of G − uv containing v does have another node, namely z, connected to v. If some other node z in this component were to be not connected to v, then a path P ending in z would be longer than P , a contradiction. This proves the claim.
Proof of Theorem 1. We consider an edge uv obtained from Claim 3, and let us denote the star by v, z 1 , z 2 , · · · , z m , with v its center. Let U := {u, v, z 1 , · · · , z m }. We distinguish three cases, depending on the value of m: m = 1, m = 2, and m ≥ 3.
In case m ≥ 3, the degree of node deg G (v) = m + 1 ≥ 4. Every agent needs to return at least deg G (v) number of times to v, and because they must not crash, k deg G (v) ≥ T . This implies T /k ≥ m + 1 ≥ 4. In case m = 1, we are mainly concerned with node z 1 . Every agent must visit z 1 at least once. Now two different agents visiting node z 1 , say at times t, t , respectively, that is, a i (t) = a j (t ) = z 1 . We claim that |t − t | ≥ 5. To prove this, it is quite easy to see that if |t − t | ≤ 4, then agents i, j would crash at a time between t, t in a node or edge in G[{u, v, z 1 }], a contradiction. Thus |t − t | ≥ 5, and actually, this still is true if we were to repeat the walks of the agents after time T , modulo T . This implies that T ≥ 5k.
In case m = 2 we need to be somewhat more careful to prove T /k ≥ 4. Every agent must visit z 1 and z 2 at least once, and for each i we consider the time interval(s) that agent i spends in the nodes U := {u, v, z 1 , z 2 } while visiting at least one of the nodes z 1 or z 2 . This means that for every agent i we pick one or two intervals so that they include one visit to v 1 and one visit to v 2 . For an agent i there will be one or two corresponding intervals, say I = [t 1 , t 2 ]. We consider time intervals modulo T , or "cyclically". Of course I will start and end in a time unit when agent i is occupying node u. Actually, we may assume that these time units satisfy the following: • a i (t 1 ) = a i (t 2 ) = u, and By removing parking in u from the beginning and end of the time interval (t 1 , t 2 ), we may also assume that • a i (t 1 + 1) = a i (t 1 − 1) = v Definition 6. An interval that satisfies these 3 properties for agent i is called a U -interval for agent i.
Basically, a U -interval is the time interval that corresponds to a segment of that walk of agent i that looks like u, v, · · · , z 1 , · · · , v, u (or u, v, · · · , z 2 , · · · , v, u) such that this segment of the walk stays within node subset U . The definition requires that during this time interval agent i starts with u, v, ends with v, u, and it touches z 1 or z 2 at least once, while staying within U . Of course there may be time intervals when an agent visits u, or even v, but without touching z 1 , z 2 -we just don!t call such intervals U -intervals.
Every agent i must visit z 1 and z 2 at least once, and thus we can determine 1 or 2 U -intervals for agent i such that • if there is one U -interval for agent i, than both z 1 and z 2 are visited by agent i during this U -interval I, or • if there are two U -intervals for agent i, than z 1 is visited by agent i during only one of these Uintervals, and z 2 is visited by agent i during only the other U -interval. The two U -intervals for agent i are disjoint.
Let I i denote the set of U -intervals for agent i, and let let I := i I i denote the set of all U -intervals for all agents. The most important property of U -intervals is that no 3 of them overlap at the same time unit, or, in other words, I is a 2-packing.
Claim 4. For any 0 ≤ t ≤ T , there are at most two intervals of I that contain t, that is, |{I : I ∈ I, t ∈ I}| ≤ 2.
To prove this, suppose there are three different agents for which the corresponding intervals contain t. This means that when the last of these agents enters U := {u, v, z 1 , z 2 }, the two others are already in U . Say the last to enter U is agent i, and the other two agents are i , i . Say t 1 is the time when i enters U . Agent i at time t 1 + 1 moves to v, which implies that agent i , i occupy nodes z 1 , z 2 . By our assumption about these time intervals, at some time agent i while staying inside U , will to move to z 1 or z 2 -but the way is blocked by agents i , i . A crash would be inevitable, and this contradiction proves the Claim.
The size of a time interval I is measured by how many time units it has, that is, |I ∩ Z|. For short we abbreviate this as |I| := |I ∩ Z|. We claim that for any agent i, if there is one U -interval for agent i, To prove this, not that the shortest walks to visit z 1 and satisfy the properties required for a U -interval is u, v, z 1 , v, u, which requires 5 time units. And the shortest walks to visit z 1 and z 2 and satisfy the properties required for a U -interval is u, v, z 1 , v, z 2 , v, u, which requires 7 time units. This proves Claim 5.
By Claim 4 the set of intervals is a 2-packing, and this 2T ≥ I∈I |I|. By Claim 5 we get that I∈I |I| ≥ 7k. This implies that T /k ≥ 3.5. But our goal is to improve this bound to 4 from 3.5, so we need to look at these intervals more carefully. We have to look carefully especially at agents i for which there is only one interval, and that interval contains 7 time units.
The idea is to count tokens associated with time units. For every time unit 0 ≤ t ≤ T − 1 we create 2 tokens, this is 2T tokens in total. We would • award one of these tokens to an agent i such that t ∈ I i Because of Claim 4, we are not running out of tokens. By Claim 5, each agent has received at least 7 tokens, proving that 2T ≥ 7k. This comes just short of proving T /k ≥ 4, so we need to be a bit more careful with the assignment of tokens. To improve on this bound, we adjust the placement of tokens as follows: • If only one token is taken from time unit t by agent i, but the second token is up for grabs, then we award the second token to agent i, too. We do this for all time units t like this.
• If I ∈ I i , J ∈ I j , such that I ⊆ J and |I| = 7, then agent j gives one of its tokens to agent i. We do this between all pairs I, J like this.
Claim 6. All agents have at least 8 tokens.
To prove this claim, we first show the following property of the intervals. Essentially, this claims that any U -interval I of 7 time units either has a time unit which overlaps with no other U -interval of any other agent, or there a U -interval of another agent contains I as a subset.
Claim 7. If I i = {I} with |I| = 7, then exactly one of the following assertions must hold: 1. There is a time unit t ∈ I − J∈I−I J.
2. There is another interval J ∈ I − I such that I ⊆ J.
In other words, Claim 7 states that for every agent with a single visit to U that takes the minimum 7 time units, there is either a time unit when i is the only agent on a visit to U , or there must be another agent that will on a visit in U through these whole 7 time units. Actually, this means that this other agent needs an interval of length at least 9 to visit U : at least one time unit before and at least one after i's visit.

Proof of Claim 7.
The only way for this claim to be false would be if there were (at least) two other intervals, say J 1 and J 2 , which overlap with I, and so that there is no gap between J 1 , J 2 . Say J 1 corresponds to agent 1, J 2 corresponds to agent 2. Let us denote these U -intervals by I = [a, a + 6], J 1 = [b, c] and J 2 = [c + 1, d], and thus by our assumption a ≤ c < c + 1 ≤ a + 6. This makes the choice of c = a, a + 1, a + 2, a + 3, a + 4, a + 5 possible. Note that by the definition of a U -interval, agents 1 and 2 occupy nodes v, u, u, v for time units c − 1, c, c + 1, c + 2. Also by the definition of a U -interval, agent i occupies nodes u, v, , , , v, u at time units a, a + 1, a + 2, a + 3, a + 4, a + 5, a + 6. In all 6 possible cases of c, a crash happens in node u or v, or edge uv. This contradiction proves Claim 7.
Proof of Claim 6. An agent i with two U -intervals has at least 10 tokens, because in both of its U -intervals it received at least 5 tokens. Say one of its U -intervals is J. If the agent has had to give one of them for another agent by our rule above for some I ⊆ J, then it has kept the 6 other tokens from the time units in I. In this case agent i has at least 6 tokens from U -interval J. Otherwise agent i has at least 5 tokens from U -interval J. So this makes at least 10 tokens for this agent, considering both of its U -intervals.
Consider an agent i with one U -interval J such that |J| ≥ 8. If i has not had to give away any of its tokens then we are done. So now assume that agent i gave up one of its tokens because of another agent with a U -interval I ⊆ J, |I| = 7. In this case J must have at least one time unit before I, and at least one time unit after I, making it |J| ≥ 9. So agent i has received at least 9 tokens, and gave away only one of them. If J overlaps with multiple other U -intervals I, |I| = 7 in this way, then it will keep at least 6 tokens from each of them, this way agent i will have at least 6 + 6 = 12 tokens in the end. Considering all cases, agent i will have at least 8 tokens in the end.
Finally, consider an agent i with one U -interval I such that |I| = 7. This agent receives 7 tokens, and by Claim 7 it gets at least one more token for a time unit t where agent i is alone, or one token from another agent that is responsible for a U -interval J such that I ⊆ I. In both cases, this agent will hold at least 7 tokens in the end. This proves Claim 6.
Initially there are 2T tokens, and in the end we have accounted for at least 8k of them. This proves T /k ≥ 4, and thus Theorem 1.
By Claim 2 this also implies a lower bound on the strength of a feasible agency that we might get in a tree.
Corollary 1. If G is a tree, then for any agency we have α ≥ 2.
The following example shows that the bound T /k ≥ 4 given in Theorem 1 is tight, for certain trees. This example, though, is not tight for the bound given in Corollary 1 -we conjecture that that bound could be improved.

Example 1.
We define a tree G = (V, E) as follows. Consider a tree that has 3r + 2 (where r is some positive integer) nodes such that r of them have degree 4 and 2r + 2 of them have degree 1. Let F denote this set of nodes of degree 4, and let L denote this set of 2r + 2 nodes of degree 1. We add another 4r + 4 nodes so that every node in L gets 2 new neighbors: say if v ∈ L, then we add nodes v 1 and v 2 joined by an edge each to node v. Let us say M denotes the set of new nodes. This defines a tree G = (V, E) with V = F ∪ L ∪ M , having 7r + 6 nodes and 7r + 5 edges.
Consider an arbitrary closed walk of G that visits every nodes at least once, traverses every edge exactly twice, and returns to its origin in 14r + 10 time units. We modify this walk so that for every node v ∈ L, we add parking in v 1 for one time unit -a change that provides a walk that spends 2 time units in v 1 . This change creates a walk of time horizon T = (14r + 10) + (2r + 2) = 16r + 12. Let us denote this walk by v(t). For agent 1, we define a 1 (t) := w(t). For all other agetns, we define their walks a i by repeating w at a delay of 4(i − 1), repeated cyclically, that is a i (t) := w(t − 4(i − 1)) where time is measured modulo T , i.e. cyclically. This defines a set of T /4 = 4r + 3 agents.   It is relatively straightforward to verify that this agency is feasible, thus proving the following claim. (For nodes v ∈ L it can be verified manually that there is no crash in nodes or edges in To see that there is no crash on any other node we need to observe that for any edge e adjacent with at least one node in F , any agent spends 3 modulo 4 time units in either component of G − e -this implies that there is no crash in nodes of F or edges adjacent with a node in F .) Claim 8. There are trees of arbitrarily large size with a feasible agency such that T /k = 4 (with T = 16 7 n − 12 7 and k = 4 7 n − 3 7 ).
4 Trees with T = 2n − 2 When graph G is a tree, then any traveling salesman tour has time horizon at least 2m − 2, and thus of course, any agency has T ≥ 2n − 2. A tour with T = 2n − 2 is shortest possible, meaning that every edge of the tree is traversed only twice. In this section we restrict ourselves to shortest tours, that is T = 2n − 2, and our main result shows an upper bound on the number of agents in this case.
Theorem 2. If G is a tree, then for a feasible agency with T = 2n − 2 we have T /k ≥ 5.
Proof of Theorem 2.
Consider an edge uv as guaranteed by Claim 3, and let us denote the star by v, z 1 , z 2 , · · · , z m . We distinguish three cases, depending on the value of m, m = 1, m = 2, and m ≥ 3. Let U := {v, z 1 , z 2 , · · · , z m }.
(Let us remark that we consider the tours to be repeating cyclically modulo T , that is, we consider time units "modulo T = 2n − 2".) As in the proof of Theorem 1, every agent has a U -interval: for agent i let the shortest time interval that contains the times when agent i visits some z j , and starts and ends with a time unit when agent i is occupying node u is called a U -interval. Because the tour of any agent i is shortest, there is only one U -interval, and it has 2m + 3 time units. Say for agent i, the U -interval is equal to [t(i), t(i) + 2m + 2]. The walk of agent i during its U -interval looks like u, v, · · · , v, u, and contains all leaves z j in U .
Case m = 1. In this case it takes 2m + 3 = 5 time units for any agent i to complete its U -interval, which is [t(i), t(i) + 4]. The segment of its tour during this U -interval must be (u, v, z 1 , v, u). It is plain and easy to see that the U -intervals of no two agents may overlap, to avoid a crash in U . Thus at least 5 time units need to be spent before another agent may start its own U -interval. Now, for all time units between 1 and T we create one token. An agent takes all tokens corresponding to its U -interval. Because of Claim 9 5k tokens are distributed among the agents. This proves the desired bound T ≥ 5k in this case.
Case m = 3. In this case it takes 2m + 3 = 9 time units for agent i tocomplete its U -interval, which is [t(i), t(i) + 8]. The segment of its tour during this U -interval must be (u, v, z a , v, z b , v, z c , v, u), where a, b, c is a permutation of 1, 2, 3. To avoid a crash in node v, if two agents i, j have overlapping U -intervals, then the intersection of their U -interval must be even.
This claim implies that any given time unit t may be part of at most two U -intervals corresponding to any agents, or we may say the U -intervals are a 2-packing. (Considering just this, we obtain a bound of 9k ≤ 2T .) Actually, this also implies the following: Claim 11. For any agent i there is a time unit t in its U -interval (i.e. t ∈ [t(i), t(i) + 8]) such that t is not part of any other agent's U -interval.
Otherwise there would have to be two other agents, i and i such that [t(i), t(i) Because a U -interval has an odd number of time units, t(i ) and t(i ) need to have different parity. This contradicts Claim 10, and thus proves Claim 11.
We now use Claims 10 and 11 to finish the proof in this case. We create 2 tokens for every time unit 1 ≤ t ≤ T . The token corresponding to time unit t is awarded to agent i if t ∈ [t(i), t(i) + 8]. Because the U -intervals are a 2-packing, the tokens created are enough for this step. Now if for t only one token is taken, say by agent i, then the other token of t is also awarded to agent i. Because a U -interval has 9 time units, every agent will have 9 tokens are taken initially. Because of Claim 11, every agent will have at least one extra token, thus every agent will receive at least 10 tokens in total. This implies 2T ≥ 10k, proving the bound in this case.
Case m > 3 is solved the same way.
Case m = 2.In this case it takes 2m + 3 = 7 time units for agent i to complete its U -interval, which is [t(i), t(i) + 6]. The segment of its tour during this U -interval must be (u, v, z a , v, z b , v, u), where a, b is a permutation of 1, 2. To avoid a crash in node v, if two agents i, j have overlapping U -intervals, then the intersection of their U -interval must be even.
Moreover, to avoid a crash on edge uv, the overlap [t(i), t(i) + 6] ∩ [t(j), t(j) + 6] may not have cardinality 2. To avoid a crash in edges vz 1 , vz 2 , the overlap [t(i), t(i) + 6] ∩ [t(j), t(j) + 6] may not have cardinality 6. This implies that when there is an overlap, it must have cardinality exactly 4. Because the U -intervals are a 2-packing, this implies the following: Claim 13. For any agent i there is are 3 different time units t in its U -interval (i.e. t ∈ [t(i), t(i) + 8]) such that t is not part of any other agent's U -interval.
We now use Claims 12 and 13 to finish the proof in this case. We create 2 tokens for every time unit 1 ≤ t ≤ T . The token corresponding to time unit t is awarded to agent i if t ∈ [t(i), t(i) + 8]. Because the U -intervals are a 2-packing, the tokens created are enough for this step. Now if for t only one token is taken, say by agent i, then the other token of t is also awarded to agent i. Because a U -interval has 7 time units, every agent will have 7 tokens are taken initially. Because of Claim 11, every agent will have at least three extra token, thus every agent will receive at least 10 tokens in total. This implies 2T ≥ 10k, proving the bound in this case.
This completes the proof of Theorem 2.

Corollary 2.
If G is a tree, then for any agency with T = 2n − 2 we have α ≥ √ 5.
Example 2. The following example shows that the bound T /k ≥ 5 given in Theorem 2 is tight, for certain trees. This example, though, is not tight for the bound given in Corollary 2 -we conjecture that that bound could be improved. We construct a graph as shown in the figure by using a path of even length 2q, and adding a 1-path to its 2i + 1'th node, and adding a 2-path to its 2i + 2'th node. We add another 2-path to its first node, and a 3-star at its last node. This creates a graph of n = 5q + 6 nodes, and 5q + 5 edges. We create a walk of length 10q + 10 so that it first moves from left to right along the path, and also enters and leaves the 1-paths, then the walk enters and leaves the 3-star and all of its leaves, and then on the way back from right to left, the walk enters and leaves the 2-paths. This walk is indicated with the time units modulo 5 in the figure. Agent 1 would follow this tour, and agent i would follow this tour at a delay of 5(i − 1), cyclically. So that in time unit 1, the nodes indicated with "1" are occupied, and then after each step, the nodes indicated with "j" are occupied at time units congruent with j modulo 5. It is quite easy to verify that this creates a feasible agency without parking with time horizon T = 10q + 10 and number of agents k = 2q + 2 = T /5.

Theorem 3.
There are arbitrarily large trees for which there is a feasible agency without parking such that T = 2n − 2 and k = 1 5 T .
By Petersen's theorem we know that graph G contains a perfect matching, or equivalently, by taking the complement of a perfect matching, we also know that G contains a 2-factor (a 2-regular subgraph spanning all the nodes). There are ways of formulating a result that is stronger than Petersen's Theorem, and one of them is a recent result of Boyd, Iwata and Takazawa [4], claiming the existence of a 2-factor of a special property.   Theorem 5 (Boyd, Iwata, Takazawa [4]). If G = (V, E) is a 3-regular bridgeless graph, then there is a 2-factor covering every 3-cut and every 4-cut.
Proof of Theorem 4. Because of Theorem 5, there is a perfect matching M in G such that G − M = (V, E − M ) consists of cycles of length at least 5. Let C = {C 1 , C 2 , · · · , C s } denote the set of these cycles. Let N ⊆ M be a spanning tree in G/C. Thus F := N ∪ C is connected, and the only cycles in F are those of C. A tour a(t) of subgraph (V, F ) is obtained so that edges in N are traversed twice, and edges in C are traversed once (an arbitrary orientation of the cycles is chosen). The time horizon for this tour is T = |V − V (N )| + 4|N |, because it uses both nodes of an edge in N twice. We modify this tour a(t) just by adding parking times to nodes in V − V (N ). We will come up with a "parking vector" p : V − V (N ) → {1, 2, 3, 4}, and we interpret this with the intention of making an agent stay in a node v ∈ V − V (N ) for p(v) time units. This means the agent will park for p(v) − 1 time units. This defines a walk a p (t), which is obtained from a(t) by repeating v by p(v) copies. The time horizon of this walk will be Though this defines the tour of an agent for an arbitrary parking vector p, we need p to satisfy a certain property in order to define a feasible agency.
Definition 7. We say that the parking vector p is a 4-cyclic parking vector if for every C ∈ C, the sum is a multiple of 4.
The point of this definition is that a 4-cyclic parking vector may be used to define an agency. Let k := T /4, and for i = 1, 2, · · · , k, let a p i be the tour obtained from a p at a delay of 4(i − 1). Thus all agents will have a traveling salesman tour, and it is also quite straightforward that this defines a feasible agency.
Claim 14. For any 4-cyclic parking vector p, the set of tours a p i defined above is a feasible agency. To prove this claim, consider any edge uv ∈ N , which of course is a cut edge in (V, F ), say it separates the node set into parts u ∈ V u and v ∈ V v . Also let us suppose that t is the time unit when our agent comes to u to move to v in the following time unit, that is, a p (t) = u and a p (t + 1) = v. Because the number of time units our agent spends in V v − v is a multiple of 4, the time t when it returns to v (i.e. t > t, a p (t ) = v) is congruent with t + 2 modulo 4, that is, t ≡ t + 2 (mod 4). This implies that there is no crash in nodes u or v or on edge uv. Thus there is no crash on nodes or edges of matching N , but this also implies that there is no crash on nodes V − V (N ), because p(v) ≤ 4, and thus there is no time for agent a p i+1 to catch up with agent a p i . This proves Claim 14 Of course, p(v) := 4 for all v is a 4-cyclic parking vector, and thus it defines a feasible agency. Because of 5, |C| ≤ n/5 , and thus |N | ≤ n/5 − 1. Then for P we get a feasible agency with Next we construct a different agency a p from a different 4-cyclic parking vector p, trying to make p as small as possible. Claim 15. There is 4-cyclic parking vector p such that for agency a p the time horizon is equal to We will be able to prove a bound on T by partitioning C = C 0 ∪ C 1 ∪ C 2 ∪ C 3 such that By the definition of function r(·) we get that Consider the tree F := (V, N )/C that we get from edges in N by shrinking the cycles of C. All cycles in C 1 correspond to a node of F of degree at least 3. All leaves of F correspond to a cycle in C 3 . For any tree, the number of leaves is larger than the number of nodes of degree at least 3, which for tree F implies that |C 3 | ≥ |C 1 |. We put all this together in the following calculation: Thus we have constructed two different 4-cyclic parking vectors: p ≡ 4 with T ≥ 16 5 n, and this latter 4-cyclic parking vector p with T ≤ 2n. We can add any multiple of 4 time units to p while maintaining its 4-cyclic property, to obtain 4-cyclic parking vectors p with p ≤ p ≤ p, and thus we can find one that provides a feasible agency with T = 2n. This proves Theorem 4.

Optimization problems
Optimization problems with regard to k, T, α, α 1 , α 2 seem to be rather hard to solve exactly -recall that by Theorem 1, minimizing α is NP-hard. There are a few problems, though, that may be solved exactly, namely the following: Problem 2. For a given graph G = (V, E), find a feasible agency (with parking) of k = n = |V | agents and any time horizon T , or determine that there is no such agency.
Problem 3. For a given graph G = (V, E), find a feasible agency without parking of k = n = |V | agents and any time horizon T , or determine that there is no such agency.
We are going to prove that both of these problems can be solved in polynomial time.
Theorem 6. There is a polynomial time algorithm to solve Problem 2.
To prove this, note that all nodes are occupied by an agent at any time. Thus the step between time unit t and t + 1 corresponds with a set of node-disjoint cycles in G. Agents in any of these cycles will move to their respective neighbors, cyclically, while agents in a node not covered by any of these cycles are just parking there during this time unit. This suggests that the following condition may describe the existence of a a feasible agency k = n as required in Problem 2: Claim 16. There is a feasible agency with parking of k = n agents if and only if G is 2-edge-connected.
To show this claim, first note that if there is a cut edge e, then no agent may traverse e because e is not part of any cycle. Thus agent to one side of G − e will never be able to get to the other side. To prove the other way around, suppose G is 2-edge-connected. It is well-known that in this case, every edge is contained in a cycle. Now consider a spanning tree of G, and agent 1: we make agent 1 move along edges of the spanning tree, while completing each step of agent 1 using a cycle to define steps for all other agents. We repeat this for edges of the spanning tree until agent 1 has visited all the nodes. Then we repeat this for all other agents, one by one. In the end we need to repeat all these steps backwards to get all the agents back to their original position. The time horizon for this agency will be T ≤ 2n(2n − 3). This proves Theorem 6.
Conjecture 1. There is a polynomial time algorithm to solve Problem 3.
To prove this, note that all nodes are occupied by an agent at any time. Thus the step between time unit t and t + 1 corresponds with a 2-factor in G. Recall that a 2-factor is a spanning subgraph such that all nodes have degree exactly 2. A 2-factor consists of cycles, and all the nodes are covered by exactly one cycle. This suggests that the following condition may describe the existence of a a feasible agency k = n as required in Problem 3: Claim 17. There is a feasible agency without parking of k = n agents if and only if the edges of G which are contained in a 2-factor form a connected spanning subgraph.
To show this claim, first let us assume that there is a partition V = V 1 ∪ V 2 into two disjoint nonempty subsets such that edges between V 1 , V 2 are contained in no 2-factor. In this case, an agent that starts out in V 1 will never leave V 1 , which implies that there is no agency with the required properties. To prove the other way around, suppose that there is a spanning tree F ⊆ E such that all edges in F are contained in a 2-factor. Then it is straightforward to construct an agency: we make agent 1 move along edges of F , while completing each step of agent 1 using a 2-factor to define steps for all other agents. We repeat this for edges of the spanning tree until agent 1 has visited all the nodes. Then we repeat this for all other agents, one by one. After n(2n − 3) time units every agent has finished with visiting all the nodes. To obtain a feasible agency, we need to make sure all the agents will get back to their original position, all at the same time (this is required by the definition of a feasible agency). Let us say it took T 1 ≤ n(2n − 3) time units to finish the moves up to this point, and note that the current positions of the agents define a permutation of V , where node v ∈ V is mapped to node φ(v) ∈ V iff the agent starting in v has arrived at φ(v) after T 1 time units. We just have to repeat φ a few times until all agents get back to their original positions, that is, we are looking for a positive integer q such that φ q = id. Here the least common multiple of cycle length's of cycles in φ will do -the trivial upper bound on this is q ≤ n!. This proves Claim 17 with an exponential bound on the time horizon, T = qT 1 ≤ n(2n − 3)n!. Unfortunately this is not polynomial, and for this reason we fall short of proving Conjecture 1 -though we are able to determine a yes/no answer to the existence of such an agency. At this point it is unclear if the existence of an agency with very long, maybe exponential time horizon would actually also imply the existence of an agency with polynomial time horizon, thus leaving the proof of Conjecture 1 open.
We may consider the problem of maximizing the number of agents in a particular graph, without a limit on the time horizon. The problem becomes similar to a mechanical disentanglement puzzle. The following partial solution to this was found in informal discussions with László Végh, Amitabh Basu, and Daniel Dadush at an Oberwolfach workshop. c) Otherwise the optimum is k = n − 3.
(A tree with no node of degree 2 may not have 3 nodes.) Proof. Proof of part a) and b) is rather simple: If n = 2 then the tree is just a single edge. We can have a single agent moving between the two endpoints of this edge. There is no agency with 2 agents, because they would bump into each other along the edge or one of its endpoints. Thus the optimum is k = 1.
If G is a star with a center, and n − 1 leaves, then we can define an agency with n − 2 agents as follows. We initiate with the n − 2 agents in some of the leaves. Either one of the agents may then go to the vacant leaf, by passing through the center. By repeating this 2n − 2 times, every agent will have the chance to visit each of the leaves. This is an agency with n − 2 agents. There is no agency with n − 1 agents, because in with n − 1 agents, each agents would be restricted to just one of the leaves and the center -all other leaves are blocked by the other agents. Thus the optimum is k = n − 2.
In case c), graph G is a tree with no degree-2 nodes, such that there is an edge uv ∈ E such that both components of G − e have more than one node.
For contradiction, assume that there is an agency with k = n − 2 agents. We partition V into the following parts: We may assume that the agency is initiated so that u and v are the two empty nodes, and all other nodes are occupied by agents. (We may assume this, because any initial setup could be reached from this state, or actually, any other state.) Let us "color" the agent so that agents that are in V 1 in the initial setting are colored red, and agents that are in V 1 in the initial setting are colored blue. We claim that red and blue agents will not mix, and actually, at all times the agent distribution will always be like one of the following cases: (1) red agents occupy a subset of V 1 ∪ V 2 ∪ V 3 and blue agents occupy all of V 4 , or (2) red agents occupy a subset of V 1 ∪ V 2 and blue agents occupy a subset of V 3 ∪ V 4 , or (3) red agents occupy all of V 1 and blue agents occupy a subset of V 2 ∪ V 3 ∪ V 4 . This is easily seen because (a) V 2 and V 3 are sets of just a single node, and thus red and blue cannot pass by each other there, and furthermore, (b) when there is a blue agent in V 2 then all of V 1 is occupied, so this blue agent cannot enter V 1 to mix with the red agents there. Anyway, we conclude that red agents will not be able to visit nodes in the nonempty subset V 4 , and blue agents will not be able to enter nodes in the nonempty V 1 . Thus there is no agency of this size k = n − 2.
In case c), the tree must be of diameter at least 3, because it is not a star, and it also has no nodes of degree 2. To prove that there is a feasible agency with k = n − 3, it suffices to prove the following claim: Claim 18. Suppose there are n − 3 agents, agent i is currently in node u ∈ V , and there is an edge uv ∈ E. Then there is a sequence of agency moves such that agent i finds itself in node v after that sequence of moves.
Proof. Let us denote by V u and V v the nodeset of the two components of G − uv, so that If there is an unoccupied node in V v , then a sequence of moves along a path will result in v being unoccupied, and then agent i may move into node v as required. Thus we may assume that all nodes in V v are occupied. This also implies that all 3 unoccupied nodes must be in V u .
Because u is occupied (by agent i), the 3 unoccupied nodes are in V u − u. G[V u ] − u partitions into a family of components, say denoted by H 1 , H 2 , · · · , H p . Now we distinguish two cases here: either A) there are at least two distinct components say H 1 , H 2 that contain at least one unoccupied node, or B) all 3 unoccupied nodes are in the same component, say H 1 .
In case A), a simple sequence of moves will allow agent i to be pushed into component H 1 , because initially H 1 has contained an unoccupied node. Then u becomes unoccupied, and thus a simple sequence of moves will allow agent j to be pushed into H 2 , because initially H 1 has contained an unoccupied node. After this, both u and v become unoccupied, and we may allow both agents i and j to return to nodes u and v. We may, however, choose to first allow i to reach node v, and then allow j to return to node u. Anyway, the main observation is that after this sequence of moves, agent i gets to visit node v as we wanted to prove. An example of this action is show in in Figure 6.
In case B), we have the situation shown in Figure 7, where in component H 1 there is a node u 1 , a neighbor of u, and u 1 has two more neighbors, u 11 and u 12 . Agent i may go to u 12 in two steps, and then  stretch LL (G) := is a tree with no nodes of degree 2, then the optimum for Problem 4 is equal to: This theorem makes sense in the following special cases: When G is a star, then from stretch LY = 1 we get that k = n − 2, which is straightforward. When G is a path, then from stretch LL = n we get that k = 1, which is actually quite obvious for a path. When G is a tree that has no nodes of degree 2, and more than 2 nodes, then from stretch Y Y = 2 we get that k = n − 3, just like we expected from Theorem 7.
Proof of Theorem 8. We first prove that k is at most the value on the right hand side. cf To see that k ≤ n − stretch LL (G) + 1 is rather trivial: If G is not a path, then this value is infinity, and we are done. Otherwise, if G is a path, then the value become equal to 1, which is an obvious upper bound on the number of agents in a path.
To see that k ≤ n − stretch LY (G), assume that G is not a path (because in case of a path, this value would be infinity, and we are done.) Consider the path P where the maximum attains, let us say it is a path P that connects leaf l ∈ V with a node v ∈ V . Thus dist G (u, v) = stretch Y Y (G) − 1. All interior nodes of P have degree 2 in G. At a point in time, the leaf l will be occupied by an agent i, say. If for contradiction, k ≥ n − stretch LY (G) + 1, then it would be impossible for agent i to leave the path P , because as long as it stays in P , the part of P between l and the agent will be empty, and thus, when the agent gets to node v, all nodes of G outside of P will be occupied by the other agents. Thus agent i would not be able to visit nodes outside of P , and because P is not a path, this contradicts the definition of an agency.
The proof of k ≤ n − stretch Y Y (G) − 1 will be similar to the proof of the upper bound in case c) of Theorem 7. Consider the Y -Y path P that attains maximum length, connecting nodes u and v of degree at least 3. Let V v denote the set of node in V − v that are in the same component of G − u as v. Similarly, let V u denote the set of node in V − u that are in the same component of G − v as u. Note that dist G (u, v) = stretch Y Y (G) − 1. All interior nodes of P have degree 2 in G. Now assume for contradiction, that k = n − stretch Y Y (G). This means that in the graph we have |V (P )| number of unoccupied nodes. Note that for the purpose of this proof, we may assume that at t = 0 the unoccupied nodes are exactly those of V (P ) (because from that state we may reach any other initial state that was supposed to happen). So there are two groups of agents, those agents near to u occupying the nodes of V u (called u-agents), and those agents near v occupying nodes of V v (called v-agents). Then it is quite easy to see that u-agents and v-agents "do not mix", that is, whatever moves the agents are doing, one of the edges incident with a node in V (P ) cuts away all u-agents from all v-agents. Note that this property is preserved by induction, because a u-agent can only make moves in V − V v , and a v-agent can only make moves in V − V u . Because of this, when for example a u-agent gets as far as node v, then all nodes of V v will be occupied by v-agents, and thus this agent will have to stay in V − V v . This proves the inductive statement, and proves that there is no agency with k ≥ n − stretch Y Y (G).
To prove the equality in Theorem 8, we need to consider two cases, similar to those consider in the proof of Theorem 7. We define u, v, i, j, H u , H v just the same as in that proof. We have two cases: either A) there are at least two distinct components say H 1 , H 2 that contain at least one unoccupied node, or C) all unoccupied nodes are in the same component, say H 1 . Case A) can be handled just the same as in the proof of Theorem 7.
Case C) is very similar to Case B) of Theorem 7, but we will elaborate on that a bit. The main case is when there is at least one node of degree at least 3 in H 1 , and assume that the nearest to u is u 1 . The distance between u and u 1 is spanned by a path P of at most stretch Y Y (G) nodes. Thus there are at least stretch Y Y (G) + 1 unoccupied nodes in H 1 , and we may assume that they are arranged in the way of Figure 8. That is, all nodes of P − u are unoccupied, and u 1 has two more unoccupied neighbors, u 11 , 12 . Please refer to Figure 8 for the way how to make moves (similar to Case B) to exchange u and v, and thus prove that any agent can get anywhere. By applying this procedure repeatedly, we can construct an agency of k agents, where k is determined by the above formula.