Motions of a connected subgraph representing a swarm of robots inside a graph of work stations

Imagine that a swarm of robots is given, these robots must communicate with each other, and they can do so if certain conditions are met. We say that the swarm is connected if there is at least one way to send a message between each pair of robots. A robot can move from a work station to another only if the connectivity of the swarm is preserved in order to perform some tasks. We model the problem via graph theory, we study connected subgraphs and how to motion them inside a connected graph preserving the connectivity. We determine completely the group of movements.


Introduction
In this work we model the following problem. Imagine that a swarm of robots is given, these robots must communicate with each other, and they can do so if certain conditions are met. We say that the swarm is connected if there is at least one way to send a message between each pair of robots. A message between robots can be sent if either there is a direct communication between them or if there are intermediate robots which can send the message. Some work stations in a region are also given, the number of work stations are at least the number of robots. A robot can move from one of these work stations to another only if the connectivity of the swarm is preserved. The swarm of robots has one fixed initial position and, in order to perform some tasks, the robots move from one station to another as needed, always maintaining the swarm connected. After a while the swarm of robots returns to its initial position. In order to achieve this goal it is not necessary that each robot returns to its initial position, we only care about the position of the whole swarm, so as long as each one of the initial positions are occupied and the swarm is connected, we say that it has returned to its original position. Our intent in this paper is to study the different permutations that might appear once the swarm returns to its original position. In order to do so, we must also study the possible moves that the swarm can make, all moves must meet three conditions: 1. The connectivity of the swarm must be kept, 2. Only one robot is in each workstation at each time, 3. To avoid crashes, two robots are not allowed to swap positions.
We model the problem using a graph as follows. The work stations are represented by the vertices of a graph, two vertices are connected by an edge if their corresponding workstations allow a couple of robots, one in each workstation, to communicate with each other. Notice that the initial positions of the robots induce a unique subgraph of our workstations graph and that every time a robot moves this induced subgraph might change. Since we are interested only in the moves that assure the connectivity of the swarm, both the workstations graph and every induced subgraph must be connected. Under this model the subgraph of robots moves through the workstations graph and we ask how the permutations of the initial subgraph look like.
Related problems have been studied from a different perspective in the area of motion planning under the names of "robots swarm" and "pebble motion", for example in [3] and [4].
A classical related problem is the well-known "15-puzzle" which was generalized to graphs by Wilson [10], who proved that for any nonseparable graph, except for one, its associate group is the symmetric group unless the graph is bipartite, for which it is the alternating group.
While Wilson considered just an empty workstation, the problem was generalized to k empty workstations in [7] where it was also given a polynomial time algorithm that decides reachability of a target configuration. In [2] optimal algorithms for specific graphs were explored. Colored versions were studied in [5] and [6]. In [8] it was proven that finding a shortest solution for the extended puzzle is NP-hard and therefore it is computationally intractable.
In the following section we define formally the problem. In Section 3, we prove that the set of possible movements is a group, and we define what we call the Wilson group (in honor of Richard M. Wilson). In Section 4, we characterize such group when there are no "empty workstations". Finally, in Section 5, we characterize the group in the case when there is at least one "empty workstation".

Definitions and basic results
In this section we introduce definitions, terminology and basic results. All the graphs considered in the paper are finite and simple. Definition 1. Let G be a graph, R a k-set and f t a function such that and we say f t is an R-configuration over G if f t | Vt is bijective, where t ∈ ∆ and ∆ is a set of natural numbers.
The elements of R are called labels and we use R = [k] or a subset of [k] for simplicity, where [k] := {1, 2, . . . , k}. If a vertex v is such that f t (v) = ∅, we say that it is empty. The set of empty vertices is denoted by V ∅ . Figure 1 shows an example of a connected [k]-configuration f t over a graph G, for k = 5. We write Suppose that f t and f s are two connected [k]-configurations over a graph G.
Definition 3. Let f t and f s be two connected [k]-configurations over a graph G. If V t = V s we say f t is similar to f s and we denote it by f t f s .
It is not hard to see that the relation is an equivalence relation over the set of [k]configurations over G. The equivalence class of f t is denoted by [f t ]. Therefore, a class [f t ] is an unlabeled connected [k]-configuration f t .

