4.6.15 · D4Theory of Computation

Exercises — Church-Turing thesis

2,489 words11 min readBack to topic

Before we start, one reminder of the vocabulary we will lean on, stated in plain words so no symbol is used unexplained:


Level 1 — Recognition

Exercise 1.1 (L1)

True or false, with one-line reason each: (a) CTT is a proven theorem. (b) A 100-tape Turing machine can compute functions a 1-tape machine cannot. (c) The Halting problem is decidable because CTT says everything is computable.

Recall Solution 1.1

(a) False. CTT equates an informal notion ("effectively calculable") with a formal one (Turing machines). There is no formal object standing for the informal side, so there is nothing to prove against. It is a hypothesis backed by evidence. (b) False. Extra tapes change only speed, never the set of computable functions. A 1-tape machine can simulate any -tape machine. (c) False. CTT never says "everything is computable." It says "if something is computable at all, a Turing machine does it." The Halting Problem is undecidable, and CTT actually makes that impossibility universal.

Exercise 1.2 (L1)

From the list — Turing Machine, Lambda Calculus, Mu-Recursive Functions, register machines — which define the same class of functions?

Recall Solution 1.2

All of them. That collapse of independent definitions onto one class is the central evidence for CTT:


Level 2 — Application

Exercise 2.1 (L2)

Show that the doubling function is primitive recursive, hence Turing-computable. Use only the base functions ( = zero, = successor , projections) and the addition rule

Recall Solution 2.1

Idea: . We already have from the parent note. So define This is composition: feed the input into both argument slots of an already-computable function. Formally , where just returns its input. Composition of computable functions is computable, so is primitive recursive. Check:

Exercise 2.2 (L2)

"Is a perfect square?" — argue it is decidable without drawing a Turing machine. Name the exact step where you use CTT.

Recall Solution 2.2

Step 1 (finite mechanical procedure): loop up to ; if output yes; if output no. Bounded loop always halts. Step 2 (invoke CTT — this is the licensed leap): a finite mechanical always-halting procedure exists by CTT a Turing Machine exists that decides it. We skip constructing the machine. Therefore "is a perfect square" is decidable. Check example: yes; we pass , hit no. ✓


Level 3 — Analysis

Exercise 3.1 (L3)

The parent note says primitive recursion (only for loops) misses some computable functions, and that minimization (while) closes the gap. Pinpoint the property of that primitive recursion lacks, and explain why that property is exactly what real programs need.

Recall Solution 3.1

The missing property: unbounded search. A primitive-recursive for loop must decide its bound before it starts — you say "repeat times" up front. That guarantees halting but forbids "keep going until a condition is met, however long that takes." Minimization is a while loop: try with no ceiling, stopping the instant hits . If no such exists, it runs forever — producing a partial function. Why real programs need it: actual code contains while loops that can loop forever (e.g. searching for a proof, waiting for a solution that may not exist). Any model that only had for loops would be too tame to model real software. The Mu-Recursive Functions add exactly this one wild card, and the result equals the Turing-computable functions — a theorem, on top of which CTT adds the informal identification.

Exercise 3.2 (L3)

