Twin Towers of Hanoi

In the Twin Towers of Hanoi version of the well known Towers of Hanoi Problem there are two coupled sets of pegs. In each move, one chooses a pair of pegs in one of the sets and performs the only possible legal transfer of a disk between the chosen p…

Authors: Zoran Sunic

TWIN TO WERS OF HANOI ZORAN ˇ SUNI ´ C De dic ate d to Antonio Machi on t he o c c asio n of his r etir ement Abstract. In the Twin T o we rs of Hanoi v ersion of the well kno wn T o wers of Hanoi Problem there are tw o coupled sets of p egs. In eac h mov e, one chooses a pair of p egs in one of the sets and p erforms the only possi ble legal transfer of a disk b etw een the c hosen p egs (the smallest disk from one of the pegs i s mov ed to the other p eg), but also, sim ultaneously , b etw een the corresponding pair of pegs in the coupled set (th us the same sequence of mo ves is al wa ys used in both sets). W e pro vide upp er and low er b ounds on the length of the optimal solutions to problems of the following t ype. Given an initial and a final p osition of n disks in eac h of the coupled sets, what is the smal l est n umber of mo ve s needed to simu ltaneously obt ain the final position from the i ni tial one in eac h set? Our analysis is based on the use of a gr oup, called Hanoi T o wers group, of rooted ternary tree automorphisms, whic h models the original problem i n suc h a w ay that the confi gurations on n di s ks are th e vertices at lev el n of the tree and the action of the generators of the group represen ts the three possi ble mov es b etw een the three pegs. The t win version of the problem is analyzed b y considering the act ion of Hanoi T o wers gr oup on pairs of ve rtices. 1. To wers of H anoi and Twin Towers of Hanoi W e first describ e the well known Hanoi T ow er s Problem on n disks a nd 3 p egs . The n disks hav e different size. Allow ed p o sitions (whic h we call c o nfigurations ) of the disk s on the p eg s ar e those in whic h no disk is on top of a smaller disk. An example o f a configur ation on 4 disks is provided in Figure 1). In a single mo ve, the top disk from one of the p egs can b e transfer red to the top po sition on another p eg as long as the newly obta ined pos ition of the disks is allowed (it is a configuration). t t a 02 * * i i a 01 5 5 i i a 12 5 5 1 4 2 3 0 1 2 Figure 1. A configura tion o n four disks This material is based upon work supp orted by the National Science F oundation. 1 2 ZORAN ˇ SUNI ´ C Lab el the three p egs by 0, 1 and 2. A t any moment, regar dless o f the cur rent configuratio n, there are exactly three po ssible mov es, denoted by a 01 , a 02 , and a 12 . The mo ve a ij transfers the smalle st disk from p egs i and j betw een these t wo peg s. More pre cisely , if the smallest disk on p egs i and j is on i the mo ve a ij transfers it to j , and if it is on j the mov e transfers it to i . F or instance, the mov e a 01 applied to the configura tion in Figure 1 transfers disk 2 from p eg 1 to pe g 0, a 02 transfers disk 1 from peg 2 to peg 0, and a 12 transfers disk 1 from peg 2 to peg 1. W e do not need to sp ecify the direction of the transfer , since it is uniquely determined by the disks (by their size) that are curr ently on p egs i and j . In the exceptional case when there are no disks on e ither p eg i or j , the mov e a ij leav es suc h a c onfiguration unch anged. In the classical T ow ers of Hano i Pro blem on n disk s all disk s are initially on one of the pegs and the g oal is to trans fer all o f them to another (prescrib ed) p eg in the smallest p o s sible num b er o f mov es . It is w ell known that the optimal solution is unique and consis ts of 2 n − 1 mov es. One may p ose a more general pr oblem such as, g iven some initial and final configur a tions on n disks, what is the smallest nu mber of mov es needed to obtain the final configur ation from the initial one. It turns out that this problem a lways has a solution (regardless of the chosen initial and final configurations) and that the optimal solution is either unique or there are exactly tw o solutions. The latter happens for a relatively small n umber of ch oices of initial a nd final co nfigurations. F o r a survey on topics and r esults rela ted to Hanoi T ow ers Problem se e [Hin89] and for an optimal solution (repre s ented/obtained b y a finite automa ton) for a ny pair of co nfigurations s ee [Rom06]. Note that, in this setting, none o f the instances of the gener al problem is mo r e difficult (in terms of the optimal n umber of mov es) than the cla ssical problem. In the Tw in T ow ers of Hanoi version tw o sets o f three pegs labeled b y 0, 1 and 2 ar e coupled up. W e often r e fer to the t wo sets as the top and the b ottom set. A coupled co nfiguration on n disks is a pair of configurations on n disk s, one in each set (see, for instance, the coupled configuratio n on 4 disks in Figure 2). A mov e a ij applied to a coupled configura tion consists of application of the mov e a ij to eac h configuration in the coupled pair. F or instance, the mov e a 01 applied to the coupled configura tion in Figur e 2 transfers disk 1 in the top set to p eg 1 and, simult aneous ly , disk 1 in the bottom set to p eg 0. The mo ve a 02 applied to the same coupled co nfiguration, transfers disk 1 in the top set and disk 2 in the bottom set to peg 2 (in their sets), and a 12 changes nothing in the top set a nd transfers disk 1 in the bottom set to p eg 2 . In the setting of Twin T ow ers w e pos e three pr oblems. Problem 1 (Twin T ow e r s Switch) . Given the initial coupled co nfiguration in which all disks in the top set are on peg 0 and all dis ks in the b ottom set are on p eg 2, how many mo ves a re needed to o btain the final coupled configura tio n in whic h all disks in the top set are o n p eg 2, and all disks in the bottom set a re on peg 0? Note that the Twin T ow ers Switch Problem asks for simultaneous solution of t wo instances of the classical Hanoi T o wers Pr oblem (a ll disks are, simultaneously , using the same sequence of mo ves, transferr ed from peg 0 to p eg 2 in the top set, and from peg 2 to p eg 0 in the b ottom set). Problem 2 (Small Disk Shift) . Given the initial co upled config ur ation in Figure 2, how many mo ves a re needed to o btain the final coupled configura tio n in whic h all TWIN TOWERS OF HANOI 3 1 2 3 4 0 1 2 4 1 3 2 Figure 2. Initial po sition for the Small Disk Shift Pro ble m disks are in the same p ositions as in the initial one, except the smallest disk in each set is mo ved one peg to the right (disk 1 in the to p configura tion to peg 1, and disk 1 in the bottom c o nfiguration to peg 2)? Problem 3 (General Pr oblem) . Given any initial coupled configuration and any final co upled configuration wha t is the smallest n umber of mo ves needed to o btain the final configuration from the initial one? W e provide an upp er bound for the Twin T ow ers Switch, exact a ns wer for the Small Disk Shift, a nd lo wer a nd upp er b ounds for the General Pr oblem restr ic ted to basic coupled configuratio ns (defined below). Theorem TTS (Twin T ow er s Switch) . The smal lest numb er of moves ne e de d to solve the Twin T owers S witch Pr oblem on n disks is no gr e ater than a ( n ) , wher e a ( n ) = ( 1 , n = 1 , 4 3 · 2 n − ( − 1) n 3 , n ≥ 2 . Remark. The sequence a ( n ) satisfies the Jacobshtal linear recurs ion a ( n ) = a ( n − 1 ) + 2 a ( n − 2) , for n ≥ 4 , with initial condition a (1) = 1, a (2) = 5, and a (3) = 11. Conjecture TTS. The smal le st n umb er of moves ne e de d to solve the Twin T owers Switch pr oblem on n disks is exactly a ( n ) . Note that the Twin T ow ers Switch, req uir ing no more than r oughly 4 3 2 n mov es is not considerably more difficult than the classical problem of moving a single to wer, which require s roughly 2 n mov es . I n fact, there are more difficult problems that can be posed in the context o f coupled sets (recall that there are no problems that ar e more difficult than the classical problem when only one se t of disks is co nsidered). F or instance, the next result implies that the Small Disk Shift Pr oblem requires more mo ves than the Twin T owers Switch P r oblem. 4 ZORAN ˇ SUNI ´ C Theorem SDS (Small Disk Shift) . The s m al lest numb er of moves d ( n ) ne e de d to solve the Smal l Disk Shift Pr oblem on n disks is e qual to d ( n ) =      2 , n = 1 , 6 , n = 2 , 2 · 2 n , n ≥ 3 . In order to state our result on the Gener al Problem, we need the no tion of compatible coupled configurations . An initial coupled co nfiguration I on n disks is c omp atible to the fina l coupled co nfiguration F on n disks if F ca n b e obtained fr om I in a finite n umber of mov es. A coupled config uration is called b asic if the smalles t disks in its top configura tion a nd the smallest disk in its b ottom configur ation are not on co rresp onding pegs (it is not the cas e that b oth are on p eg 0, b o th on peg 1, or bo th o n peg 2). Note that, based o n the bra nching structure of Hanoi T ow ers group described by Grig orch uk and the author in [G ˇ S07], D’Angeli and Donno show in [DD07] that Hanoi T o wers group a cts dis tance 2 -transitively on the levels of the roo ted terna ry tree. This provides a c hara c terization of the pairs of compatible coupled configu- rations. In particular, their result implies that a ll basic coupled configur a tions ar e compatible. W e quote their re sult in more detail (Theorem 1), after we sufficient ly develop the necessar y terminology . Along the wa y we provide a different pro o f (w e need it for our upp er b ound estimate on the Gener al Problem). Note that an in ter- esting consequence of the result of D’Angeli and Donno is that the Hanoi T ow er s group induces an infinite sequence of finite Gel ′ fand pairs (see [DD07] for details). Theorem GP (General pro ble m for bas ic config urations) . The numb er of moves ne e de d to obtain one b asic c ouple d c onfigu r ation on n disks fr om another is no gr e ater than 11 3 × 2 n = 3 . 66 × 2 n . Note that the coupled co nfig urations in Theorem SDS are ba sic. Thus, The- orem SDS implies that fo r at least one pa ir of basic coupled config urations the smallest num b er of moves that is needed to obtain one from the other is exactly 2 × 2 n . Obtaining go o d upp er b ound seems to b e a difficult task, since one nee ds to solve all instances of the problem in optimal or nea rly optimal w ay . Low er b ounds seem a bit ea sier to o btain since they may be derived from lower b ounds from some sp ecific, well chosen, instances . The low er bound (2 × 2 n ) and the upper b ound (3 . 66 × 2 n ) provided here differ by less than a factor of tw o. All results men tione d so far will b e reca st in the following sectio ns in the natural setting of group actions on roo ted trees. The r eason is that this setting provides a conv e nient language and to ols to prov e our results. Ac knowledgmen t. T he author is thankful to T ullio Ceccherini-Silbers tein and Alfredo Donno for their help, useful remarks, and corrections. 2. En coding by w ords and tree a utomorphisms W e start by an encoding of the original Hanoi T ow er s Proble m o n three pe g s, as originally presen ted in [G ˇ S06] (and further elab orated in [G ˇ S07, G ˇ S08]), by a group of ro oted ternary tree automorphisms. TWIN TOWERS OF HANOI 5 Lab el the disks by 1 , 2 , . . . , n ac c o rding to their s iz e (smallest to larg est). The configuratio ns can b e enco ded b y words over the finite a lpha be t X = { 0 , 1 , 2 } . The letters in this alphab et represent the p egs. The w ord x 1 x 2 . . . x n represents the unique configuration on n dis ks in which, for i = 1 , . . . , n , the dis k i is on p eg x i . F or example, the w ord 212 0 represents the configur ation in Figure 1. Note that there are exactly 3 n configuratio ns o n n disks. The mov es a ij are enco ded as the transformations o f the s e t o f a ll finite words X ∗ ov e r X defined b y a 01 (2 . . . 20 u ) = 2 . . . 21 u, a 02 (1 . . . 10 u ) = 1 . . . 12 u, a 12 (0 . . . 01 u ) = 0 . . . 02 u, a 01 (2 . . . 21 u ) = 2 . . . 20 u, a 02 (1 . . . 12 u ) = 1 . . . 10 u, a 12 (0 . . . 02 u ) = 0 . . . 01 u, a 01 (2 . . . 2) = 2 . . . 2 , a 02 (1 . . . 1) = 1 . . . 1 , a 12 (0 . . . 0) = 0 . . . 0 , for any word u in X ∗ . Thus, a ij changes the fir st occur rence of i or j to the other of these tw o symbols. The p oint of, say , a 01 “ignoring ” initia l prefixe s of the form 2 ℓ is that such prefixes repr esent small disks on p eg 2, and a 01 should ig no re such disks, since it is supp osed to tr ansfer a disk be tw een p eg 0 a nd p eg 1. The firs t o ccurrence of 0 or 1 represents the smallest disk on o ne of these tw o p egs a nd changing this oc c ur rence of the sym b ol 0 or 1 to the other one in the code o f the given configura tio n transfers the corresp onding disk to the other peg. Note that if a ij is applied to (a co de of ) a configuration that has no o cc ur rences o f i or j it leav es such a c o nfiguration unchanged. This corres p o nds to the situatio n in which there are no disks on p egs i ad j a nd the mov e a ij has no effect on such a configuration since there are no disks to be moved. In order to work with more compact notation, set a 01 = a, a 02 = b, a 12 = c. In this notation, the mo ves a , b and c act on the set of all finite words X ∗ by a (2 . . . 20 u ) = 2 . . . 21 u, b (1 . . . 10 u ) = 1 . . . 12 u, c (0 . . . 01 u ) = 0 . . . 02 u, a (2 . . . 21 u ) = 2 . . . 20 u, b (1 . . . 12 u ) = 1 . . . 10 u, c (0 . . . 02 u ) = 0 . . . 01 u, (1) a (2 . . . 2) = 2 . . . 2 , b (1 . . . 1) = 1 . . . 1 , c (0 . . . 0) = 0 . . . 0 . Hanoi graph on n disks, denoted by Γ n , is the gr a ph on 3 n vertices representing the configura tions o n n disks . Two vertices u and v are connec ted b y an edg e lab eled b y s ∈ { a, b, c } if the configur ations represented by u and v can b e obtained from ea ch other by a pplication o f the mov e s (note that each of the mov es is an inv olutio n). The Hanoi graph on 3 disks is depicted in Figure 3. Graphs very similar to the graphs we just defined hav e a lr eady a pp ea red in the literature in connection to Hanoi T ow ers Problem (see, for instance, [Hin89]). The difference is that the edges are usually not labe led and there are no loops at the corner s. The set of all words X ∗ has the str ucture of a ro oted ternar y tree in which the ro ot is the empty word, level n of the tree consis ts of the 3 n words of length n ov e r X , and each v ertex (eac h word) u has three children, u 0, u 1 a nd u 2. The transformatio ns a , b and c a ct on the tree X ∗ as tree a utomorphisms (in particular, they preserve the roo t and the levels of the tree). Thus, a , b and c gener ate a gr oup of automo rphisms of the ro oted terna ry tree X ∗ . The g roup H = h a, b, c i , called Hanoi T owers group, w as defined in [G ˇ S06]. The Hano i g raph Γ n is the Schreier graph, with resp ect to the generating set { a, b, c } , o f the action of H on the w ords of length n in X ∗ (Sc hreier gr aph o f the action on lev el n in the tree). 6 ZORAN ˇ SUNI ´ C   • a        c 5 5 5 5 5 5 5 b 111   • c        b 011   • a 5 5 5 5 5 5 5 211   • b        a 5 5 5 5 5 5 5 021   • c        b 5 5 5 5 5 5 5 201   • a        c 221   • b 121   • a 101   • c 5 5 5 5 5 5 5 001   • c        b 5 5 5 5 5 5 5 220   • b        a 5 5 5 5 5 5 5 002   • b        a 120   • c 5 5 5 5 5 5 5 020   • a        c 202   • b 5 5 5 5 5 5 5 102   • a        c 5 5 5 5 5 5 5 100   • b        a 5 5 5 5 5 5 5 010   • c        b 5 5 5 5 5 5 5 212   • a        c 5 5 5 5 5 5 5 122   • b c 000   • a 200   • c 210   • b 110   • a 112   • c 012   • b 022   • a 222 Figure 3. Γ 3 , the Hanoi graph on 3 disks A sequence of mo ves is a word ov er S = { a , b, c } . The order in whic h mov es are applied is from right to left as in the following calcula tion caba (022 0 ) = ca b (1220) = ca (102 0) = c (0020) = 0010 . The structure of the Hanoi g raphs is fairly well understo o d. In particular, for n ≥ 0, the Hano i g raph Γ n +1 is o btained fr om the Ha noi graph Γ n as follows [G ˇ S07]. Three copies of Γ n are constructed by app ending the la bel 0, 1, and 2, resp ectively , to every vertex la b el in Γ n . Then the tw o lo ops la b e led by c at the vertices 0 n 1 and 0 n 2 are deleted and replaced b y an edge b etw een 0 n 1 and 0 n 2 labeled b y c , the tw o lo o ps la b eled b y b at the vertices 1 n 0 and 1 n 2 are deleted a nd replaced by an edg e b e tw een 1 n 0 and 1 n 2 lab eled by b , and the t wo loo ps lab eled by a at the vertices 2 n 0 and 2 n 1 are deleted and replaced by an edge betw een 2 n 0 a nd 2 n 1 lab eled b y a . Indeed, this “r ewiring” o n the next level (level n + 1) needs to b e done as indicated since c (0 n 1) = 0 n 2, b (1 n 0) = 1 n 2 and a (2 n 0) = 2 n 1. In general, the gra phs for even and o dd n hav e the form pr ovided in Figure 4 and Figure 5. These figures suffice for our purp oses, since only the region near the path from 0 n to 2 n (near the bo ttom) and near the path from 0 n to 1 n (near the left side) play significant role in our consider ations. The follo wing lemma , pro viding a non-recurs ive, optimal solution to the classical Hanoi T ow e r s Problem is part of the folklore (it has b een proved and expressed in many disguises and our setting may b e cons idered one of them). TWIN TOWERS OF HANOI 7   • c    a 7 7 7 b   • a    b   • c 7 7 7   • b    c 7 7 7   • a    b 7 7 7   • c   a   • b   • c   • a c     • a    b 7 7 7   • b    c   • a 7 7 7   • c    a 7 7 7   • b    c 7 7 7   • a    b   • c   • a   • b   • b    c 7 7 7   • c    a   • b 7 7 7   • a    b 7 7 7   • c    a 7 7 7   • b    c   • a   • b   • c 7 7 7 a b   • c    a 7 7 7   • a    b 7 7 7   • b    c 7 7 7   • c    a 7 7 7   • a    b   • c 7 7 7   • b    c   • a 7 7 7   • c    a   • b 7 7 7   • a    b   • c 7 7 7   • b    c 7 7 7   • a    b 7 7 7   • c    a 7 7 7   • b    c 7 7 7   • a    b 7 7 7   • c    a 7 7 7   • b    c 7 7 7   • a    b 7 7 7   • a c   • b   • c   • a   • b   • c   • a   • b   • c   • a   • b   • c c   • a   • b   • c   • a Figure 4. Hanoi graph on even num ber of disks Lemma 1. The dia meter of the Hanoi T owers gr aph Γ n is 2 n − 1 . It is achieve d as the distanc e b etwe en any two of the c onfigur ations 0 n , 1 n , and 2 n . The unique se quenc e of moves of length 2 n − 1 b etwe en any t wo of t hese c onfigu ra tions is given in the fol lowing t able. even n o dd n from \ to 0 n 1 n 2 n 0 n 1 n 2 n 0 n × ( cab ) m ( n ) ( cba ) m ( n ) × a ( cba ) m ( n ) b ( cab ) m ( n ) 1 n ( bac ) m ( n ) × ( bca ) m ( n ) a ( bca ) m ( n ) × c ( bac ) m ( n ) 2 n ( abc ) m ( n ) ( acb ) m ( n ) × b ( acb ) m ( n ) c ( abc ) m ( n ) × wher e m ( n ) = 1 3 (2 n − 1) , for even n , and m ( n ) = 1 3 (2 n − 2) , for o dd n . Our goa l is to provide some understanding o f the co upled Hanoi g raph CΓ n on n disk s . The vertices of this gra ph are the 3 2 n pairs of words  u T u B  of leng th n ov e r X (representing the top a nd the bottom configuration on n disks in a co upled configuratio n). Two vertices in CΓ n are co nnected by an edge labe led by s in { a, b, c } if the coupled configur ations repres ent ed by these vertices ca n be obtained from each o ther by applica tio n of the move s . The coupled Hanoi gr aph on 1 disk is depicted in Figur e 6. The coupled Hano i graph CΓ n is the Schreier graph, with resp ect to the gener a ting set { a, b, c } , of the action of H on the pairs of words of length n in X ∗ defined by s  u T u B  =  s ( u T ) s ( u B )  , for s in { a, b, c } . 8 ZORAN ˇ SUNI ´ C   • a    c 7 7 7 b   • c    b   • a 7 7 7   • b    a 7 7 7   • c    b 7 7 7   • a   c   • b   • a   • c c     • b    a 7 7 7   • a    c   • b 7 7 7   • c    b 7 7 7   • a    c 7 7 7   • b    a   • c   • b   • a   • a    c 7 7 7   • c    b   • a 7 7 7   • b    a 7 7 7   • c    b 7 7 7   • a    c   • b   • a   • c 7 7 7 b c   • c    b 7 7 7   • b    a 7 7 7   • a    c 7 7 7   • b    a 7 7 7   • b    a   • c 7 7 7   • a    c   • b 7 7 7   • c    b   • a 7 7 7   • a    c   • b 7 7 7   • a    c 7 7 7   • b    a 7 7 7   • c    b 7 7 7   • a    c 7 7 7   • b    a 7 7 7   • c    b 7 7 7   • c    b 7 7 7   • a    c 7 7 7   • b c   • a   • c   • b   • a   • c   • b   • a   • c   • b   • a   • c b   • a   • c   • b   • a Figure 5. Hanoi graph on o dd num b er of disks ( 0 1 ) ( 2 0 ) ( 1 2 )   • a c D D D D D D D D D D D b Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q   • c z z z z z z z z z z z b a D D D D D D D D D D D   • b m m m m m m m m m m m m m m m m m m a z z z z z z z z z z z c   • a         c 2 2 2 2 2 2 2 2 b ( 1 1 )   •   •   •   • c b   • a ( 1 0 ) ( 0 2 ) ( 2 1 ) ( 0 0 ) ( 2 2 ) Figure 6. CΓ 1 , the coupled Hanoi graph on 1 disk 3. Twin Towers Switch In this section we provide an upp er bo und on the n umber of mov es needed to solve the Twin T owers Switch Problem. In the lang ua ge of coupled Hanoi graphs the same result is expressed as follows. Theorem TTS ′ . The distanc e b etwe en the c ouple d c onfigur ations  000 . . . 0 222 . . . 2  and  222 . . . 2 000 . . . 0  TWIN TOWERS OF HANOI 9 in the c ouple d Hanoi gr aph CΓ n (on n disks) is no gr e ater than a ( n ) = ( 1 , n = 1 , 4 3 · 2 n − ( − 1) n 3 , n ≥ 2 . Pr o of. Let n = 2 . W e have, by us ing (1), ababa (00) = abab (1 0) = aba (12) = ab (02) = a (2 2) = 22 . Since ababa is a pa lindrome, it has o rder 2 (as a g r oup element) and, therefor e, ababa (22) = 00. Thus the distance betw een the initial a nd the final coupled co n- figurations is no greater than 5 (it can be shown that it is a ctually 5). Assume that n is even and n ≥ 4. Consider the s e q uence of a ( n ) = 4 3 · 2 n − 1 3 mov es ababa ( cacaba ba ) 1 3 (2 n − 1 − 2) . Notice the pattern   • b    c 7 7 7   • a    b 7 7 7   • c    a 7 7 7   • a   • b   • c   • a   • b   • c   • that rep eats along the b o ttom edge in Figure 4, indicating that the r e s ult o f the action of cacabab a and ( cba ) 2 on the leftmost vertex in the pattern is the s ame and it is equal to the rightmost vertex in the pattern (which is the leftmost vertex in the next occur rence of the pattern). Therefore, by (1) a nd Lemma 1, ababa ( cacaba ba ) 1 3 (2 n − 1 − 2) (000 . . . 0) = ababa ( cba ) 1 3 (2 n − 4) (000 . . . 0) = = ababaabc ( cba ) 1 3 (2 n − 1) (000 . . . 0) = abac (22 2 . . . 2) = = aba (122 . . . 2) = ab (0 2 2 . . . 2) = = a (222 . . . 2) = 2 22 . . . 2 . Since ababa ( cacab aba ) 1 3 (2 n − 1 − 2) is a palindrome it has order 2. Thus ababa ( cacaba ba ) 1 3 (2 n − 1 − 2) (222 . . . 2) = 000 . . . 0 and the distance b etw ee n the initial and the final co upled configuratio ns is no greater than a ( n ). Let n = 1. The distance b etw een the coupled co nfigurations  0 2  and  2 0  is 1 (see Figure 6). Assume that n is odd a nd n ≥ 3. Consider the sequence of a ( n ) = 4 3 · 2 n + 1 3 mov es aca ( cbcbcaca ) 1 3 (2 n − 1 − 1) . Notice the pattern   • a    c 7 7 7   • b    a 7 7 7   • c    b 7 7 7   • b   • a   • c   • b   • a   • c   • that rep eats along the b o ttom edge in Figure 5, indicating that the r e s ult o f the action of cbcbcaca and ( cab ) 2 on the leftmost vertex in the pattern is the s a me a nd it is equal to the rightmost vertex in the pattern (which is the leftmost vertex in the next occur rence of the pattern). Therefore, by (1) a nd Lemma 1, aca ( cbcbcaca ) 1 3 (2 n − 1 − 1) (000 . . . 0) = aca ( cab ) 1 3 (2 n − 2) (000 . . . 0) = = acabb ( cab ) 1 3 (2 n − 2) (000 . . . 0) = acab (222 . . . 2) = = aca (0 22 . . . 2) = ac (122 . . . 2 ) = = a (222 . . . 2) = 2 22 . . . 2 . 10 ZORAN ˇ SUNI ´ C Since aca ( cbcbcaca ) 1 3 (2 n − 1 − 1) is a palindrome it has order 2. Thus aca ( cbcbcaca ) 1 3 (2 n − 1 − 1) (222 . . . 2) = 000 . . . 0 and the distance b etw ee n the initial and the final co upled configuratio ns is no greater than a ( n ).  Remark. There are s e veral s o lutions of le ngth a ( n ), for n ≥ 2. F or instance, another solution, for odd n , is cac ( ababacac ) 1 3 (2 n − 1 − 1) and, for ev en n , is cbcbc ( acacbcb c ) 1 3 (2 n − 1 − 2) . W e rephras e Co njectur e TTS as follo ws. Conjecture TTS ′ . The distanc e b etwe en the c ouple d c onfigur ations  000 . . . 0 222 . . . 2  and  222 . . . 2 000 . . . 0  in the c ouple d Hanoi gr aph CΓ n (on n disks) is e qual to a ( n ) . 4. Smal l Disk Shift F or the considera tions tha t follow, the concept of parity will b e useful. Definition 2. F or a configura tion u = x 1 . . . x n in X ∗ and x ∈ X , let p x ( u ) b e the parity of the num b er of a pp ea rances of the letter x in u . F or a co upled configura tio n U =  u T u B  , let p x ( U ) be the parit y of the sum of the parities p x ( u T ) and p x ( u B ). Call any of the config urations 0 n , 1 n , 2 n a c orner c onfigur ation . Call a coupled configuratio n a c orner c ouple d c onfigur ation if at least one of the configur a tions in it is a co rner configuration. Application of a ij to an y non corner configuration changes the parities o f b oth i and j . Therefo re, application o f a ij to a no n cor ner coupled configuration do es not change any par ities. Theorem SDS ′ (Small Disk Shift) . The distanc e b etwe en the c ouple d c onfi gur a- tions  000 . . . 0 100 . . . 0  and  100 . . . 0 200 . . . 0  in the c ouple d Hanoi gr aph CΓ n (on n disks) is d ( n ) =      2 , n = 1 , 6 , n = 2 , 2 · 2 n , n ≥ 3 . Pr o of of Theo rem SDS ′ : upp er b oun d. Assume that n is even and n ≥ 4. Consider the sequence of 2 · 2 n mov es bab ( abc ) 1 3 (2 n − 4) a ( cba ) 1 3 (2 n − 1) c. TWIN TOWERS OF HANOI 11 A simple and convincing wa y to verify that this sequence of mov es accomplishes the goal would b e to tra c e the action in Fig ure 4 . A mo re for mal a pproach, using (1) and Lemma 1, gives bab ( abc ) 1 3 (2 n − 4) a ( cba ) 1 3 (2 n − 1) c (000 . . . 0) = bab ( abc ) 1 3 (2 n − 4) a ( cba ) 1 3 (2 n − 1) (000 . . . 0) = = bab ( abc ) 1 3 (2 n − 4) a (222 . . . 2) = bab ( abc ) 1 3 (2 n − 4) (222 . . . 2) = = babcba ( abc ) 1 3 (2 n − 1) (222 . . . 2) = babcba (0 00 . . . 0) = = ba b cb (100 . . . 0) = babc (120 . . . 0) = = bab (220 . . . 0) = ba (0 20 . . . 0) = = b (1 20 . . . 0) = 100 . . . 0 , and bab ( abc ) 1 3 (2 n − 4) a ( cba ) 1 3 (2 n − 1) c (100 . . . 0) = bab ( abc ) 1 3 (2 n − 4) a ( cba ) 1 3 (2 n − 1) (200 . . . 0) = = bab ( abc ) 1 3 (2 n − 4) acba (200 . . . 0) = bab ( abc ) 1 3 (2 n − 4) acb (210 . . . 0 ) = = ba b ( abc ) 1 3 (2 n − 4) ac (010 . . . 0 ) = bab ( abc ) 1 3 (2 n − 4) a (020 . . . 0) = = bab ( abc ) 1 3 (2 n − 4) (120 . . . 0) = bab (120 . . . 0 ) = = ba (100 . . . 0) = b (00 0 . . . 0) = = 200 . . . 0 , where, in the transition betw een the first a nd second row, we used the fact that 1 3 (2 n − 1) is o dd. Assume that n is o dd and n ≥ 3. Consider the sequence of 2 · 2 n mov es bab ( abc ) 1 3 (2 n − 5) bcba ( cba ) 1 3 (2 n − 2) . A simple and convincing w ay to v erify that this sequence o f mov es ac c omplishes the go al would b e to trace the action in Figure 5. A more formal approach, using (1) and Lemma 1, gives bab ( abc ) 1 3 (2 n − 5) bcba ( cba ) 1 3 (2 n − 2) (000 . . . 0) = bab ( abc ) 1 3 (2 n − 5) bcb (111 . . . 1) = = bab ( abc ) 1 3 (2 n − 5) aabc (111 . . . 1) = baba ( bca ) 1 3 (2 n − 5) abc (111 . . . 1 ) = = baba ( bca ) 1 3 (2 n − 5) ab (211 . . . 1 ) = baba ( bca ) 1 3 (2 n − 5) a (011 . . . 1) = = ba b a ( bca ) 1 3 (2 n − 5) (111 . . . 1) = babcba a bca ( bca ) 1 3 (2 n − 5) (111 . . . 1) = = babcbaa ( bca ) 1 3 (2 n − 2) (111 . . . 1) = babcba (0 00 . . . 0) = = babcb (100 . . . 0) = babc (1 20 . . . 0) = = ba b (220 . . . 0 ) = b a (020 . . . 0) = = b (120 . . . 0) = 100 . . . 0 , and bab ( abc ) 1 3 (2 n − 5) bcba ( cba ) 1 3 (2 n − 2) (100 . . . 0) = bab ( abc ) 1 3 (2 n − 5) b (100 . . . 0 ) = = bab ( abc ) 1 3 (2 n − 5) (120 . . . 0) = bab (120 . . . 0 ) = = ba (1 00 . . . 0) = b (000 . . . 0 ) = 200 0 . . . 0 . When n = 1, a solution of length 2 is giv en by the sequence of mov es ba and, for n = 2, a solution of length 6 is given by the s e quence of mo ves bcacba .  Remark. Note that the ab ov e sequences o f mov es of length 2 · 2 n are not unique. F or instance, for even n , n ≥ 4, one co uld use caba ( bac ) 1 3 (2 n − 4) b ( cab ) 1 3 (2 n − 1) . 12 ZORAN ˇ SUNI ´ C Pr o of of Theo rem SDS ′ : lower b ound. Since the 0 -parities for the initial and final coupled configurations are p 0  000 . . . 0 100 . . . 0  = 1 and p 0  100 . . . 0 200 . . . 0  = 0 , somewhere on the w ay fro m the initial to the final co upled configur ation the 0 -parity changes. This parity cannot b e changed at the cor ner coupled configurations  0 n v  and  v 0 n  , where v is no t a corner config uration. Since the 0 -parity must b e changed, any sequence of mov es that starts a t the initial coupled configuration  000 ... 0 100 ... 0  and accomplishes this change in volv es a corner a -lo op of a corner b -lo op application in either the top or in the b ottom configuratio n. The 4 pos sibilities are given as cases T op a , T op b , Bot a and Bot b (standing for top configuration inv olved in a corner a - lo op, top configura tion inv olved in a corner b - lo op, etc.) in T able 1, where, in each case initial 0-parity change / / even n o dd n T op a :  00 ... 0 10 ... 0  / /  2 n ∗  a / /  2 n ∗  / /  10 ... 0 ∗  , 2 · 2 n − 2 2 · 2 n − 1 T op b :  00 ... 0 10 ... 0  / /  1 n ∗  b / /  1 n ∗  / /  10 ... 0 ∗  , 2 · 2 n − 1 2 · 2 n − 2 Bot a :  00 ... 0 10 ... 0  / /  ∗ 2 n  a / /  ∗ 2 n  / /  ∗ 20 ... 0  , 2 · 2 n − 2 2 · 2 n − 2 Bot b :  00 ... 0 10 ... 0  / /  ∗ 1 n  b / /  ∗ 1 n  / /  ∗ 20 ... 0  , 2 · 2 n − 2 2 · 2 n − 2 T able 1. Changing the 0-par ity case, ∗ denotes s ome configuration different from the one with whic h it is coupled. The last tw o columns provide the num b er o f steps in the unique shortest path of the given form, for even and o dd num ber o f disk s. Note that the a b ov e co nsiderations alr eady show that d ( n ) ≥ 2 · 2 n − 2 and that the largest disk has to be moved in at least one coupled set of disks. F urther, any element g in H fo r which g  000 ... 0 100 ... 0  =  100 ... 0 200 ... 0  m ust act o n the first le tter as the p ermutation (01 2), which is an ev en permutation. Therefore, the length of g m ust be ev en. T o complete the pro of, all we ne e d to show is that none of the shortest paths (sequences of mov es) of length 2 · 2 n − 2 implicitly mentioned in T able 1 solves the Small Disk Shift Pro ble m. F or the unique s ho rtest path g o f length 2 · 2 n − 2 in Case T op a , e ven n , such that for the top configuration we hav e g (000 . . . 0 ) = 100 . . . 0, tracing the a ction in Figure 4 for the bottom co nfiguration, w e obtain ( bca ) 1 3 (2 n − 1) ( cba ) 1 3 (2 n − 1) (100 . . . 0) = 2 0 1 . . . 1 6 = 200 . . . 0 . F or the unique shortest path g of length 2 · 2 n − 2 in Case Bot a , ev en n , suc h tha t for the b ottom configuration we hav e g (10 0 . . . 0) = 20 0 . . . 0, tracing the a ction in Figure 4 for the top c onfiguration, we o btain ( cbc )( abc ) 1 3 (2 n − 4) ( acb ) 1 3 (2 n − 1) (000 . . . 0) = 101 . . . 1 6 = 10 0 . . . 0 . TWIN TOWERS OF HANOI 13 F or the unique shor test path g o f le ngth 2 · 2 n − 2 in Ca s e Bot b , even n , such that for the b ottom configuration we hav e g (10 0 . . . 0) = 20 0 . . . 0, tracing the a ction in Figure 4 for the top c onfiguration, we o btain ac ( bac ) 1 3 (2 n − 4) ( bca ) 1 3 (2 n − 1) c (000 . . . 0) = 1 02 . . . 2 6 = 100 . . . 0 . F or the unique shor test path g of le ng th 2 · 2 n − 2 in Case T op b , o dd n , such that for the top configuration we hav e g (000 . . . 0 ) = 100 . . . 0, tracing the a ction in Figure 5 for the bottom co nfiguration, w e obtain ( bca ) 1 3 (2 n − 2) ba ( cba ) 1 3 (2 n − 2) (100 . . . 0) = 222 . . . 2 6 = 20 0 . . . 0 . F or the unique shortest path g o f length 2 · 2 n − 2 in Case Bot a , o dd n , such that for the b ottom configuration we hav e g (10 0 . . . 0) = 20 0 . . . 0, tracing the a ction in Figure 5 for the top c onfiguration, we o btain ( acb ) 1 3 (2 n − 2) a ( bca ) 1 3 (2 n − 2) c (000 . . . 0) = 1 11 . . . 1 6 = 100 . . . 0 . Finally , fo r the unique shortest path g o f length 2 · 2 n − 2 in Ca se Bot b , o dd n , such that for the b o tto m configur ation w e ha ve g (1 00 . . . 0) = 20 0 . . . 0, tracing the action in Figure 5 for the top c o nfiguration, we obta in c ( bca ) 1 3 (2 n − 2) b ( acb ) 1 3 (2 n − 2) (000 . . . 0) = 122 . . . 2 6 = 10 0 . . . 0 .  5. General P roblem In this section w e describ e the compatible coupled co nfigurations (r ecov ering the result o f D’Angeli a nd Do nno fro m [DD07]) and then provide an upp er b ound on the distance betw een any compatible co upled configurations. In order to ac c omplish the goa ls of this section, w e need a bit more infor mation on the Hanoi T ow ers group H . In particular, w e rely o n the s e lf- s imilarity of the action of H on the tr e e X ∗ . More o n s elf-similar actions in ge ne r al can b e found in [Nek05]. F or our purpos es the following obser v ations suffice. The ac tion of a , b and c on X ∗ given b y (1 ) can b e rewritten in a recursive form as follows. F or any word u over X , a (0 u ) = 1 u, b (0 u ) = 2 u, c (0 u ) = 0 c ( u ) , a (1 u ) = 0 u, b (1 u ) = 1 b ( u ) , c (1 u ) = 2 u, (2) a (2 u ) = 2 a ( u ) , b (2 u ) = 0 u, c (2 u ) = 1 u. This implies that, for any sequence g of mov es, there ex is t a p ermutation π g of X and three sequences of mov es g 0 , g 1 and g 2 such that, for every w ord u o ver X , (3) g (0 u ) = π g (0) g 0 ( u ) , g (1 u ) = π g (1) g 1 ( u ) , g (2 u ) = π g (2) g 2 ( u ) . The p e rmutation π ( g ) is ca lled the r o ot p ermutation and it indicates the action of g on the first level of the tree (just b elow the ro o t), while g 0 , g 1 and g 2 are called the se ctions of g a nd indicate the action of g b elow the vertices o n the first level. When (3) holds, w e write g = π g ( g 0 , g 1 , g 2 ) and call the expression o n the rig ht a de c omp osition o f g . Note tha t (3 ) may be correct for many different sequences of mov es g 0 (or g 1 or g 2 ), but all these se q uences represent the same elemen t of the group H . Decompo s itions o f the generators a , b and c are giv en b y (4) a = (01) (1 , 1 , a ) , b = (02) (1 , b, 1) , c = (12) ( c, 1 , 1) , 14 ZORAN ˇ SUNI ´ C where 1 denotes the e mpty sequence of mov es (the trivia l automorphism of the tree). Two decomp ositions may b e multiplied b y using the formula (see [Nek0 5] or [G ˇ S07]) (5) g h = π g ( g 0 , g 1 , g 2 ) π h ( h 0 , h 1 , h 2 ) = π g π h ( g h (0) h 0 , g h (1) h 1 , g h (2) h 2 ) . The decompositions of the generators a , b and c given in (4) and the decomp ositio n pro duct formula (5) are s ufficient to ca lculate a deco mpo sition fo r any sequence of mov es . W e refer to such calculations a s decompo sition calculations. Theorem 1 (D’Angeli and Donno [DD07]) . Two c ouple d c onfigur ations U =  u T u B  and V =  v T v B  on n disks ar e c omp atible if and only if the length of the longest c ommon pr efi x of u T and u B is the same as the length of the longest c ommon pr efix of v T and v B . Remark. Note that Theorem 1 implies that the n + 1 sets CΓ n, 0 , CΓ n, 1 , . . . , CΓ n,n , where CΓ n,i consists o f the coupled config ur ations  u T u B  such that the length of the longest co mmon pre fix of u T and u B is i , ar e the connected comp onents of the coupled Hanoi g raph CΓ n . The largest of these sets is CΓ n, 0 . It consists of 6 · 9 n − 1 vertices, whic h are the basic coupled co nfigurations (defined in the intro duction). More generally , the set CΓ n,i has 3 i · 6 · 9 n − 1 − i vertices, for i = 0 , . . . , n − 1, and CΓ n,n has 3 n vertices (moreover, CΓ n,n is canonically isomorphic to Γ n through the isomorphism u ↔  u u  ). Since every tree a utomorphism preserves prefixes, the connected comp onents of the coupled Hanoi graph m ust b e subsets of the sets CΓ n,i . Thus, o nly the other direction (s howing that ea ch of the sets CΓ n,i is connected) is interesting and needs to be proved. Consider the s ubg roup A = h cba, acb , bac i ≤ H (in tro duced in [GN ˇ S06] and called Ap ollonian group, beca us e its limit space is the Ap ollonian g asket). It is known that this subgro up ha s index 4 in H and H / A = C 2 × C 2 (where C 2 is cyclic of order 2). A seq uence of mo ves g b elongs to A if and only if the parities of the nu mber of o ccurrences o f the mov es a , b and c in g a re a ll odd or all even. The elements 1 , a , b, c for m a tra nsversal for A in H . The Schreier graph of the subgr oup A in H is g iven in Figure 7. The vertices are denoted by the coset representativ es (for instance, the v ertex b is the coset bA ).   • a a c b > > > > > > > >   • b a   • 1 c b           • c Figure 7. The Schreier g r aph of A in H Lemma 3 . The Ap ol lonian sub gr oup acts tr ansitively on every level of t he tr e e X ∗ . Pr o of. The claim follows from the fact that H acts transitively on every level o f the tree and tha t, for every generator s in { a, b, c } , there is a lo o p lab eled by s in the Hanoi graph Γ n . Indeed, if g ( u ) = v , for some se q uence of mo ves g , and g is in, sa y , the coset aA , then g ′ g ( u ) = v a nd g ′ g is in A , w he r e g ′ = h − 1 ah and h is any sequence of mov es TWIN TOWERS OF HANOI 15 from v to the vertex 2 n (note that g ′ ∈ aA and g ′ ( v ) = h − 1 ah ( v ) = h − 1 a (2 n ) = h − 1 (2 n ) = v ).  Remark. A small mo dification o f the ab ov e a rgument (using the corner loo ps to mo dify the pa rity o f the num b er o f o c currences o f any ge ner ator) shows that the commutator subgroup H ′ also acts transitively on every lev el of the tree . The fact that H ′ acts trans itively was pro ved in a different wa y by D’Angeli and Donno and used in their pro of of Theorem 1 . W e provide a different proo f o f Theorem 1, based on the transitivity of the action of A , enabling us to pr ovide go o d es timates in the General Problem for basic coupled configurations. Lemma 4. The set CΓ n, 0 of b asic c ouple d c onfigura tions on n disks is c onne cte d. Pr o of. Let  u T u B  and  v T v B  be coupled configurations in CΓ n, 0 . Since H acts transitively on every level of the tr e e , there exists a s equence of mov es h such that h ( u T ) = v T . Let h ( u B ) = v ′ B . Without loss of gene r ality , assume that the top configuratio n v T starts by 2, while the b ottom co nfiguration v B starts b y 0. The co nfiguration v ′ B may start by either 0 or 1. If it starts by 1, a s ingle application of the sequence of 3 mo ves cab = (01) ( a, cb , 1) , do es not affect v T (note the triv ia l se ction a t 2), and c hanges the first letter in the bo ttom configuration to 0. Thus, we may a ssume that both v ′ B and v B start b y 0. W e ar e in terested in sequences of mov es g that do not affect an y configura tio ns that star t b y 2 (and th us do not affect v T ) and k eep the fir st letter in the b ottom configuratio n equal to 0. In other w o rds, we ar e in terested in sequences of mov es that decompos e as g = ( g 0 , ∗ , 1 ) , where ∗ represents the section at 1, in which we are no t in terested. Three s uch sequences ar e (this can b e verified by direct decompo sition ca lcula- tions) cabcab = ( cba, ∗ , 1) bacacaba = ( acb , ∗ , 1 ) , bcbcacac = ( bac , ∗ , 1) . Since h cba, acb , bac i = A , these thr e e decompositio ns imply that, for every sequence of mo ves g 0 in A , ther e exists a sequence of mo ves g in H , and in fact in A , suc h that g = ( g 0 , ∗ , 1 ) . Let v ′ B = 0 v ′ and v B = 0 v . Since A a c ts transitiv ely on each level of the tree, there exists g 0 in A such that g 0 ( v ′ ) = v . Therefor e , there exists g in A such that g ( v ′ B ) = v B and g ( v T ) = v T , completing the pro of that CΓ n, 0 is connected.  The rest of the pro of of Theo rem 1 follows, essent ially , the sa me steps as the original pro of of D’Angeli and Donno and, b eing short, is included for completeness . Indeed, once it is known that the larges t sets CΓ n, 0 are connected, it is s ufficient to observe that H is a self-replicating group. 16 ZORAN ˇ SUNI ´ C Lemma 5. Hanoi T owers gr oup H is a self-r eplic ating gr oup of tr e e automor- phisms, i.e. , for every wor d u over X and every se quenc e of moves g in H , t her e exists a se quenc e of moves h in H s uch t hat, for every wor d w over X , h ( uw ) = ug ( w ) . Pr o of. Let w b e any word over X . Since a (2 w ) = 2 a ( w ) , cbc = 2 b ( w ) , bcb (2 w ) = 2 c ( w ) , it is clear that, for every sequence of mov es g , there exists a sequence of mov es h such that h (2 w ) = 2 g ( w ). By symmetry , for every letter x in X and every sequence of mo ves g , there e xists a sequence of mo ves h such that h ( xw ) = xg ( w ) and the claim easily extends to w ords ov er X (and not just letters).  Pr o of of The or em 1. Let u and u ′ be words of length i and  uw T uw B  and  u ′ w ′ T u ′ w ′ B  be t wo coupled configuratio ns in CΓ n,i . Since H acts transitively on the levels of the tree, there exists a sequence of moves h ′ in H suc h that h ′  uw T uw B  =  u ′ w ′′ T u ′ w ′′ B  , for some w ′′ T and w ′′ B (in fact, o ne ma y easily find suc h h ′ for which w ′′ T = w T and w ′′ B = w B , but this do es not matter). Since CΓ n − i, 0 is connected, there exists a sequence o f mov es g suc h that g  w ′′ T w ′′ B  =  w ′ T w ′ B  . By the self-replicating pro pe r ty of H , there exists a sequence of mo ves h in H such that hh ′  uw T uw B  = h  u ′ w ′′ T u ′ w ′′ B  =  u ′ g ( w ′′ T ) u ′ g ( w ′′ B )  =  u ′ w ′ T u ′ w ′ B  .  Theorem GP ′ (General Problem for bas ic co nfigurations) . The diameter D ( n ) of the lar gest c omp onent CΓ n, 0 of the c ouple d Hanoi gr aph CΓ n (on n disks) satisfies, for n ≥ 3 , the ine qualities 2 × 2 n ≤ D ( n ) ≤ 3 . 66 × 2 n . Pr o of. W e follow the pro of of Lemma 4, but k eep trac k o f the lengths of the se- quences of moves in volv ed and, when w e have a c hoice (a nd know how to make it), try to use short sequences. Let U =  u T u B  and V =  v T v B  be coupled configurations in the larg e st comp onent CΓ n, 0 of the coupled Hanoi gr aph. Without loss of genera lity , assume that the top configuratio n v T starts by 2, while the b ottom configur ation v B starts by 0. There ex ists a sequence of mov es h of length a t most 2 n + 2 such that h ( u T ) = v T and h ( u B ) = v ′ B , for some co nfig uration v ′ B that starts b y 0. Indeed, at mos t 2 n − 1 steps are needed to c hange the top configuratio n from u T to v T , and then at most three mo re steps (r e c all that c ab = (01)( a, cb , 1)) a re needed to make sure that the bo ttom configuration starts b y 0. Let v ′ B = 0 v ′ and v B = 0 v . W e claim that there exists a sequence of mov es g 0 in A such that g 0 ( v ′ ) = v and the num b er of mov es in the sequence g 0 is no greater than 2 n − 1. Indeed, if the shortest sequence of moves g s betw een v ′ and v happ ens to be in A we may set g 0 = g s (note that v ′ and v ar e vertices in the Hanoi graph Γ n − 1 of diameter 2 n − 1 − 1 ). If g s happ ens to b e, say , in the coset aA , we ma y set g 0 = g (2) ag (1) , where g (1) is the shortest sequence of moves from v ′ to 2 n − 1 and g (2) is the shortest seq ue nc e of mov es fro m 2 n − 1 to v . The length of the sequence g 0 = g (2) ag (1) is no g reater than 2 (2 n − 1 − 1) + 1 = 2 n − 1. Since TWIN TOWERS OF HANOI 17 the sequence of mo ves g − 1 s g (2) g (1) represents a closed path in the gra ph Γ n − 1 that do es not go throug h any of the corner lo ops and s ince all cycles in Γ n − 1 other than the three co rner lo ops ar e lab eled by elements in A , the sequence g − 1 s g (2) g (1) is in A . Therefore g 0 A = g (2) ag (1) A = ag (2) g (1) A = ag s A = aaA = A, which is what we needed. Direct decomp osition calculatio ns give bab ( cba ) 2 bab = ( acaba, ∗ , 1) abc ( acb ) 2 cba = ( bab cb, ∗ , 1) , cb ( cba ) 2 bc = ( cbca c, ∗ , 1 ) , and therefore, for any k ≥ 0, bab ( cba ) 2 k +2 bab = ( a ( cab ) k +1 a, ∗ , 1 ) , abc ( acb ) 2 k +2 cba = ( b ( abc ) k +1 b, ∗ , 1 ) , (6) cb ( cba ) 2 k +2 bc = ( c ( bca ) k +1 c, ∗ , 1 ) . This calculatio n justifies the en tries in the top thr ee rows of T able 2. In this case f f 0 ℓ ( f ) ℓ ( f 0 ) ratio a − ← − a bab ( cba ) 2 k +2 bab a ( cab ) k +1 a 6 k + 12 3 k + 5 2 . 4 b − ← − b abc ( acb ) 2 k +2 cba b ( abc ) k +1 b 6 k + 12 3 k + 5 2 . 4 c − ← − c cb ( cba ) 2 k +2 bc c ( bca ) k +1 c 6 k + 10 3 k + 5 2 cabcab cba 6 3 2 c − ← − a cabcb ( cba ) 2 k +2 bab cb ( cab ) k +1 a 6 k + 14 3 k + 6 2 . 34 bacacaba acb 8 3 2 . 67 a − ← − b bacacac ( acb ) 2 k +2 cba ac ( abc ) k +1 b 6 k + 16 3 k + 6 2 . 67 bcbcacac bac 8 3 2 . 67 b − ← − c bcbcacbcb ( cba ) 2 k +1 bc ba ( bca ) k +1 c 6 k + 14 3 k + 6 2 . 34 bcbcacbcab baba 10 4 2 . 5 b − ← − a bcbcacbcb ( cba ) 2 k +2 bab bab ( ca b ) k +1 a 6 k + 18 3 k + 7 2 . 58 cabacaba cbcb 8 4 2 c − ← − b cabacac ( acb ) 2 k +2 cba cbc ( abc ) k +1 b 6 k + 16 3 k + 7 2 . 29 babcbabc acac 8 4 2 a − ← − c bab ( cba ) 2 k +3 bc aca ( bca ) k +1 c 6 k + 14 3 k + 7 2 T able 2. Sequences of mov es fixing v T and moving v ′ B table, f is a sequence of mo ves a nd f 0 is the cor resp onding section a t 0. The first letter of any word is fixed by f and the section a t 2 is trivial. In other words, f decomp oses as f = ( f 0 , ∗ , 1 ) . 18 ZORAN ˇ SUNI ´ C The lengths of the sequences f and f 0 , as written, are ℓ ( f ) and ℓ ( f 0 ), and the ratio in the la st column is the r atio ℓ ( f ) / ℓ ( f 0 ) (in the rows that dep end on k , the r atio is the maxim um p ossible ratio, taken for k ≥ 0 and ro unded up). The entries in the re maining rows in T able 2 are easy to verify . F or insta nce, for case c − ← − a , b y direct decomp osition calculation, (7) cabcab = ( cba, ∗ , 1) and the en try in the next row is obtained simply b y multiplying the equalit y (7) and the first equalit y in (6) cabcb ( cba ) 2 k +2 bab = ( cabc )( abb a ) b ( cba ) 2 k +2 bab ) = ( cabcab )( bab ( cba ) 2 k +2 bab ) = = ( cba, ∗ , 1)( a ( cab ) k +1 a, ∗ , 1 ) = ( cbaa ( cab ) k +1 a, ∗ , 1 ) = = ( cb ( cab ) k +1 a, ∗ , 1 ) . All other ca ses are equally easy to verify (by verifying directly the basic ca se, and then m ultiplying it by a co rresp onding e q uality from (6) to obtain the ca ses depe nding on k ). Consider g 0 as defined ab ov e . There is no occur rence of aa , bb o r cc in this sequence (since w e alwa ys chose the shortest paths a s w e built g 0 ) and it is in A . The sequence g 0 is a pr o duct of factors each of which has the form of o ne of the ent ries in co lumn f 0 in T able 2 or their inv erses. Mo reov er, the decompo sition is s uch that the length of g 0 is the sum of the lengths of the factor s. Indeed, the entries in co lumn f 0 and their in verses are all possible sequences of moves in A without o ccurrenc e o f aa , bb o r cc for which no prop er s uffix is in A . Such sequences corresp ond pr ecisely to pa ths without bac ktracking in the Schreier graph in Fig ure 7 that star t at 1, end a t 1 a nd do not visit the v e rtex 1 except at the very b eginning and at the very end. There are 18 such t yp es of paths, three choices for the first s tep ( a , b or c ) to leav e v ertex 1, three c hoices for the la st step ( a , b or c ) to go back to vertex 1, and tw o choices for the o rientation (order) used to lo op around the three vertices (co s ets) a , b a nd c b efore the return to 1 (positive or nega tive orient ation). The column f 0 in the table only lists the 9 p o ssible paths with negative orientation (and classifies the 9 cas e s by the first and last mov e), since the other 9 are just in verses of the en tries in the table. F o r instance, the notation c − ← − a indicates pa ths (sequences of mo ves) that start by the mov e a and end b y the mov e c . Once g 0 is appr opriately facto red, T able 2 can b e used to define g of length no greater than 2 . 66 ℓ ( g 0 ) ≤ 2 . 66(2 n − 1) such that g  v T v ′ B  =  v T v B  . Thu s, we may a rrive from the initial coupled co nfiguration  u T u B  to the final coupled configuration  v T v B  in no mo r e than (2 n + 2 ) + 2 . 66(2 n − 1 ) ≤ 3 . 66 × 2 n mov es .  It is evident that go o d understanding of the structure of CΓ n, 0 , for a ll n , provides go o d understa nding of CΓ n,i , for all n and i . F or ins tance, the understanding of the graphs CΓ 1 , 0 (6 vertices, dia meter 2) a nd CΓ 2 , 0 (54 vertices, diameter 6) enabled the author to determine the exact v alues o f the diameter of the t wo smallest nontrivial comp onents CΓ n,n − 1 and CΓ n,n − 2 , fo r any num b er of disk s . F or insta nce, the diameter of CΓ n,n − 1 is, for n ≥ 1, equal to 7 6 2 n − 3 + ( − 1) n 6 . TWIN TOWERS OF HANOI 19 The details will appear in a future work. References [DD07] Daniele D’Angeli and Alfredo Donno. Self-similar groups and finite Gelf and pairs. A lge- br a Discr ete Math. , (2):54–69, 2007. [GN ˇ S06] Rostislav Grigorch uk, V olo dymyr Nekrashevyc h, and Zoran ˇ Suni ´ c. Hanoi tow ers groups. Ob e rwolfach R ep orts , 19:11–14, 2006. [G ˇ S06] Rostislav Grigorch uk and Zoran ˇ Suni ´ k. Asymptotic asp ects of Schreier graphs and Hanoi To wers groups. C. R. Math. A c ad. Sci. Paris , 342(8) :545–550, 2006. [G ˇ S07] Rostislav Gri gorc huk and Zoran ˇ Suni ´ c. Self -simil arity and br anching in group th eory . In Gr oups St. Andr ews 2005. Vol. 1 , v ol um e 339 of L ondon Math. So c . L e ct ur e Note Ser. , pages 36–95. Cambridge Univ. Pr ess, Cam bridge, 2007 . [G ˇ S08] Rostislav Grigorch uk and Zoran ˇ Suni ´ c. Schreier sp ectrum of the Hanoi Tow ers group on three p egs. In Analysis on gr aphs and i ts applic ations , v olume 77 of Pr o c. Symp os. Pur e Math. , page s 183–198. Amer. Math. So c., Providence, RI, 2008. [Hin89] Andreas M. Hinz. The Tow er of H anoi. Enseign. Math. (2) , 35(3-4):289– 321, 1989. [Nek05] V olo dymyr N ekrashevyc h. Self-similar gr oups , vo lume 117 of Mathematic al Surveys and Mono gr aphs . American Mathemat ical Society , Providence, RI, 2005. [Rom06] D. Romik. Shortest paths in the To wer of Hanoi graph and finite automata. SIAM J. Disc. Math. , 20:610–622, 2006. Dep ar tment of Mat hema tics, Texas A&M University, College St a tion, TX 77 843- 3368, USA E-mail addr ess : sunic@math. tamu.edu

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment