首页    期刊浏览 2024年12月01日 星期日
登录注册

文章基本信息

  • 标题:Selenite Towers Move Faster Than Hanoï Towers, But Still Require Exponential Time
  • 本地全文:下载
  • 作者:J{\'e}r{\'e}my Barbay
  • 期刊名称:LIPIcs : Leibniz International Proceedings in Informatics
  • 电子版ISSN:1868-8969
  • 出版年度:2016
  • 卷号:49
  • 页码:5:1-5:20
  • DOI:10.4230/LIPIcs.FUN.2016.5
  • 出版社:Schloss Dagstuhl -- Leibniz-Zentrum fuer Informatik
  • 摘要:The Hanoi Tower problem is a classic exercise in recursive programming: the solution has a simple recursive definition, and its complexity and the matching lower bound correspond to the solution of a simple recursive function (the solution is so simple that most students memorize it and regurgitate it at exams without truly understanding it). We describe how some minor change in the rules of the Hanoi Tower yields various increases of difficulty in the solution, so that to require a deeper mastery of recursion than the classical Hanoi Tower problem. In particular, we analyze the Selenite Tower problem, where just changing the insertion and extraction positions from the top to the middle of the tower results in a surprising increase in the intricacy of the solution: such a tower of n disks can be optimally moved in 3^(n/2) moves for n even (i.e. less than a Hanoi Tower of same height), via 5 recursive functions (or, equivalently, one recursion function with five states following three distinct patterns).
  • 关键词:Br{\"a
国家哲学社会科学文献中心版权所有