## Abstract

We deal here with Tower of Hanoi variants played on digraphs. A major source for such variants is achieved by adding pegs and/or restricting direct moves between certain pairs of pegs. It is natural to represent a variant of this kind by a directed graph whose vertices are the pegs, and an arc from one vertex to another indicates that it is allowed to move a disk from the former peg to the latter, provided that the usual rules are not violated. We denote the number of pegs by h. For example, the variant with no restrictions on moves is represented by the Complete graph K_{h}; the variant in which the pegs constitute a cycle and moves are allowed only in one direction is represented by the uni-directional graph Cyclic_{h}. For all 3-peg variants, the number of moves grows exponentially fast with n. However, for h ≥ 4 pegs, this is not the case. For example, for Cyclic_{h} the number of moves is exponential for any h, while for a path on 4 vertices it is O(√n3^{√2n}). This paper characterizes the graphs for which the transfer of a tower of size n of disks from a peg to another requires exponentially many moves as a function of n. To this end we introduce the notion of a shed, as a graph property. A vertex v in a strongly-connected directed graph G = (V,E) is a shed if the subgraph of G induced by V (G) − {υ} contains a strongly connected subgraph on 3 or more vertices. Graphs with sheds will be shown to be much more efficient than those without sheds, for the particular domain of the Tower of Hanoi puzzle. Specifically, we show how, given a shed, we can indeed move a tower of disks from any peg to any other within O(λ^{nα}) moves, where λ > 1 and α= 1/2 +o(1). For graphs without a shed, this is impossible.

Original language | English |
---|---|

Pages (from-to) | 461-479 |

Number of pages | 19 |

Journal | Journal of Graph Algorithms and Applications |

Volume | 20 |

Issue number | 2 |

DOIs | |

State | Published - 1 Jan 2016 |

## ASJC Scopus subject areas

- Theoretical Computer Science
- General Computer Science
- Computer Science Applications
- Geometry and Topology
- Computational Theory and Mathematics