Skip to content

11.5 Undecidability Results

Extensions of undecidability using reductions and general results such as Rice’s theorem.

The halting problem is the first major example of an undecidable problem. Once we know that one problem is undecidable, we can use it to prove that many other problems are undecidable too.

A decision problem asks for a yes-or-no answer. In computability theory, we usually represent a decision problem as a language:

LΣ L \subseteq \Sigma^*

A machine decides LL if it always halts and gives the correct answer:

Input wwCorrect behavior
wLw \in Laccept
wLw \notin Lreject

If such a machine exists, then LL is decidable.

If no such machine exists, then LL is undecidable.

Recognizable and Decidable

A language is recognizable if there is a machine that accepts exactly the strings in the language.

For wLw \in L, the machine eventually accepts.

For wLw \notin L, the machine may reject or run forever.

So recognizable means we can eventually confirm yes-instances, but we may fail to confirm no-instances.

A language is decidable if both yes and no cases are handled in finite time.

PropertyYes caseNo case
recognizableeventually acceptreject or loop
decidableeventually accepteventually reject

Every decidable language is recognizable, but not every recognizable language is decidable.

The halting language:

$$ \mathrm{HALT}_{\mathrm{TM}}

{\langle M,w\rangle : M \text{ halts on } w} $$

is recognizable but undecidable.

Reductions

A reduction transforms one problem into another.

Suppose we have two languages:

A A

and

B B

A many-one reduction from AA to BB is a computable function:

f:ΣΣ f : \Sigma^* \to \Sigma^*

such that:

wAf(w)B w \in A \quad \Longleftrightarrow \quad f(w) \in B

We write:

AmB A \le_m B

This means that problem AA can be translated into problem BB.

The direction matters. If:

AmB A \le_m B

and BB is decidable, then AA is decidable.

So if AA is known to be undecidable and:

AmB A \le_m B

then BB must also be undecidable.

Otherwise, a decider for BB would give a decider for AA.

Proving Undecidability by Reduction

To prove that a problem BB is undecidable, we usually do this:

  1. Start with a known undecidable problem AA.
  2. Build a computable transformation ff.
  3. Show: wAf(w)B w \in A \quad \Longleftrightarrow \quad f(w) \in B
  4. Conclude that BB is undecidable.

This is a standard pattern. It lets us reuse one hard impossibility result many times.

Example: Emptiness of Turing Machine Languages

Define:

$$ E_{\mathrm{TM}}

{\langle M\rangle : L(M)=\varnothing} $$

This problem asks whether a machine accepts no strings at all.

We will show that ETME_{\mathrm{TM}} is undecidable.

The idea is to reduce from the acceptance problem:

$$ A_{\mathrm{TM}}

{\langle M,w\rangle : M \text{ accepts } w} $$

Given an input:

M,w \langle M,w\rangle

construct a new machine NN as follows.

On input xx:

  1. Ignore xx.
  2. Simulate MM on ww.
  3. If MM accepts ww, accept xx.

Now observe:

If MM accepts ww, then NN accepts every input xx. So:

L(N)=Σ L(N)=\Sigma^*

In particular:

L(N) L(N)\neq\varnothing

If MM does not accept ww, then NN accepts no input. So:

L(N)= L(N)=\varnothing

Therefore:

M,wATMNETM \langle M,w\rangle \in A_{\mathrm{TM}} \quad \Longleftrightarrow \quad \langle N\rangle \notin E_{\mathrm{TM}}

This gives a reduction from ATMA_{\mathrm{TM}} to the complement of ETME_{\mathrm{TM}}. It shows that deciding emptiness would let us decide acceptance, which is impossible.

So ETME_{\mathrm{TM}} is undecidable.

Example: Equivalence of Machines

Define:

$$ EQ_{\mathrm{TM}}

{\langle M_1,M_2\rangle : L(M_1)=L(M_2)} $$

This problem asks whether two Turing machines accept exactly the same language.

It is undecidable.

One way to see this is to reduce emptiness to equivalence.

Let MM_{\varnothing} be a fixed machine that rejects every input. Then:

L(M)= L(M_{\varnothing})=\varnothing

Given a machine MM, ask whether:

L(M)=L(M) L(M)=L(M_{\varnothing})

This is exactly the question whether:

L(M)= L(M)=\varnothing

So if EQTMEQ_{\mathrm{TM}} were decidable, then ETME_{\mathrm{TM}} would be decidable.

But ETME_{\mathrm{TM}} is undecidable. Therefore:

EQTM EQ_{\mathrm{TM}}

is undecidable.

Rice’s Theorem

Many undecidability results about Turing machines are instances of one general theorem.

Rice’s theorem says that every nontrivial semantic property of Turing-machine languages is undecidable.

A property is semantic if it depends only on the language accepted by the machine, not on the machine’s internal code.

A property is nontrivial if some machines have it and some machines do not.

Examples of semantic properties:

PropertyQuestion
emptinessis L(M)=L(M)=\varnothing?
finitenessis L(M)L(M) finite?
universalityis L(M)=ΣL(M)=\Sigma^*?
contains a worddoes L(M)L(M) contain 001001?
regularityis L(M)L(M) regular?

Each of these properties is undecidable by Rice’s theorem, provided we ask the question for arbitrary Turing machines.

Rice’s theorem does not apply to purely syntactic properties. For example:

Does M have exactly 10 states? \text{Does } M \text{ have exactly } 10 \text{ states?}

This is decidable by inspecting the machine description.

The theorem concerns what the machine computes, not how the machine is written.

Totality

Another important undecidable problem is totality.

Define:

$$ \mathrm{TOTAL}_{\mathrm{TM}}

{\langle M\rangle : M \text{ halts on every input}} $$

This asks whether a machine is total as a function or decision procedure.

It is undecidable.

The intuition is simple. If we could decide whether MM halts on every input, then we could solve many termination questions. But arbitrary termination behavior is already undecidable.

Totality is even harder than the ordinary halting problem in some formal classifications, but the key point here is that no algorithm can decide it for all machines.

Decidable Islands

Undecidability does not mean every problem is hopeless.

Many restricted problems are decidable. For example:

  • emptiness for finite automata is decidable
  • equivalence for deterministic finite automata is decidable
  • membership for context-free grammars is decidable
  • type checking for many programming languages is decidable
  • termination for simple loop-free programs is decidable

The boundary matters. Turing machines are powerful enough to express arbitrary computation. Once a model reaches that level of power, many global questions about its behavior become undecidable.

Why Reductions Matter

Reductions organize undecidable problems.

They let us say that one problem is at least as hard as another:

AmB A \le_m B

If AA is impossible to decide, and AA reduces to BB, then BB is also impossible to decide.

This gives computability theory a structure. Problems are not merely labeled decidable or undecidable. They are compared by how much computational difficulty they contain.

Undecidability results show that there are precise limits to algorithmic reasoning. The issue is not lack of cleverness or lack of hardware. Some decision problems cannot be solved by any algorithm.