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 FunctionsGeneral 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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraIntroduction to Propositional LogicIntroduction to Predicate Logic (First-Order Logic)First-Order Logic SyntaxZFC Axioms OverviewAxiom Schema of SeparationAxiom Schema of ReplacementVon Neumann OrdinalsHereditarily Finite SetsRecursive Definitions on Finite SetsNatural Numbers in Set Theory: Iterative ConstructionFormal Arithmetic and ExpressibilityPrimitive Recursive FunctionsAckermann Function

Longest path: 82 steps · 407 total prerequisite topics

Prerequisites (1)

Leads To (2)