A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Ackermann Function

Graduate Depth 81 in the knowledge graph ☐ I know this ☆ Set as goal
157topics build on this
407prerequisites beneath it
See this on the map →
Primitive Recursive Functions→→General Recursive Functions and the μ-OperatorMu-Recursive Functions
computability recursive-functions fast-growing-hierarchy

Core Idea

The Ackermann function is a total computable function that grows faster than any primitive recursive function, proving that the primitive recursive functions do not exhaust all total computable functions. It is defined by double recursion: A(0, n) = n+1, A(m+1, 0) = A(m, 1), and A(m+1, n+1) = A(m, A(m+1, n)). Even small inputs produce astronomically large outputs — A(4, 2) exceeds 1019,000. The function demonstrates that the primitive recursive hierarchy, despite containing all common arithmetic operations and bounded loops, is strictly contained within the total computable functions.

How It's Best Learned

Compute A(m, n) by hand for small values (m = 0, 1, 2, 3 and small n) and recognize the pattern: A(1, n) = n+2, A(2, n) = 2n+3, A(3, n) = 2n+3 - 3. Then understand why A(4, n) involves towers of exponents. This concretely demonstrates growth beyond any fixed level of the primitive recursive hierarchy.

Common Misconceptions

Explainer

From your study of primitive recursive functions, you know that every primitive recursive function is built up from zero, successor, and projection using composition and primitive recursion — a scheme where the recursion on n is bounded in advance by a fixed number of steps. Addition is defined by recursing on the second argument for n steps; multiplication by recursing on addition n times; exponentiation by recursing on multiplication n times. Each new operation uses the previous one as a primitive, forming a layered hierarchy. The key limitation: each primitive recursive definition only reaches one level higher than what it builds on.

The Ackermann function A(m, n) escapes this hierarchy by using *double recursion* — recursing simultaneously on both m and n. The base cases are simple: A(0, n) = n+1 is just the successor function. A(1, n) = n+2 is essentially repeated successor (addition). A(2, n) = 2n+3 corresponds to multiplication. A(3, n) = 2n+3 − 3 corresponds to exponentiation. So the first argument m selects a "level" of the arithmetic hierarchy: successor, addition, multiplication, exponentiation, tetration (tower of exponents), and beyond. Each new level is not just faster than the previous — it is a qualitatively new kind of growth.

Here is why A(4, 2) becomes incomprehensibly large: A(4, 2) = A(3, A(4, 1)) = A(3, A(3, A(4, 0))) = A(3, A(3, A(3, 1))). Each A(3, k) produces a tower of 2s of height k+3. So A(3, 1) = 24 − 3 = 13, A(3, 13) = 216 − 3 = 65533, A(3, 65533) is a tower of 65536 twos — and we are not done yet. The final result exceeds 1019,000. The double recursion means that even computing A(m, 0) for large m requires unwinding a cascade of recursive calls that span all previous levels.

The significance for computability theory is precise: for every primitive recursive function f, there exists an N such that A(n, n) > f(n) for all n > N. This means A is not bounded by any fixed level of the primitive recursive hierarchy. No matter how many times you nest the primitive recursion scheme, Ackermann's growth escapes it. Yet A is still computable — a Turing machine can evaluate it using a stack to track the recursive calls. This separates two concepts you might have conflated: "having a nice closed-form recursion scheme" and "being computable at all." The Ackermann function lives in the gap between primitive recursive and the full class of total computable functions, proving that gap is nonempty.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Introduction to Propositional Logic → Introduction to Predicate Logic (First-Order Logic) → First-Order Logic Syntax → ZFC Axioms Overview → Axiom Schema of Separation → Axiom Schema of Replacement → Von Neumann Ordinals → Hereditarily Finite Sets → Recursive Definitions on Finite Sets → Natural Numbers in Set Theory: Iterative Construction → Formal Arithmetic and Expressibility → Primitive Recursive Functions → Ackermann Function

Longest path: 82 steps · 407 total prerequisite topics

Prerequisites (1)

Leads To (2)