Motioning connected subgraphs
In this subsection, we establish the rules to motion connected induced subgraphs preserving the connectivity.
We recall that a cycle of a graph is denoted by However, to keep our arguments as simple as possible, we choose to use v 1 = v r and then v 1 is adjacent to v r .
Now, we associate a permutation to an r-cycle or path. In this paper, the product of permutations means composition of functions on the left. For a detailed introduction on permutations we refer to the book of Rotman [9].
Definition 6. Let f t be a connected [k]-configuration over a graph G and let p be an r-cycle or a path p = (v 1 , v 2 , . . . , v r ). An elementary p-movement of V t is a permutation σ p such that Hence, we can define configurations f s arising from a given configuration f t .
Definition 7. Let f t be a connected [k]-configuration over a graph G and σ p an elementary p-movement of V t . The [k]-configuration f t+1 = f t •σ p over G is an elementary configuration movement arising from f t .
Note that if G is a tree such that V (G) = V t for a connected [k]-configuration then there is no elementary p-movements. And in general, it is possible that G[V t+1 ] is a disconnected subgraph.    Consider the set of empty vertices V ∅ . For any permutation σ in the symmetric group S V ∅ of V ∅ we have that f t • σ = f t , therefore, σ is a valid elementary p-movement. Given a connected [k]-configuration f t , we denote the set of valid elementary p-movements of V t as By Proposition 9 we have the following.
Next, we define a valid sequence of connected configurations.
Taking a 3-path p 1 = (v 3 , v 4 , v 5 ) and the permutation σ Definition 13. Let f 0 and f t be two connected In a natural way we have the following two propositions.
To end this section, we have the following theorem about the classes [f t ].
has order largest than T . Since the graph is finite, the result follows.

The Wilson group
Given two connected [k]-configurations over a graph G, by Theorem 16 and Corollary 17, we know that we can move the first one to the second one via connected subgraphs. In this section, we prove a similar result but considering the case when the labels are sorted.
Firstly, we define the following interesting set Φ regarding to valid movements.
Clearly, the symmetric group The following proposition establishes that the Wilson set is independent to the labels of f t .
Next, we prove that the Wilson set is, in fact, a group.
Now, we verify the converse, let f t = f s • φ be for some φ ∈ Φ[f t ], then φ is a valid movement from V s to V t and σ is a valid movement from V 0 to V s , therefore σ • φ is a valid movement from V 0 to V t and the theorem follows.
The existence of the valid movement σ is guaranteed by Theorem 16 and Corollary 17, hence, in order to verify the existences of a valid f 0 f t -sequence, we only need to find some

Some Wilson groups
Therefore, we need to know the structure of the Wilson group of a given subgraph. We begin with some particular configurations.
Theorem 23. Let f t be a connected [n]-configuration over a graph G of order n.
Proof. First, since V ∅ is empty, then only the elementary valid movements are the cycles, for instance σ = (v 1 v 2 . . . v n ) and then Φ[f t ] = σ which is Z n . Second, there is no elementary valid movements different to the identity permutation, and the result follows.
Theorem 24. Let f t be a connected [k]-configuration over a graph G of order n > k. If G is a cycle or a path then Proof. The valid movements are given by k-paths only into the two opposite directions, namely σ p 1 and σ p 2 , see Figure 4. Since the labels of V t are invariant under the valid G is an n-path Figure 4: The two possible direction of a k-path, for k < n, into a n-cycle or a n-path.

Saturated configurations
In this section, we study the configurations without empty vertices, that is, each vertex has weight 1.
Definition 25. Let G be a connected graph of order n. A connected [n]-configuration is called saturated.
Theorem 23 states a result concerning to saturated configurations, namely, when G is a cycle or a tree. Note that, the elementary movements are only given by cycles, that is, a vertex can be moved if it is in a cycle.
Corollary 26. Let f t be a connected [n]-configuration over a unicyclic connected graph G of order n for which its cycle has order k. Then Φ[f t ] is the cyclic group Z k .
The following definitions are about edge-connectivity and edge-blocks.
Definition 27. A non-empty bridgeless connected subgraph B of G is called an edge-block of G if B is maximal.

