{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Example\n\nThe Tower of Hanoi is a puzzle with three rods and $n$ discs of different sizes.\nAt the start, all discs are on one rod, in order of size, with the largest at the bottom.\nA move takes the top disc of one rod and puts it on top of another rod.\nNo move may put a disc on a smaller disc.\nThe aim is to move all discs to another rod.\n\nLet $T_n$ be the minimum number of moves for $n$ discs.\nThen $T_0 = 0$ and $T_n = 2 T_{n-1} + 1$ for $n \\ge 1$.\nThis [[recurrence relation|07TZV87Y0T]] has the solution $T_n = 2^n - 1$.\n\n## Remarks\n\nThe recurrence comes from the largest disc. Before it moves, the other $n - 1$ discs must be on the third rod. After it moves, they must come back on top of it.\nValues: $T_1 = 1$, $T_2 = 3$, $T_3 = 7$ and $T_4 = 15$.\nThe French mathematician Édouard Lucas invented the puzzle and presented it in 1883.\n\n## Explanations\n\n### L1 human\n\nTo move a tower of $n$ discs, first move the top $n - 1$ discs out of the way. Then move the largest disc, and then move the $n - 1$ discs back on top.\nEach new disc doubles the work and adds one move.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "instance_of": [
      "0FYX44GP92"
    ],
    "kind": "example",
    "msc": [
      "00A08"
    ],
    "name": "Tower of Hanoi",
    "same_as": {
      "wikidata": "Q213593",
      "wikipedia": "Tower of Hanoi"
    },
    "sources": [
      {
        "locator": "Recursive solution",
        "url": "https://en.wikipedia.org/wiki/Tower_of_Hanoi"
      }
    ],
    "tag": "0906Z03EMN"
  },
  "kind": "example",
  "link": "https://math2.tamnd.com/node/0906Z03EMN/",
  "links": [
    {
      "field": "instance_of",
      "target": "0FYX44GP92"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0906Z03EMN.md",
  "msc": [
    "00A08"
  ],
  "name": "Tower of Hanoi",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/090/0906Z03EMN.md",
  "status": null,
  "tag": "0906Z03EMN",
  "uri": "m2://0906Z03EMN",
  "url": "https://math2.tamnd.com/wiki/tower-of-hanoi/",
  "writing": {
    "tag": "0906Z03EMN",
    "kind": "example",
    "level": "W2",
    "next": [
      {
        "what": "a person confirmed each agent-written section",
        "note": "rule P04",
        "have": 0,
        "want": 1
      }
    ]
  }
}