Classify each as total or possibly partial, and say which is expressible with primitive recursion alone: (a) (factorial) (b) (return if it's a perfect square).

Recall Solution 3.2

(a) Total, primitive recursive. Factorial is a bounded ladder: — a for loop, always halts. No needed. (b) Partial, needs . For it finds and halts. For (not a perfect square) no satisfies , so the search runs forever — undefined on non-squares. This partiality is the fingerprint of genuine minimization. Numeric checks: ; ; diverges. ✓


Level 4 — Synthesis

Exercise 4.1 (L4)

A friend claims: "I built a machine with an extra oracle button that, in one step, tells me whether any program halts. Since solves the Halting problem, CTT is false." Dismantle this argument. Where exactly does it break?

Recall Solution 4.1

The argument confuses two different claims.

  • What CTT actually says: every effectively calculable function is Turing-computable. "Effectively calculable" means computable by a finite mechanical rule with no magic — pencil, paper, patience.
  • What the oracle is: a non-mechanical black box. Pressing a button that answers an undecidable question in one step is not a finite mechanical procedure — no pencil-and-paper recipe produces that answer. So is not an effectively calculable device. Therefore lies outside the domain CTT quantifies over. CTT says nothing about hypercomputers/oracles; it only claims that among ordinary mechanical processes, Turing machines are maximal. Conclusion: the oracle machine doesn't refute CTT — it just isn't the kind of thing CTT talks about. (If oracles were physically buildable, that would challenge the Strong/physical thesis, but nobody has built one; the Halting Problem remains undecidable for real machines.)

Exercise 4.2 (L4)

Using CTT, upgrade the statement "no Turing machine decides halting" into "no algorithm of any kind decides halting." Write the two-line logical chain and mark where CTT enters.

Recall Solution 4.1b

Line 1 (a theorem, proved by diagonalization): no Turing Machine decides the halting problem. Line 2 (apply CTT — the leap): by CTT, any algorithm is realizable as some Turing machine. Contrapositive: if no Turing machine does it, then no algorithm does it — in any model (Python, -calculus, register machine, human with paper). Where CTT enters: exactly at "any algorithm = some Turing machine." Without CTT you could only say "this one model fails"; with CTT the impossibility becomes universal, closing every loophole across all models at once.


Level 5 — Mastery

Exercise 5.1 (L5)

Separate the standard CTT from the Strong (physical) CTT. For each of the following, state which thesis (if either) it stresses, and whether that thesis is currently in trouble: (a) A quantum computer factors integers exponentially faster than any known classical algorithm. (b) A hypothetical device outputs a function that no Turing machine computes. (c) A multi-tape machine sorts a list in fewer steps than a single-tape one.

Recall Solution 5.1

Recall the two theses:

  • Standard CTT — about what is computable (the set of functions). Widely accepted.
  • Strong/physical CTT — about how efficiently: any physically realizable device is simulable by a Turing machine with at most polynomial slowdown. Contested.

(a) Stresses the Strong thesis only. Quantum speed-up is about time, not new functions — quantum machines compute the same set as Turing machines. Whether they beat classical machines by more than polynomial factors is exactly the tension around the Strong thesis (see P vs NP and Computational Complexity). Standard CTT is untouched. (b) Attacks the Standard thesis — this would be genuine hypercomputation, computing a non-Turing function. But no such device has ever been built or shown physically realizable, so Standard CTT stands. (This is the L4 oracle again, dressed up.) (c) Neither thesis is threatened. A polynomial (indeed linear-factor) speed-up is permitted by the Strong thesis; it computes identical functions, just faster. This is ordinary and expected.

Exercise 5.2 (L5)

Design (in English + one -expression) a -recursive definition of the integer part of the base-2 logarithm, for , and argue its totality. Then explain why CTT lets you assert, from this construction alone, that a Python one-liner and a Turing machine for both exist.

Recall Solution 5.2

Idea: is "the largest with ," equivalently "the smallest such that ." That "smallest with a condition" is precisely a job for minimization: Here is built by repeated multiplication (primitive recursive), and the comparison is primitive recursive too, so is computable. Totality: for every there is always some with (powers of 2 grow without bound), so the search halts on every input — is total. (We could have used bounded recursion, but is the most direct phrasing of "smallest with…".) Why CTT gives you the Python + Turing machine for free: we exhibited as -recursive. The theorem already hands you a Turing Machine. CTT then adds the informal identification: since is effectively calculable, any reasonable model — including Python — computes it. You built it once, in one model, and CTT lets you claim it in all of them. Checks:

The whole logical machinery of this page — build in one model, transport to all — is one diagram:

Figure — Church-Turing thesis

Recall One-screen self-test (cover the answers)

Standard CTT is about ::: what is computable (the set of functions). Strong/physical CTT is about ::: how fast — polynomial-slowdown simulability. Which loop type does add over primitive recursion? ::: unbounded while (may not halt) → partial functions. Why is halting's undecidability "universal"? ::: CTT makes "no Turing machine" equal "no algorithm at all". Does an oracle machine refute CTT? ::: No — it isn't a mechanical procedure, so it's outside CTT's scope. = ::: 3.