The best unsolvable graphs

On a question of
Leiss regarding
the Towers of
Hanoi problem
1
Introduction
The classic problem (3 pegs)
 The generalization:
A Hanoi graph is a finite directed graph with two
distinct vertices denoted by S,D. such that for each
vertex v V there is a path from S to v and a path
from v to D. The source initially contains m discs,
no two of which are of equal size, such that smaller
discs rest on top of larger ones.

2
The task is to move the m discs from S to D.
To this end we may use the other vertices
of G. the transfer is subject to the rules of
the classic problem, in addition we add
the following rule:

A disk may be moved from a peg v to
another peg w only if there is an edge
from v to w.
3
Definitions and problem
description


The Hanoi Towers problem
HAN(G,m) for m >= 0 is to transfer
the m disks from S to D, subject to
the above rules.
HAN(G,m) is solvable if the task
may be accomplished. G is
solvable if HAN(G,m) is such for all
m > 0.
4
Leiss (1983) obtained the following characterization
of solvable graphs.
Theorem : Let G  (V , E ) be a Hanoi graph, and let
*
G be its transitiv e closure :
E *  {( v, w) : v  w, there is a path from v to w}
then G is solvable if and only if there exist thre e
distinct v ertices v1 , v2 , v3  V such that (vi , v j )  E
*
for 1  i, j  3, i  j.
5
The main result


An unsolvable graph G has a
maximal m for which HAN(G,m) is
solvable. Denote it by M(G).
There is a maximal such m for
graphs with n vertices. Denote this
maximum by g n ,
i.e. g n  max |V (G )|n M (G)
6
We prove the following:
Theorem : There exists a constant C such that
g n  Cn
1
log n
2
for each n.
On the other hand, for each ε  0 there exist a
constant C  0 such that
g n  C n
1
(  ) log n
2
for each n.
7
The best unsolvable
graphs
We characterize a family of graphs
which are (among) the “best” within
the family of unsolvable graphs;
more accurately:
 An unsolvable Hanoi graph
G=(V,E) is a ladder graph if E(G) is
maximal with respect to G being
unsolvable (i.e. by adding an edge
to G, one makes it solvable)
8
The following lemma shows that if G is a ladder
graph, then the set of edges, E, coincides with its
transitive closure.
Lemma : If G  (V , E ) is a ladder graph and there
is a path from u V to v  V , then (u, v)  E.
Let G=(V,E) be a ladder graph. Define an equivalence
relation on V by:
u  v if either u  v or both (u, v)  E and (v, u )  E.
Define an ordering on the set of equivalence classes:
A  B if either A  B or there are vertices u  A
and v  B such that (u , v)  E.
9
Lemma : If G is a ladder graph, then the relation 
forms a total ordering on V '  V /  .
Corrolary : Given a ladder graph G  (V , E ), the ordering 
partitions V into equivalenc e classes A1 ,..., Ar of sizes 1 or 2,
such that : E  {( u, v) : u  v, u  Ai , v  A j , i  j}.
Note that the decomposition into equivalence classes has the
property that there are no two consecutive Ai ' s of size 1.
According to the last corrolary, if G is an unsolvable graph
then it is possible to add to it some edges so that it will
become a ladder graph. Hence, to prove the main result
we may restrict ourselves to ladder graphs.
10
The sequence
(gn )
Lemma : The sequence g n is strictly increasing .
The following lemma will be useful in estimating the
numbers g n . It will be convenient to encode legal
sequences of moves of disks by sequences of
edges of G.
Lemma : Let G be a ladder graph. If HAN (G, m)
is solvable, then it has a solution in which t he
largest disk moves only once.
11
In view of the last lemma, we may restrict ourselves to
solutions of HAN(G,m) in which the largest disk
moves but once.
Lemma : Write V/  { A1 ,..., Ar } where
A1  A2  ...  Ar . Let v  V \ {S , D}, and Ai be
the  -equivalen ce class containing v.
Put n1 | 
i
j 1
A j | and n2 | 
r
j i
A j | . Given any
solution of HAN (G , m), the number of disks
residing at v at the stage when the largest disk
moves from S to D does not exceed g min( n1 ,n2 ) .
12
The following lemma gives us an upper bound for the
sequence g n .
Lemma : We have g 2  1, and for n  3 :
n
1
2
2 g i  1,
gn 
n  0(mod 2),
i 3
n 1
2
2 g i  3 g n 1  1,
i 3
n  1(mod 2).
2
13
The upper bound of ( g n )
Let (an )  n  2 be the sequence defined by the initial
condition a2  1 and, for n  3, by the recurrence
relation :
n
1
2
2 ai  1,
an 
n  0(mod 2),
i 2
n 1
2
2 ai  3a n 1  1,
i 2
n  1(mod 2).
2
14
Clearly for all n  2, g n  an . Thus it is sufficient to
prove:
Lemma : There is a constant C such that
an  Cn
1
logn
2
for n  2.
15