APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Computer Program Detail Page

Item Picture
Hanoi Towers Puzzle Model
written by Tyler Murray
The Hanoi Towers Puzzle Model shows a stack of different sized disks on the left most of three posts.  The objective is to move the stack of disks from the left post to the right post while only moving one disk at a time and never placing larger disks on top of smaller disks.  The puzzle is easily solved with stacks of one or two disks, but the complexity quickly grows as the number of disks increases.  For example, three disks can be solved with seven moves, but seven disks require 127 moves.  The user may manually solve the Hanoi Towers problem using the arrow buttons at the bottom of the display, but the main feature of the model is the recursive algorithm used to solve the puzzle algorithmically.

The Hanoi Towers Model was developed using the Easy Java JavaScript Simulation (EjsS) modeling tool.  It is distributed as a ready-to-run (compiled) Java archive.   Double clicking the jar file will run the program if Java is installed.  You can modify this simulation if you have EJS installed by right-clicking within the map and selecting "Open Ejs Model" from the pop-up menu item.

Please note that this resource requires at least version 1.7 of Java (JRE).
1 source code document is available
Subjects Levels Resource Types
General Physics
- Computational Physics
Mathematical Tools
- Problem-Solving Techniques
- Lower Undergraduate
- Middle School
- High School
- Instructional Material
= Simulation
Intended Users Formats Ratings
- Learners
- Educators
- General Publics
- application/java
  • Currently 0.0/5

Want to rate this material?
Login here!

Access Rights:
Free access
This material is released under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.
Rights Holder:
Tyler Murray
Record Cloner:
Metadata instance created September 15, 2014 by Wolfgang Christian
Record Updated:
September 15, 2014 by Wolfgang Christian
Last Update
when Cataloged:
September 15, 2014
ComPADRE is beta testing Citation Styles!

Record Link
AIP Format
T. Murray, Computer Program HANOI TOWERS PUZZLE MODEL (2014), WWW Document, (https://www.compadre.org/Repository/document/ServeFile.cfm?ID=13343&DocID=3913).
T. Murray, Computer Program HANOI TOWERS PUZZLE MODEL (2014), <https://www.compadre.org/Repository/document/ServeFile.cfm?ID=13343&DocID=3913>.
APA Format
Murray, T. (2014). Hanoi Towers Puzzle Model [Computer software]. Retrieved February 27, 2024, from https://www.compadre.org/Repository/document/ServeFile.cfm?ID=13343&DocID=3913
Chicago Format
Murray, Tyler. "Hanoi Towers Puzzle Model." https://www.compadre.org/Repository/document/ServeFile.cfm?ID=13343&DocID=3913 (accessed 27 February 2024).
MLA Format
Murray, Tyler. Hanoi Towers Puzzle Model. Computer software. 2014. Java (JRE) 1.7. 27 Feb. 2024 <https://www.compadre.org/Repository/document/ServeFile.cfm?ID=13343&DocID=3913>.
BibTeX Export Format
@misc{ Author = "Tyler Murray", Title = {Hanoi Towers Puzzle Model}, Month = {September}, Year = {2014} }
Refer Export Format

%A Tyler Murray %T Hanoi Towers Puzzle Model %D September 15, 2014 %U https://www.compadre.org/Repository/document/ServeFile.cfm?ID=13343&DocID=3913 %O application/java

EndNote Export Format

%0 Computer Program %A Murray, Tyler %D September 15, 2014 %T Hanoi Towers Puzzle Model %8 September 15, 2014 %U https://www.compadre.org/Repository/document/ServeFile.cfm?ID=13343&DocID=3913

Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.

Citation Source Information

The AIP Style presented is based on information from the AIP Style Manual.

The APA Style presented is based on information from APA Style.org: Electronic References.

The Chicago Style presented is based on information from Examples of Chicago-Style Documentation.

The MLA Style presented is based on information from the MLA FAQ.

Hanoi Towers Puzzle Model:

Is Based On Easy Java Simulations Modeling and Authoring Tool

The Easy Java Simulations Modeling and Authoring Tool is needed to explore the computational model used in the Hanoi Towers Puzzle Model.

relation by Wolfgang Christian

Know of another related resource? Login to relate this resource to it.
Save to my folders


Related Materials

Similar Materials

OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book