Sub topic 12
Rice's Theorem and Non-Trivial Properties
Prerequisites and the main idea
Assume you know Turing machines, acceptance, the language recognized by a machine, and many-one reductions. Rice's theorem classifies properties of that recognized language.
A property is semantic when it depends only on the language \(L(M)\), not on the machine's particular states or transitions. The property is non-trivial when some Turing machines have it and some do not.
Rice's theorem
Rice's theorem: Every non-trivial semantic property of the language recognized by a Turing machine is undecidable.
In other words, no algorithm can always examine an arbitrary Turing machine and determine whether its language has such a property.
Examples of semantic properties include:
- \(L(M)=\varnothing\)
- \(L(M)\) is finite
- \(L(M)\) is regular
- \(L(M)=\Sigma^*\)
- \(L(M)\) contains the empty string
- \(L(M)\) is decidable
Each property depends on what strings the machine accepts. It does not depend on how the machine is written.
| Property of a Turing machine | Rice's theorem applies? | Reason |
|---|---|---|
| \(L(M)\) is empty | Yes | It concerns the recognized language |
| \(L(M)\) is regular | Yes | It concerns the recognized language |
| \(M\) has exactly 20 states | No | It concerns the machine's syntax |
| The start state is named `q0` | No | Renaming states changes nothing semantically |
Reduction proof pattern
Suppose a non-trivial property \(P\) were decidable by an algorithm \(D\). Because \(P\) is non-trivial, choose machines whose languages differ with respect to \(P\).
Given an instance \(\langle M,w\rangle\) of the acceptance problem, construct a new machine \(N\). On input \(x\), machine \(N\) first simulates \(M\) on \(w\).
- If \(M\) accepts \(w\), \(N\) behaves like a chosen machine whose language has \(P\).
- If \(M\) never accepts \(w\), \(N\) accepts nothing.
If the empty language has \(P\), reverse the two choices: use a machine whose language does not have \(P\) after the simulation succeeds. Since \(P\) is non-trivial, one of these constructions distinguishes the two cases.
Therefore, running \(D\) on \(N\) would decide whether \(M\) accepts \(w\). That would decide \(A_{TM}\), which is impossible. Hence \(D\) cannot exist.
GATE decision checklist
When a problem asks whether a property is decidable:
- Ask whether the property concerns \(L(M)\).
- Check whether some machines satisfy it and some do not.
- If both answers are yes, apply Rice's theorem.
- If it concerns states, transitions, running time, or encoding format, Rice's theorem does not directly apply.
Exercise
Is the problem “Does a given Turing machine accept at least one string?” undecidable?
Show answer
Yes. This asks whether L(M) is nonempty, a non-trivial semantic property. Rice's theorem applies.