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

Formal Models of Computation: Turing Machines and Lambda Calculus

Graduate Depth 85 in the knowledge graph ☐ I know this ☆ Set as goal
26topics build on this
478prerequisites beneath it
See this on the map →
Set Theory FundamentalsThe Church-Turing Thesis+3 more→→Recursive Languages: The Decidable LanguagesTuring Degrees and Degrees of Unsolvability
computation turing-machines lambda-calculus church-turing

Core Idea

Turing machines and the lambda calculus are formal models that formalize the intuitive notion of 'algorithm' and 'computable function'. The Church-Turing thesis asserts that these models, despite superficial differences, capture exactly the same class of computable functions—those computable by any reasonable mechanical process.

How It's Best Learned

Study Turing machines and lambda calculus in parallel; show explicit translations between them. Implement a simple Turing machine simulator to build intuition.

Common Misconceptions

Explainer

Your prerequisite on the Church-Turing thesis established the central claim: any function computable by a "reasonable mechanical process" is computable by a Turing machine. But what exactly is a Turing machine? And why should a completely different formalism — the lambda calculus — compute the same class of functions? Understanding both models concretely, and then seeing why they coincide, is the core payoff of this topic.

A Turing machine is an idealized device with three components: an infinite tape of cells (each holding a symbol from a finite alphabet), a read/write head that can move left or right one cell at a time, and a finite set of states with a transition table. At each step, the machine reads the current cell, consults its transition table to determine the next state, the symbol to write, and which direction to move the head. The machine halts when it enters a designated accepting or rejecting state. This is spare, mechanical, and concrete — you can simulate it on paper. The entire computational history of the machine is visible in the tape, the head position, and the current state. From your set-theoretic background, note that a Turing machine is formally just a tuple (Q, Σ, δ, q₀, F) where Q is a finite set of states, Σ is an alphabet, δ: Q × Σ → Q × Σ × {L,R} is the transition function, q₀ is the initial state, and F ⊆ Q is the accepting states.

The lambda calculus reaches the same computational universe from a completely different angle. Instead of states and tapes, everything is a function. There are only three constructs: variables (x), abstractions (λx.e, defining a function), and applications (e₁ e₂, applying a function to an argument). Computation proceeds by β-reduction: (λx.e) v reduces to e[v/x], substituting v for x in the body. Even numbers and booleans must be encoded as functions (Church encodings), which initially feels absurd but turns out to be entirely workable. The Church encoding of the number 2 is λf.λx.f(f(x)) — the function that applies f twice to x. All arithmetic, conditionals, and even recursion can be built from these three primitives alone.

What makes their equivalence surprising is that the two models look nothing alike. Turing machines are imperative: they modify state step by step. Lambda calculus is functional: it rewrites expressions by substitution. Yet every lambda calculus term can be simulated by a Turing machine (mechanically rewrite the term according to reduction rules), and every Turing machine can be encoded in the lambda calculus (represent the tape, head, and state as a data structure and iterate). The equivalence is not a coincidence — it reflects the Church-Turing thesis, which you already know is a philosophical claim rather than a theorem. No one has yet found a naturally arising computational model that computes more functions than either.

An important caution follows from the common misconception: equivalent computability does not mean equivalent complexity. A problem solvable in 10 steps on a Turing machine may require exponentially many beta-reductions in the lambda calculus, and vice versa. The class of computable functions — those with a halting computation — is the same for both models. But when you ask how efficiently a function can be computed, the choice of model matters enormously, and different Turing machine variants (deterministic, nondeterministic, multi-tape) define complexity classes that may differ. The models are equivalent in power, not in speed.

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 → General Recursive Functions and the μ-Operator → Mu-Recursive Functions → The Church-Turing Thesis → Formal Models of Computation: Turing Machines and Lambda Calculus

Longest path: 86 steps · 478 total prerequisite topics

Prerequisites (5)

Leads To (2)