Note that the Wilson group induces a (left) group action ϕ into the set of vertices
, therefore we have Theorem 28.
Theorem 28. If f t is a saturated configuration over G and v ∈ V (B) with B an edge-block of G, then the orbit Proof. First, note that an edge-block could be separable if it contains cut-vertices. Now, let u be a vertex of V (B). By Menger's Theorem, there exist two edge disjoint uv-paths such that they internally share only cut-vertices v 1 , . . . , v r−1 . The union of this two paths is a union of cycles p 1 , . . . p r where v = v 0 is a vertex of p 1 and u = v r is a vertex of p r . The permutation σ = σ ar pr • · · · • σ a 1 In consequence, the Wilson group of a saturated configuration of a graph in the product of the Wilson groups arising from each edge-block. Hence, we analyze the edge-blocks to know which is the Wilson group of a saturated graph.
We recall that S X denotes the symmetric group over X, while A X denotes the alternating group over X.  Since for the permutations σ C and σ C is turning clockwise while for the permutations σ C is turning counterclockwise, we have that We call σ to this transposition. Now, we show (vu) ∈ Φ[f t ] for any v, u ∈ V (G) with v = u. Without lossing of generality, v = w 1 and u ∈ V (C ). For some i, A permutation is an element of A X if and only if it is a product of an even number of transpositions in X. Since every 3-cycle (ijk) is the product of two transpositions (ij)(ik) and the product of two transpositions (ij)(kl) is the product of two 3-cycles (ikj)(kjl) then the alternating group is generated by 3-cycles.
Lemma 30. Let G = (V, E) be a graph which is the union of two cycles C and C with exactly a cut vertex. And let f t be a saturated configuration of G.
Second, let C = (w 1 v 1 . . . v r ) be and C = (w 1 u 1 . . . u s ), see Figure 6. Therefore We call σ to this 3-cycle. Then, we divide the proof into three cases: 1. If v = v 1 and u ∈ V (C ), for some j, σ = σ j C is such that σ(u) = w 1 then ( 2. If v = v 1 and u ∈ V (C), for some j, σ = σ j C is such that σ(u) = w 1 then ( 3. Similar to (1.), but v ∈ V (C) \ {v 1 }. If u = u 1 then the case is analogous to (1.) by symmetry. If u = u 1 then σ = σ −1 C • σ j • σ C , for σ j (v) = v 1 and some j, gets a configuration similar to the case (1.) Now, if C and C are odd cycles, then σ C and σ C are even permutations, therefore On the other hand, if C or C is even, then it is an odd permutations, therefore In order to prove our main results, we define the following concept.
Definition 31. An edge-block of a graph is called weak if it is a cycle or if every two cycles sharing vertices have exactly a vertex in common.  Figure 7: The edge-blocks B 1 and B 2 are weak but B 3 is not.
Lemma 32. Let B be an edge-block that is not a cycle and f t be a saturated configuration. If B is weak such that every cycle is odd, then Proof. Let B be as defined above and suppose that it is weak and every cycle is odd. We prove that (uvw) ∈ Φ[f t ] for any u, v, w ∈ V (B) as follows: since u, v, w are in the same orbit and there are (at least) two cycles C and C with exactly a cut vertex in common. We can send there all of them via a permutation σ, by Lemma 30, we can get this 3-cycle there and then, via σ −1 we get the desire 3-cycle. Because the parity of the odd cycles, On the other hand, if B contains an even cycle Φ[f t ] = S V or if it is not weak, we can assume that C and C have in common a path with more than a vertex therefore any transposition (uv) can be done via a permutation σ sending u and v to the cycles C and C , by Lemma 29, we can get this 2-cycle there and finally, via σ −1 we get the desire transposition getting that Φ[f t ] = S V . Now, we can describe the Wilson group of a saturated configuration.
Theorem 33. Let f t be a saturated configuration of a graph G, then where Γ i is a cyclic group, an alternating group or a symmetric group.
Proof. Let B i be the set of edge-blocks G, for i ∈ {1, . . . , r}. By Theorem 28, the non-trivial orbits are V (B i ) for each i ∈ {1, . . . , r}. Hence, for the set V (B i ), its Wilson group is cyclic, by Theorem 23, or it is an alternating group or a symmetric group by Lemma 32 and the result follows.

No-saturated configurations
In this section, we only study the Wilson group for no-saturated configurations. The main difference between saturated and no-saturated configurations is the existence of valid movements given by paths. Theorem 24 is an example of this fact.
To begin with, we analyze the behavior of the bipartite complete graph K 1,3 , also called as the 3-star graph, which is a relevant graph in no-saturated configurations.
Let G be a graph containing at least a 3-star subgraph and f t a connected configuration over G such that where v is a vertex of degree at least 3 and v 1 , u 1 and w 1 are adjacent to v. Figure 8 shows the sequence of movements to generate the transposition (vv 1 ) supposing some empty vertices. Before to verify the details to produce the movements to generate such transposition, we Lemma 36. Let f t be a connected [k]-configuration over a graph G and (w, v, u) a path such that u, v ∈ V t . If b v (w) > 0 then there exists a cycle or a path p containing (w, v, u) for which σ p is in Γ[f t ].
Proof. Since b v (w) > 0, there exists an empty vertex in the direction of w with respect to v. Therefore, there is an r-path p 1 = (w r , . . . , w 1 = w, v) with w r an empty vertex.
On one hand, if u = w i for some i ∈ [r − 1] then for the cycle p = ( On the other hand, if u = w i for all i ∈ [r − 1] and let T a spanning tree of G[V t ] containing the path p = (w r−1 , . . . , w 1 = w, v, u = u 0 , . . . , u s ) where u s is a leaf of T , and then σ p is in Γ[f t ], see Figure 10.
Proof. Let f t be a connected [k]-configuration over G. Since vv 1 is a bridge, we can assume that the corresponding paths of the permutations are sharing the leaf v r .
If u s = w m then the vertex v is in a cycle (v, u 1 , . . . , u i = w j , w 1 ), see Figure 11. Let σ 2 and σ 3 be the permutations σ 2 = (vu 1 . . . u i . . . w 1 ) and σ 3 = (v r . . . v 1 vw 1 . . . u i . . . u s ).  Therefore In order to analyze the Wilson group and use the previous ideas, we give the following definition.
Definition 38. Let x, y ∈ V t be and v a vertex of degree 3 or more. We say that v is an exchange-vertex for the pair {x, y} if there is a vertex v 1 adjacent to v and a valid permutation σ such that σ(v) = x, σ(v 1 ) = y and f t • σ satisfy the hypothesis of Theorem 37.
Moreover, if x ∼ y we say v is an exchange-vertex for the edge xy.
Lemma 39. If there exists an exchange-vertex for the pair {x, y} then (xy) ∈ Φ[f t ].
Theorem 40. If (u 1 , u 2 , . . . , u m ) is a path such that for each edge there is an exchange vertex, then Now, we analyze the edge-blocks of a graph G when it is not a cycle and f t is a nosaturated configuration.
Lemma 41. If B is an edge-block of G[V t ] for which every vertex has weight 1, then for each edge xy ∈ E(B) there exists an exchange-vertex for xy.
Proof. Since f t is a no-saturated configuration there is a vertex v 1 ∈ V (B) adjacent to some vertex v ∈ V (B) such that b v (v 1 ) > 0. Since B is a bridgeless subgraph, let u, w adjacent to v in B living in a cycle there. Note that v has degree at least 3.
Let xy be an edge of B. Without loss of generality, we can assume that (xu)•(yv) ∈ Φ[f y ] by Theorem 23 and Lemma 32. Let f s = f t • (xu) • (yv).
Note that the path (v 1 , v, u) satisfies the hypothesis of Lemma 36. Hence, there exists a cycle or a path p containing (v 1 , v, u) for which σ p ∈ Γ[f s ] with σ p (v 1 ) = v and σ p (v) = u. Moreover, if vv 1 is not a bridge, we can delete edges adjacent to v but not in The previous result can be established for vertex-blocks instead of edge-blocks because if B is a vertex-block of G[V t ] for which every vertex has weight 1, consider an edge vv 1 ∈ E(B). If vv 1 is not a bridge, vv 1 is in an edge-block and there exists an exchange-vertex for vv 1 . And if vv 1 is a bridge following the hypothesis of Theorem 37, then v its an exchange-vertex for vv 1 .
Theorem 42. Let xy be an edge for which its vertices have weight 1. If xy is not a bridge an G is not a cycle, then there exists an exchange-vertex for xy.
Proof. If xy belongs to an edge-block of G[V t ], by Lemma 41, the result is done. Now assume to the contrary. By hypothesis, xy belongs to a cycle C = (u 1 = x, u 2 = y, . . . , u s ) of G and u i has degree at least 3 for some i ∈ [s].
Via a valid movement σ, we can move the edge xy to the edge u i u i−1 , see Figure 14, and by Theorem 37, u i = σ(y) (or u i = σ(x)) is an exchange-vertex of σ(x)σ(y), then u i is an exchange-vertex of xy.  Before to analyzing the bridges of a graph with no-saturated configurations, consider the set of vertices C v for which v is an exchange-vertex, i.e., In order to see the relation between C v and the orbits of Φ[f t ] we have the following definition and results.
Corollary 45. Let B be an edge-block of G. If v is an exchange-vertex for some edge of B, then v is an exchange-vertex for each edge of B.
Since the set of bridges and edge-blocks induces a partition into the set of edges, we can define the following graph.
Definition 46. Given a graph G, the graph G B obtained from G by contracting each edgeblock into a vertex is called the edge-block graph.
Proposition 47. The edge-block graph G B of a connected graph G is a tree.
We denote a vertex of G B as [v] where v is any vertex of the corresponding edge-block of G, i.e., [v] is the equivalence class of vertices of an edge-block of G. If the equivalence class is trivial, we use v instead of [v].
For example, if G is a unicyclic graph, the cycle of G is denoted by [v] in G B but the remainder vertices are denoted u instead of [u] in the edge-block graph of G. For example, if f t is a saturated connected configuration over G, the weighted function of G B is zero for any of its vertices.
Let [u][v] be an edge of G B and u 1 v 1 the bridge such that u 1 ∈ [u] and v 1 ∈ [v]. Recall that the set of empty vertices en the direction of u 1 with respect to v 1 is b v 1 (u 1 ). We denote by β [v] Figure 15 (left).
Si bv 1 (v 2 ) = 0 is not a trivial equivalence class, then v 1 is an exchange-vertex of u 1 v 1 .
If b v 1 (v 2 ) = 0, then C is saturated and there is a valid movement σ 1 such that such that σ 2 (v 1 ) = u 1 and σ 2 (v 1 ) and the result follows. See Figure 15 (right).
Theorem 51. Let P = (v 1 , v 2 , . . . , v r+1 ) be a path of G such that each edge is a bridge and v 1 , v r+1 ∈ V t . If [v 1 ] is a no trivial equivalence class of G B and r ≤ b v 2 (v 1 ), then v 1 is an exchange-vertex of each edge of P .
Proof. To begin with, observe that each vertex of P has weight 1. For each i ∈ [r] we have b v i+1 (v i ) ≥ r, then there exists a valid movement σ i such that Figure 16. G: Corollary 52. Let P = (v 1 , v 2 , . . . , v r+1 ) be a path of G such that each edge is a bridge Proof. By Theorem 51, v 1 is an exchange-vertex of each edge of P . By Theorem 40, the result follows.
Next, we analyze the case where [v] is a trivial equivalence class, but degree at least 3.
Theorem 53. Let P = (v 1 , v 2 , . . . , v r ) be a path of G such that each edge is a bridge and v 1 , v r ∈ V t . If [v 1 ] is a trivial equivalence class of G B , degree at least 3 and r ≤ b v 2 (v 1 ), then v 1 is an exchange-vertex of each edge of {v 2 , v 3 , . . . , v r }.
Proof. Observe that the condition r ≤ b v 2 (v 1 ) implies at least two empty vertices in the direction of v 1 with respect to v 2 . Via a valid movement, we can obtain at least two empty vertices in at least one branches at v 1 . Now, we use exactly the same argument as in Theorem 51 and the result follows, see Figure 17. In the previous proof we remark if f t has at least two branches at v 1 with at least an empty vertex each, then v 1 is an exchange vertex of (v 1 v 2 ). See the vertices [v 17 ] and [v 7 ] of the example of Figure 18.
Corollary 54. Let P = (v 1 , v 2 , . . . , v r ) be a path of G such that each edge is a bridge and v 1 , v r ∈ V t . If [v 1 ] is a trivial equivalence class of G B , degree at least 3 and Theorem 55. Let [v] be a trivial equivalence class of G B with degree at least 3. If x ∈ V t (and y ∈ V t ) such that it is in direction of v 1 with respect to v (and v 2 with respect to v, respectively) and at distance to v less than r.
Proof. By Corollary 54, we have (vv 1 ), If vv 1 and vv 2 satisfy the hypothesis of Theorem 37, the result follows. Without loss of generality, vv 2 doesn't have such hypothesis. Since r ≥ 2, there exists a vertex v 3 adjacent Through Theorems 51 and 53 we can determine the vertices of C v where [v] has degree at least 3 in G B . We need the following useful definition related to C v .
Definition 56. Let [v] be a vertex of degree at least 3 of G B . We denote by C [v] to the subset of vertices of G having the following property: for every pair of their vertices (x, y), the transposition (xy) is in Φ[f t ] according to Corollaries 52 and 54 and Theorems 43 and 55.  We define the relation R over V ≥3 as follows: vRv if and only if there exists a sequence {u = u 1 , u 2 , . . . , u r+1 = v} of vertices of V ≥3 such that for each i ∈ [r], C [u i ] ∩ C u i+1 = ∅. Clearly, R is a equivalence relation. We denote by R(v) the equivalence class of v.
Theorem 57. If v ∈ V ≥3 , then Proof. Let u ∈ R(v) be and a sequence {u = u 1 , u 2 , . . . , u r+1 = v} of vertices of V ≥3 such that for each i ∈ [r], Now, suppose that v 0 ∈ C v and v 0 ∈ C [u] for all u ∈ R(v). Let u 1 ∈ R(u) such that [u 1 ] is the closest vertex to [v 0 ] in G B . Then C [u 1 ] ∩ C [v 0 ] = ∅. Since v 0 ∈ C v there exist valid movements σ and σ 1 such that σ(v) = v 0 and σ 1 (u 1 ) = v 0 but it is not possible according to Theorems 51 and 53 because v 0 would have to be a vertex of C u 1 .
Finally, note that if x, y ∈ C v , then (xy)Φ[f t ] and then S Cv ⊂ Φ[f t ]. In consequence, we can prove the main theorem for no-saturated configurations.
Theorem 58. Let R(v 1 ), R(v 2 ), . . . , R(v m ) be the equivalence classes of R. Then Let σ ∈ Φ[f t ] be such that σ / ∈ m i=1 S Cv i , i.e., σ(x) = y for x ∈ C v i and y ∈ C v j with i = j.
The vertices v i and v j are exchange-vertices for some edges xw and yz, respectively, then (xw), (yz) ∈ Φ[f t ].
On the other hand, if σ(w) = z then σ ∈ Φ[f t ] and v i is an exchange-vertex for xw in f t • σ, then v i is an exchange-vertex for yz in f t . Hence, y ∈ C v i . A contradiction since Now, suppose σ(w) = z, then σ −1 (z) = w. And we have σ(x) = y then σ −1 (z) = x and σ(w) = y. Therefore, σ 1 : = σ • (xw) • σ −1 • (yz) • σ • (xw) ∈ Φ[f t ] and satisfies that σ 1 (x) = y and σ 1 (y) = z. As before, this is a contradiction. Then σ ∈ m i=1 S Cv i and To end this section, Figure 18 shows a graph with a no-saturated configuration f t for which its Wilson group is S Cv 3 × S Cv 7 × S Cv 11 × S Cv 17 × S V ∅ .