Towers of Hanoi: incremental solutions
1 day, n=1,2: (c4 c3 cpn c4 by2 c3 by2 exec)
3 days, n=1,2,3:(c3 dec boostq defnp c4 calltp c3 c5 calltp endnp)
4 days: n=4, n=5, …, n=30: by same recursive program.
345,450,362,522 instructions
678,634,413,962 time steps
longest single run: 33 billion steps (5% of total time!)
top stack size for restoring storage: < 20,000
Back to J. Schmidhuber's OOPS page