{
  "aliases": null,
  "backlinks": [
    {
      "field": "about",
      "target": "97QF3KHSBY"
    }
  ],
  "body": "\n## Example\n\nThe Ackermann function, in the two-argument form of Rózsa Péter, is the function $A \\colon \\N \\times \\N \\to \\N$ given by\n$$A(0, n) = n + 1, \\qquad A(m + 1, 0) = A(m, 1), \\qquad A(m + 1, n + 1) = A(m, A(m + 1, n)).$$\nIt is a total [[computable function|KZSB5E471K]].\nEach right-hand side calls $A$ at a pair that is smaller in the lexicographic order on $\\N \\times \\N$.\nThis order is a well-order, so the recursion stops on every input and gives an algorithm for $A$.\n\n## Remarks\n\nBy induction on $n$, one gets $A(1, n) = n + 2$, $A(2, n) = 2n + 3$ and $A(3, n) = 2^{n+3} - 3$.\nThen $A(4, 0) = A(3, 1) = 13$ and $A(4, 1) = A(3, 13) = 2^{16} - 3 = 65533$.\nThe function $A$ is not [[primitive recursive|5NVA2JRHPV]], see [[Ackermann function is not primitive recursive|97QF3KHSBY]].\n\n## Explanations\n\n### L1 human\n\nThe Ackermann function is a simple rule that produces enormous numbers very quickly.\nIts first argument chooses the operation: adding, then something like multiplying, then something like taking powers, and so on.\nThe values $A(4, n)$ are already huge: $A(4, n) + 3$ is a tower of $n + 3$ twos, such as $A(4, 1) + 3 = 2^{2^{2^2}}$.\nIt was built to show that some computable functions cannot be defined with bounded loops alone.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "instance_of": [
      "KZSB5E471K"
    ],
    "kind": "example",
    "msc": [
      "03D20"
    ],
    "name": "Ackermann function",
    "same_as": {
      "wikidata": "Q341835",
      "wikipedia": "Ackermann function"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Ackermann_function"
      }
    ],
    "tag": "N470JF7ZJX"
  },
  "kind": "example",
  "link": "https://math2.tamnd.com/node/N470JF7ZJX/",
  "links": [
    {
      "field": "instance_of",
      "target": "KZSB5E471K"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/N470JF7ZJX.md",
  "msc": [
    "03D20"
  ],
  "name": "Ackermann function",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/N47/N470JF7ZJX.md",
  "status": null,
  "tag": "N470JF7ZJX",
  "uri": "m2://N470JF7ZJX",
  "url": "https://math2.tamnd.com/wiki/ackermann-function/",
  "writing": {
    "tag": "N470JF7ZJX",
    "kind": "example",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
