{
  "api_version": "v1",
  "publisher": {
    "name": "Manazoo",
    "url": "https://manazoo.com/"
  },
  "license": "All rights reserved（AI の参照・要約と出典リンクつきの引用は可。転載・再配布・販売は不可）",
  "terms_url": "https://manazoo.com/terms/",
  "disclaimer": "内容の正確さには気をつけていますが、すべてが正しいとは限りません。テストや受験の前には、教科書や先生の説明でも確かめてください。間違いを見つけたら意見箱から知らせてください。",
  "attribution": "事実データの一部は Wikidata（CC0）による。単元の構成は文部科学省「中学校学習指導要領」「高等学校学習指導要領」（政府標準利用規約2.0）。",
  "kind": "entity",
  "slug": "tower-of-hanoi",
  "name": "ハノイの塔と再帰的な考え",
  "entity_kind": "concept",
  "wikidata_qid": "Q213593",
  "wikidata_url": "https://www.wikidata.org/wiki/Q213593",
  "canonical_url": "https://manazoo.com/math/tower-of-hanoi/",
  "api_url": "https://manazoo.com/api/v1/entities/tower-of-hanoi.json",
  "course": {
    "slug": "math-a",
    "title": "数学A",
    "url": "https://manazoo.com/high/math-a/"
  },
  "unit": {
    "slug": "mathematics-and-human-activities",
    "title": "数学と人間の活動",
    "url": "https://manazoo.com/high/math-a/mathematics-and-human-activities/"
  },
  "period": null,
  "place": null,
  "summary_points": [
    "ハノイの塔は、3本の棒の間で円盤を1枚ずつ、小さい円盤の上に大きい円盤を乗せないという規則で移し替えるパズルである。",
    "n枚の円盤をすべて移すのに必要な最少回数は、n−1枚を移す回数の2倍に1を足した数になり、2ⁿ−1回で表せる。",
    "自分より1つ小さい場合の答えを使って答えを組み立てる、この考え方を再帰的な考えという。"
  ],
  "facts": null,
  "key_points": [
    {
      "term": "ハノイの塔",
      "note": "3本の棒の間で円盤を1枚ずつ、小さい円盤の上に大きい円盤を乗せずに移し替えるパズル"
    },
    {
      "term": "再帰的な考え",
      "note": "同じ種類で規模が1つ小さい問題の答えを使って、もとの問題の答えを組み立てる考え方"
    },
    {
      "term": "2ⁿ−1",
      "note": "n枚の円盤を移すのに必要な最少回数"
    }
  ],
  "summary": null,
  "causality": null,
  "timeline": [],
  "related": {
    "cause": [],
    "result": [],
    "people": [],
    "same_period_japan": []
  },
  "questions": [
    {
      "id": "q-hanoi-min-moves-n4",
      "type": "input",
      "prompt": "円盤が4枚のとき、ハノイの塔を解くのに必要な最少回数を求めよ。",
      "choices": null,
      "answer": "15",
      "accept": [
        "15回"
      ],
      "explanation": "a(n)＝2ⁿ−1より、a(4)＝2⁴−1＝16−1＝15。",
      "entities": [
        "tower-of-hanoi"
      ],
      "verified": true,
      "placeholder": false
    },
    {
      "id": "q-hanoi-min-moves-n5",
      "type": "input",
      "prompt": "円盤が5枚のとき、ハノイの塔を解くのに必要な最少回数を求めよ。",
      "choices": null,
      "answer": "31",
      "accept": [
        "31回"
      ],
      "explanation": "a(n)＝2ⁿ−1より、a(5)＝2⁵−1＝32−1＝31。",
      "entities": [
        "tower-of-hanoi"
      ],
      "verified": true,
      "placeholder": false
    },
    {
      "id": "q-hanoi-analogous-puzzle-pick",
      "type": "choice",
      "prompt": "次のうち、ハノイの塔と同じように規則を見つけて手順を組み立てる数学的なパズルはどれか。",
      "choices": [
        "油分け算",
        "度数分布表",
        "二次方程式",
        "三角比"
      ],
      "answer": 0,
      "accept": [],
      "explanation": "「塵劫記」の油分け算も、決められた枡で油を分ける規則を見つけて手順を組み立てるパズルだ。ハノイの塔と同じ数学的な考え方を使う。",
      "entities": [
        "tower-of-hanoi"
      ],
      "verified": true,
      "placeholder": false
    },
    {
      "id": "q-hanoi-general-formula-pick",
      "type": "choice",
      "prompt": "n枚の円盤をすべて移すのに必要な最少回数を表す式はどれか。",
      "choices": [
        "2n−1",
        "2ⁿ−1",
        "n！−1",
        "n²−1"
      ],
      "answer": 1,
      "accept": [],
      "explanation": "a(n)＝2×a(n−1)＋1という関係を解くと、a(n)＝2ⁿ−1になる。",
      "entities": [
        "tower-of-hanoi"
      ],
      "verified": true,
      "placeholder": false
    }
  ],
  "sources": [
    {
      "label": "文部科学省「高等学校学習指導要領（平成30年告示）解説 数学編 理数編」（数学A (3)数学と人間の活動 イ(ｲ) ハノイの塔・再帰的な考え p.98〜99）",
      "url": "https://www.mext.go.jp/content/20260115-mxt_kyoiku02-100002620_04.pdf"
    },
    {
      "label": "コトバンク「塵劫記」（デジタル大辞泉ほか）",
      "url": "https://kotobank.jp/word/%E5%A1%B5%E5%8A%AB%E8%A8%98-81671"
    }
  ],
  "media": [
    {
      "src": "/media/tower-of-hanoi/hanoi-three-pegs-setup.png",
      "alt": "棒A・B・Cのうち棒Aに大きさの違う円盤を重ねた、ハノイの塔の初期配置を示した図",
      "license": "オリジナル（コードで作図）",
      "author": "Asatte Studio（Manazoo）",
      "source_url": "https://manazoo.com/credits/",
      "section": "formula",
      "caption": "ハノイの塔の3本の棒と円盤の初期配置の図"
    },
    {
      "src": "/media/tower-of-hanoi/hanoi-move-sequence-n3.png",
      "alt": "3枚の円盤を7手で棒Aから棒Cへ移す手順を、3手・1手・3手の3つのまとまりで示した図",
      "license": "オリジナル（コードで作図）",
      "author": "Asatte Studio（Manazoo）",
      "source_url": "https://manazoo.com/credits/",
      "section": "example",
      "caption": "円盤3枚を7手で移す手順をまとめた図"
    }
  ],
  "status": "published",
  "placeholder": false,
  "updated_at": "2026-10-22"
}