Chapter 8

Undecidability and reductions

An undecidability proof rules out an algorithm for all inputs. It does not say that every instance is difficult, or that a positive instance can never be recognised.

8.1 Fundamental undecidable problems

Write ⟨M,w⟩\langle M,w\rangle for an effective encoding of a machine and its input. Invalid encodings can be rejected by a finite syntactic check. The acceptance problem asks whether MM accepts ww; the halting problem asks whether it halts, either accepting or rejecting.

A Post Correspondence Problem (PCP) instance is a finite list of string pairs (ui,vi)(u_i,v_i). It asks for a nonempty sequence of indices, with repetition allowed, such that the concatenated upper and lower strings agree. PCP is RE (enumerate index sequences), but undecidable. A bound on sequence length makes the search finite. Matching individual pairs is sufficient but not necessary for a solution.

8.2 Mapping reductions

Past papers · CS 2014–2026 (23 papers): 2 questions, 3 marks

Known fact when A≤mBA\le_m BForced conclusion
AA undecidableBB undecidable
AA not REBB not RE
BB decidableAA decidable
BB REAA RE
AA decidableNo general classification of BB
BB undecidable or not RENo general classification of AA

8.3 Rice's theorem and finite witnesses

Past papers · CS 2014–2026 (23 papers): 3 questions, 6 marks

Examples include whether L(M)L(M) is empty, finite, infinite, regular, context-free, decidable, universal, contains a specified string, or has at least a fixed positive number of members. These properties are nontrivial among RE languages. “Is L(M)L(M) RE?” is trivial: every TM language is RE.

Rice's theorem proves undecidability, not recognisability. For nonemptiness, “contains a fixed string”, “accepts some string of a fixed length”, and “has at least kk strings” for fixed k≥1k\ge1, dovetail simulations until enough accepting witnesses appear: these properties are RE and undecidable. Their complements are not RE. Finiteness, infiniteness, universality and equivalence of arbitrary TM languages require stronger classification arguments if RE/co-RE status is requested; undecidability alone does not settle that status.

8.4 Bounded observations versus unbounded behaviour

Past papers · CS 2014–2026 (23 papers): 2 questions, 4 marks

A fixed finite simulation answers whether MM reaches a state in exactly tt steps on a specified input, whether it accepts within tt steps, or whether it halts by then. Here tt is a supplied finite integer, not an unbounded existential time variable.

Even quantification over all input strings is decidable for a fixed time bound. In tt moves a standard head starting at the first input cell can inspect only a bounded initial segment. Enumerate all strings up to length t+1t+1; every longer input has the same first t+1t+1 symbols as one of these, hence the same first tt steps. This covers both “some input” and “every input” bounded-time questions.

8.5 Decision-problem comparison

Past papers · CS 2014–2026 (23 papers): 4 questions, 6 marks

The entries concern arbitrary finite descriptions in the named representation. D means decidable and U means undecidable. In the CFG column, NPDA is an equivalent input representation.

ProblemDFA/NFA/regexCFG/NPDATM recogniser
Membership of a given wordDDU
EmptinessDDU
FinitenessDDU
UniversalityDUU
Equivalence of two descriptionsDUU
Inclusion of one language in anotherDUU
Disjointness of two languagesDUU
Is the generated language regular?Always yesUU

CFG–regular mixed tests require care. C∩R=∅C\cap R=\varnothing and C⊆RC\subseteq R are decidable, because CFL intersection with REG and CFL emptiness are effective. R⊆CR\subseteq C and C=RC=R are undecidable in general, since choosing R=Σ∗R=\Sigma^* includes CFG universality. Equivalence of two DPDAs is decidable, but that deeper result does not extend to arbitrary PDAs; no DPDA equivalence algorithm is needed for revision here.

For a promised TM decider, membership is decidable by running it, but emptiness, universality and equivalence remain undecidable as properties of its language. A finite input does not make an unbounded computation search finite.

Last-minute recall

  • Acceptance and halting are different questions; both are undecidable for TMs.
  • Their positive instances are recognisable by simulation.
  • Hardness travels forward along a reduction; decidability travels backward.
  • A reduction preserves no-instances as well as yes-instances.
  • Rice requires a nontrivial property of the language itself.
  • A finite positive witness can establish recognisability.
  • Fixed-time questions admit finite simulation, including quantification over inputs.
  • CFG membership is decidable while CFG equivalence is undecidable.

Revise offline: the whole Theory of Computation handbook as one PDF

40 pages · 1.7 MBFree to read online. Sign in to download the PDF.We save the handbook, version and request time in My downloads. Privacy policy

All chapters · Corrections