Let be a finite and undirected graph with no multiple edge or loop. The vertex set of and the edge set of are denoted by and , respectively. Let be a set of pebbles with . An arrangement of on is defined as a function from to with for , where is a vertex occupied with the th pebble for and is a set of unoccupied vertices. A move is defined as shifting a pebble from a vertex to its unoccupied neighbour. The pebble motion problem on the pair is to decide whether a given arrangement of pebbles reachable from another by executing a sequence of moves. The well-known puzzle named “15-puzzle” due to Loyd  is a typical example of this problem where the graph is a -grid. The pebble motion problem is studied intensively [1, 2, 3, 4, 5, 8, 9, 11, 12, 13, 14], because of its considerable theoretical interest as well as its wide range of applications for computer science and robotics, such as management of indivisible packets of data moving on wide-area communication network and motion planning of independent robots. In 1974, Wilson solved completely the feasibility problem (i.e. the problem of determining whether all the configurations of the puzzle are rearrangeable from one another or not) for the case of on general graphs, and it followed by the result of Kornhauser, Miller and Spirakis (FOCS ’84) for the case of . In 2012, Fujita, Nakamigawa and Sakuma generalized the problem to the case of “colored pebbles”, where each pebble of is distinguished by its color. They also completely solved the feasibility problem for their model. Note that Papadimitriou, Raghavan, Sudan and Tamaki (FOCS ’94) also treat a special case of this model in. They consider the case that there exist two colors (“blue:robot” and “red:obstacle”) of pebbles and that the number of blue colored pebbles is one (i.e. with single robot), and they focus on the time complexity problems for optimal number of moves from a given arrangement to a goal arrangement on a tree.
In 2015, Fujita, Nakamigawa and Sakuma  generalized the pebble motion problem as follows: For two graphs and with a common number of vertices, let us consider a puzzle , where is a board graph and is a pebble graph. We call a bijection from to a configuration of , and we denote the set of all configurations of by . Given a configuration , if , we consider that the vertex of the board is occupied by the pebble . In , two pebbles and can be exchanged if and . Then the resultant configuration satisfies that , and for any . We call the operation a move. If a configuration is transformed into another configuration with a finite sequence of moves, we say that and are equivalent, denoted by . is called feasible if all the configurations of the puzzle are equivalent to each other. For two graphs and , let denote a Cartesian product of and , where and . Let be the path with vertices, and let be the star with pendant vertices.
We will show some more examples, from Example 2 to Example 5, which are considered as generalizations of Example 1. Suppose that both and are bipartite graphs with at least three vertices. It is not difficult to see that is not feasible because of the parity of configurations (cf. ).
Let be a graph such that and .
Let be a -connected non-bipartite graph with vertices. If is not a cycle or , then is feasible (cf. ).
For a positive integer , a path of a graph is called a -isthmus if (1) every edge of is a bridge of , (2) every vertex of is a cut-vertex of , and (3) for . For two graphs and , the join is defined as , . For a graph , let be the complement of .
Let . A pebble graph is considered as a set of labeled pebbles and unlabeled pebbles, in which two labeled pebbles cannot directly exchange their positions with each other. Let be a connected graph with vertices except a cycle. Then is feasible if and only if has no -isthmus (cf. ).
Let . Let be a graph with vertices. Then is feasible if and only if (1) is not a cycle, and (2) is not bipartite, and (3) has no -isthmus (cf. ).
Let and let . Let be a graph with vertices. Then is feasible if and only if (1) is not a cycle, and (2) has no -isthmus (cf. ).
In , the above mentioned graph puzzle was formally introduced and some more necessary/sufficient conditions of the feasibility of the puzzle was studied.
This model has again a wide range of real world applications, especially for robot motion planning problems and facility relocation problems. Here we will quote two examples from the paper.
Application 1 Let be a simple graph whose vertex set is the set of workplaces for robots. Each of the workplaces has a unique electrical outlet and a single robot is working there. Two workplaces and in are adjacent with an edge of if there exists a unique passageway from to . Each of the passageway is so narrow that at most two robots can pass at the same time. Moreover, there exists a pair of robots such that they have no common method of taking mutual communication and hence the two robots may collide with each other on such a narrow passageway. Let be a simple graph whose vertex set is the set of robots working in the workplaces and two robots in are adjacent if the robots can take mutual communication to avoid their collision. In this case, the rearrangements of the robots on the workplaces can be described only by the pebble exchange model .
Application 2 Let be a simple graph whose vertex set is the set of chemical storerooms. In each chemical storeroom, we can store only one type of chemical. Two chemical storerooms and in are adjacent with an edge of if there exists a unique passageway from to . Again, each of the passageway is so narrow that at most two trucks of chemicals can pass at the same time. There exist several dangerous pairs of chemicals such that, for each of the pairs, a near miss of the two chemicals can cause serious chemical reaction with the possibility of explosion. Let be a simple graph whose vertex set is the set of chemicals stored in the chemical storerooms and two chemicals of are adjacent if the pair is safe (i.e. no chemical reaction occurs). Now the investigation of rearrangements of the chemicals in the chemical storerooms leads us again to treat the pebble exchange model .
In this paper, we will shed light on some algebraic property of the puzzle, which is of not only theoretical interest, but also practical importance, as will be discussed later.
In the following, we only consider the case where a board graph and a pebble graph are the same, and we denote and simply by and , respectively.
The automorphism group of a graph , denoted by , is the group which consists of all bijections from to such that if and only if . Let , or simply , denote the identity element of . Let us introduce the pebble exchange group of , denoted by , as the group which consists of all automorphisms of such that and are equivalent in . If , there exists a finite sequence of configurations , where is generated from by a move of for all . We remark that for , is not necessarily an automorphism of . It is not difficult to see that turns out a normal subgroup of .
For example, please recall Application 2 in the above. From a given stable disposition of chemicals with no more information about the store system, one of the most moderate assumptions would be that two chemical storerooms are adjacent with a passageway only if the pair of corresponding two chemicals is safe. This situation leads us to treat the pebble exchange model . Moreover, in such case, any rearrangement from a stable disposition to another stable disposition should be corresponding to an element of . Hence if we can show the equation here, it means that practically all the necessary and sufficient dispositions are rearrangeable from one another.
However, it seems to be highly nontrivial and difficult problem to characterize completely the graphs whose pebble exchange groups are equal to their automorphism groups. Hence, before to attack this problem directly, in this paper we will show that the class of graphs satisfying is considerably large. Especially, we prove (Theorem 5) that, for any connected graph , the pebble exchange group of the square of contains a subgroup isomorphic to the automorphism group of . This result is somewhat surprising since the square of a sparse graph is apt to sparse and the puzzle is also far from feasible in general. By using this result, for example, we can show that, for any connected graph , if we 2-subdivide all the edges of , and if we take its square, the resulting graph satisfies the equation .
2 Main Results
It is known that for any finite group , there exists a graph such that (cf. ). By using this fact, we have the following result.
For any finite group , there exists a graph such that .
Proof. Let us take a graph such that . Since at least one of and is connected, and , by replacing with , if necessary, we may assume is connected.
Let be a tree such that and . Let us build from by replacing all edges with . Then we have . Now, let us consider with vertices, which is the join of and an additional vertex . Then is -connected and it contains as a spanning subgraph. Hence, by Wilson’s theorem, Example 2, is feasible. Therefore, we have . Since , we have , as required.
Second, we note a simple observation about , where contains no small cycle. For a graph , the girth of , denoted by , is the order of the smallest cycle contained in . If contains no cycle, is defined as . A matching of a graph is a set of independent edges of . For a matching of a graph , let be a configuration of such that for all , , where , and for all . Let .
Let be a connected graph with at least three vertices. If , then .
It is sufficient to show that if satisfies , then is not an automorphism of .
Claim. Let be a configuration of . Then if and only if .
First, suppose that , where is a matching of . Starting from , by exchanging all pairs of pebbles and satisfying , we have .
Second, suppose that .
Let be a sequence of configurations, where is generated from by a move for all .
By induction, we may assume .
Let us assume we have from by a move, in which two pebbles and are exchanged.
What we need to show is that .
Case 1. Both and are contained in and .
In this case, we have , where .
Case 2. Both and are contained in and .
Suppose that and . In order to exchange and , we have and . Hence, forms a cycle of length , a contradiction.
Case 3. Exactly one of and is contained in .
We may assume and . Suppose that . In order to exchange and , we have and . Hence, forms a cycle of length , a contradiction.
Case 4. None of and is contained in .
In this case, we have , where .
Suppose to a contradiction that there exists an automorphism of with and . By the above claim, we have a matching of such that . Since , we have . Let . Because is at least and is connected, we may assume there exists a vertex such that . If , there exists an edge . Since is an automorphism of , we have . Hence, forms a cycle of length , a contradiction. If , since is an automorphism of , we have . Hence, forms a cycle of length , a contradiction.
The next result is about pebble exchange group of a product of graphs.
For any two connected graphs and , .
The proof of Theorem 3 will be given in Section .
Let be the -dimensional hypercubic graph. Since and , we have the following corollary as an immediate consequence of Theorem 3.
For , .
As a graph becomes sparse, the number of possible moves on decrease. Hence, it is interesting to show the existence of graphs such that has a rich structure and .
For a graph , the square graph of is defined as and , where is the distance between and in .
The main result of the paper is the following theorem.
For any connected graph , .
In order to prove Theorem 5, we first deal with the simplest but the most important case, where is a path.
For , .
The proof of Proposition 6 will be given in Section .
Second, let us introduce a new operation, path flip, for a configuration . Let be a path of . If is also a path of , by a path flip, can be replaced with such that for , and for all .
The following lemma may arouse an independent interest apart from pebble exchange puzzles.
For a connected graph , and for any two configurations , , can be transformed into by a finite sequence of path flips.
The proof of Lemma 7 will be given in Section .
3 Proof of Theorem 3
First, we will show that . For and , it suffices to show that . In the first part of moves, we proceed a sequence of moves corresponding to on all copies of in parallel. In the second part of moves, we proceed a sequence of moves corresponding to on all copies of in parallel. The sequence of total moves yields .
Second, we will show that .
Claim 1. Let such that . For two pebbles and , if and are in a common copy of for some , then and are not in a common copy of .
Suppose to a contradiction that there exists a pair of pebbles and and a configuration with such that and are in a common copy of , and and are in a common copy of . We may assume that can be made from with the minimum number of moves violating the condition of the claim. We may assume that is exchanged with a pebble in the -th move.
Case 1. and are in a common copy of .
In this case, by the minimality of , and are in a common copy of . Since and are in a common copy of , and are in a common copy of . Then and violate the condition of the claim just after the -th steps. This contradicts the minimality of .
Case 2. and are in a common copy of .
In this case, and already violate the condition of the claim after the -th steps. This contradicts the minimality of .
Claim 2. Let be an automorphism of such that . For two pebbles and , if and are in a common copy of for some , then and are in a common copy of .
Let us assume that and are in a common copy of . Since is an automorphism of , there exists a path from to such that a path is in a common copy of . By Claim 1, all pairs of vertices in are in a mutually different copy of . Hence, any pair of adjacent vertices in are in a common copy of . Therefore, and are in a common copy of .
By Claim 2, induces a permutation on the set of all copies of for , where naturally corresponds to . Then, we have . Furthermore, by Claim 1, if two pebbles and are in a common copy of , and can be exchanged only if they occupy a common copy of . Hence, we have for . Therefore, we have .
4 Proof of Lemma 6
It is not difficult to see that is feasible for . Hence, we have . Suppose that . In this case, since , it suffices to prove . Let us label the vertices of as and . Note that , where for and for . It suffices to show that in .
In the following, besides , we consider two additional puzzles and . For configurations , and , we will use notations as
By using this notation, and is expressed as
Let us define and as
and let us define and as
What we want to show is that
for all .
Note that is naturally considered as a subgraph of . Hence, implies that . Furthermore, and are isomorphic as puzzles, since these puzzles can be switched to each other by interchanging the roles of a board graph and a pebble graph. Hence, holds if and only if holds.
We proceed by induction on . For , it is not difficult to see that the conclusion holds. Let . It suffices to show that by using the inductive assumptions , , for . We have
5 Proof of Lemma 7
In the following, for a configuration , we say that is realizable by path flips, if can be transformed from by a finite sequence of path flips. Suppose to a contradiction that there exists a pair of a graph and an automorphism such that is not realizable by path flips. Note that the order of an automorphism is the smallest integer such that . Let us choose a counter example such that (1) is minimum, and (2) the order of is minimum subject to (1). Let be the order of . First, we claim that is a prime power. Indeed, if is not a prime power, there exist relatively prime two integers and with . Since the order of is and the order of is , by the choice of , both and are realizable by path flips. Since and are relatively prime, there exist two integers and such that . Hence, we have and so is also realizable by path flips.
Let , where is a prime and is a positive integer. Let denote a cyclic group generated by . If is another generator of , is realizable by path flips if and only if is realizable by path flips. Let us denote the orbit of in by . Let us choose a pair , where is a generator of and is a vertex of such that (1) is minimum, and (2) is minimum subject to (1).
We redefine as a chosen element , and put and .
Note that is a power of , since divides .
First, we deal with the case, where .
Case 1. .
In this case, we have and . Let . Since , it follows that , the restriction of on , is an element of . If is connected, by the inductive hypothesis, is realizable by path flips in . Since there is no need to move for , is also realizable by path flips. Hence, in the following, we assume that is disconnected. Then there exists an integer , and a vertex partition , where is a connected component of for all .
Then induces a permutation on such that for all . By the inductive hypothesis, all automorphisms of are realizable by path flips for all . Since any permutation is written as a product of transpositions, it suffices to prove the assertion under the condition where and , . In this case, let us take such that is maximum, and let . Then we have for , and .
Let be a path of from to , and set a path . Now, let us flip , and let us flip subsequently. Set . Since , we have . Since is connected, by the inductive hypothesis, is realizable by path flips.
Hence, is also realizable by path flips, as required.
Case 2. .
Let us take a shortest path from to , where we set . Let .
Claim 1. If , then for all integers and .
Suppose to a contradiction that for some and . We have , where . Since , by the choice of , is not a generator of . Since is a cyclic group of the order , we have . Furthermore, we have . Therefore, we have , a contradiction.
Claim 2. For all , if , then .
Suppose to a contradiction that for some and with . We have with some . Since also holds, we have , because is a power of and . With the fact , this contradicts to the choice of .
For , let us define , and . Then we have for , and . Furthermore, by Claim 1 and Claim 2, for .
Let us define a subgraph of such that and
Since and , is an automorphism of .
Claim 3. is realizable by path flips on .
For , let . If , is simply a path for , and is a cycle. Hence, is isomorphic to a dihedral group, which is generated by a pair of reflections of cycles. Since a reflection is realizable by a path flip, the claim is proved. In the following, we assume that . Let us define a configuration such that for and for .
We claim that is an automorphism of , because for , is an isomorphism from to and is an isomorphism from to . Furthermore, by definition, the order of is . Since , by the minimality of , is realizable by path flips. On the other hand, is an automorphism of . Since the order of , by the minimality of ,