Skip to main content

Which Multi-peg Tower of Hanoi Problems Are Exponential?

  • Conference paper
  • 965 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7551))

Abstract

Connectivity properties are very important characteristics of a graph. Whereas it is usually referred to as a measure of a graph’s vulnerability, a relatively new approach discusses a graph’s average connectivity as a measure for the graph’s performance in some areas, such as communication. This paper deals with Tower of Hanoi variants played on digraphs, and proves they can be grouped into two categories, based on a certain connectivity attribute to be defined in the sequel.

A major source for Tower of Hanoi 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 K h graph; the variant in which the pegs constitute a cycle and moves are allowed only in one direction — 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 peg variants, this is not the case. Whereas for Cyclic h the number of moves is exponential for any h, for most of the other graphs it is sub-exponential. For example, for a path on 4 vertices it is \(O(\sqrt{n}3^{\sqrt{2n}})\), for n disks.

This paper presents a necessary and sufficient condition for a graph to be an H-subexp, i.e., a graph for which the transfer of n disks from a peg to another requires sub-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 − {v} 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 graph with a shed, we can indeed move a tower of n disks from any peg to any other within O(2εn) moves, where ε > 0 is arbitrarily small.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Allouche, J.-P., Astoorian, D., Randall, J., Shallit, J.: Morphisms, squarefree strings, and the Tower of Hanoi puzzle. Amer. Math. Monthly 101, 651–658 (1994)

    Article  MathSciNet  Google Scholar 

  2. Allouche, J.-P., Sapir, A.: Restricted Towers of Hanoi and Morphisms. In: De Felice, C., Restivo, A. (eds.) DLT 2005. LNCS, vol. 3572, pp. 1–10. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  3. Atkinson, M.D.: The cyclic Towers of Hanoi. Inform. Process. Lett. 13, 118–119 (1981)

    Article  MathSciNet  MATH  Google Scholar 

  4. Azriel, D., Berend, D.: On a question of Leiss regarding the Hanoi Tower problem. Theoretical Computer Science 369, 377–383 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  5. Berend, D., Sapir, A.: The Cyclic multi-peg Tower of Hanoi. Trans. on Algorithms 2(3), 297–317 (2006)

    Article  MathSciNet  Google Scholar 

  6. Berend, D., Sapir, A.: The diameter of Hanoi graphs. Inform. Process. Lett. 98, 79–85 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  7. Berend, D., Sapir, A., Solomon, S.: Subexponential upper bound for the Path multi-peg Tower of Hanoi. Disc. Appl. Math (2012)

    Google Scholar 

  8. Chen, X., Shen, J.: On the Frame-Stewart conjecture about the Towers of Hanoi. SIAM J. on Computing 33(3), 584–589 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  9. Dinitz, Y., Solomon, S.: Optimality of an algorithm solving the Bottleneck Tower of Hanoi problem. Trans. on Algorithms 4(3), 1–9 (2008)

    Article  MathSciNet  Google Scholar 

  10. Dudeney, H.E.: The Canterbury Puzzles (and Other Curious Problems). E. P. Dutton, New York (1908)

    Google Scholar 

  11. Er, M.C.: The Cyclic Towers of Hanoi: a representation approach. Comput. J. 27(2), 171–175 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  12. Er, M.C.: A general algorithm for finding a shortest path between two n-configurations. Inform. Sci. 42, 137–141 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  13. Frame, J.S.: Solution to advanced problem 3918. Amer. Math. Monthly 48, 216–217 (1941)

    Article  MathSciNet  Google Scholar 

  14. Guan, D.-J.: Generalized Gray codes with applications. Proc. Natl. Sci. Counc. ROC(A) 22(6), 841–848 (1998)

    Google Scholar 

  15. Klavžar, S., Milutinović, U., Petr, C.: On the Frame-Stewart algorithm for the multi-peg Tower of Hanoi problem. Disc. Appl. Math. 120(1-3), 141–157 (2002)

    Article  MATH  Google Scholar 

  16. Klein, C.S., Minsker, S.: The super Towers of Hanoi problem: large rings on small rings. Disc. Math. 114, 283–295 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  17. Leiss, E.L.: Solving the “Towers of Hanoi” on graphs. J. Combin. Inform. System Sci. 8(1), 81–89 (1983)

    MathSciNet  MATH  Google Scholar 

  18. Lucas, É.: Récréations Mathématiques, vol. III. Gauthier-Villars, Paris (1893)

    MATH  Google Scholar 

  19. Lunnon, W.F., Stockmeyer, P.K.: New Variations on the Tower of Hanoi. In: 13th Intern. Conf. on Fibonacci Numbers and Their Applications (2008)

    Google Scholar 

  20. Minsker, S.: The Towers of Antwerpen problem. Inform. Process. Lett. 38(2), 107–111 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  21. Minsker, S.: The Linear Twin Towers of Hanoi problem. Bulletin of ACM SIG on Comp. Sci. Education 39(4), 37–40 (2007)

    Article  Google Scholar 

  22. Minsker, S.: Another brief recursion excursion to Hanoi. Bulletin of ACM SIG on Comp. Sci. Education 40(4), 35–37 (2008)

    Article  Google Scholar 

  23. Minsker, S.: The classical/linear Hanoi hybrid problem: regular configurations. Bulletin of ACM SIG on Comp. Sci. Education 41(4), 57–61 (2009)

    Article  Google Scholar 

  24. Pólya, G., Szegő, G.: Problems and Theorems in Analysis, vol. I. Springer (1972)

    Google Scholar 

  25. Sapir, A.: The Tower of Hanoi with forbidden moves. Comput. J. 47(1), 20–24 (2004)

    Article  MATH  Google Scholar 

  26. Scorer, R.S., Grundy, P.M., Smith, C.A.B.: Some binary games. Math. Gazette 280, 96–103 (1944)

    Article  Google Scholar 

  27. Stewart, B.M.: Advanced problem 3918. Amer. Math. Monthly 46, 363 (1939)

    Article  MathSciNet  Google Scholar 

  28. Stewart, B.M.: Solution to advanced problem 3918. Amer. Math. Monthly 48, 217–219 (1941)

    Google Scholar 

  29. Stockmeyer, P.K.: Variations on the Four-Post Tower of Hanoi puzzle. Congr. Numer. 102, 3–12 (1994)

    MathSciNet  Google Scholar 

  30. Stockmeyer, P.K.: Tower of hanoi bibliography (2005), http://www.cs.wm.edu/~pkstoc/biblio2.pdf

  31. Szegedy, M.: In How Many Steps the k Peg Version of the Towers of Hanoi Game Can Be Solved? In: Meinel, C., Tison, S. (eds.) STACS 1999. LNCS, vol. 1563, pp. 356–361. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Berend, D., Sapir, A. (2012). Which Multi-peg Tower of Hanoi Problems Are Exponential?. In: Golumbic, M.C., Stern, M., Levy, A., Morgenstern, G. (eds) Graph-Theoretic Concepts in Computer Science. WG 2012. Lecture Notes in Computer Science, vol 7551. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34611-8_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-34611-8_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-34610-1

  • Online ISBN: 978-3-642-34611-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics