Algorithms & EmergenceRecursion

The Tower of Hanoi

Moving 64 disks would take longer than the universe has existed

Three pegs and a few disks: a toy for children. So why would finishing the big version take longer than the universe has existed?

You'll find out

  • The one trick that solves any tower
  • Why one more disk doubles the work
  • Where else this pattern hides

Why it matters

This is how programmers think: crack a big problem by solving a smaller copy of it first.

About 3 min6 interactive slides · 5 questionsLesson 76 · Zone 9

Play this lesson

Free to play in your browser or on iPhone

More in this zone

  1. 73Computer ArchitectureThe Desk and the WarehouseComputers keep a tiny super-fast memory for what you'll need next
  2. 74Reliable NetworkingThe Lost PacketMissing pieces are requested again without restarting everything
  3. 75Visual EffectsWhy Weather Presenters Never Wear GreenOne color can be replaced with an entire world
  4. 77Safety EngineeringOtis Cut the RopeElevators became safe when one inventor cut his own cable in public
  5. 78Graph TheoryThe Bridges of KönigsbergA Sunday-stroll puzzle invented a whole branch of math
  6. 79ProbabilityThe Sticker Album ProblemFinding the last few stickers takes longer than the rest combined
  7. 80Audio EngineeringThe Phantom SingerTwo speakers can put a voice where there's no speaker at all
  8. 81Internet HistoryThe Internet's First Word Was ‘LO’The first message crashed after two letters