Background: What Rice's Theorem Talks About
Rice's theorem is about properties of the language recognized by a Turing machine, not properties of the machine's syntax. If a property depends only on \(L(M)\), then it is semantic.
Reference: Rice's theorem (Wikipedia)
Semantic vs Syntactic
- Semantic: "\(L(M)\) is empty", "\(L(M)\) is regular", "\(L(M)\) is finite".
- Syntactic: "\(M\) has exactly 12 states", "\(M\)'s start state is \(q_3\)".
Rice applies only to semantic properties of recursively enumerable languages.
Trivial vs Non-trivial Property
A property \(\mathcal{P}\) of RE languages is:
- Trivial if either every RE language has \(\mathcal{P}\), or none has \(\mathcal{P}\).
- Non-trivial if some RE language has \(\mathcal{P}\) and some RE language does not.
Rice's theorem: every non-trivial semantic property is undecidable.
Quick Intuition
If we could decide any non-trivial property of \(L(M)\), we could indirectly decide deep behavior questions like acceptance, which is impossible by the undecidability of \(A_{TM}\).
Machine, Input, and Language of the Decision Problem
Objects
- Machine under test: a Turing machine \(M\).
- Input to the decider: the encoding \(\langle M \rangle\).
- Underlying language of \(M\): \(L(M)=\{x\mid M \text{ accepts } x\}\).
Property Language Form
For any semantic property \(\mathcal{P}\) of RE languages, define:
Reference Undecidable Language
We reduce from:
\(A_{TM}\) is undecidable.
Theorem Statement (Rice)
Let \(\mathcal{P}\) be a non-trivial property of RE languages. Then \(L_{\mathcal{P}}\) is undecidable.
Formal Proof of Rice's Theorem
Proof Flow Diagram
Takeaway: Any total decider for a non-trivial semantic property would force a decider for \(A_{TM}\), which is impossible.
Undecidable Property Examples via Rice's Theorem
For each example below, the input is \(\langle M\rangle\), and we ask whether \(L(M)\) has the stated property.
Example 1: Emptiness
Example 2: Non-emptiness
Example 3: Finiteness
Example 4: Infiniteness
Example 5: Regularity
Example 6: Universality
Important Boundary
Rice's theorem does not apply to syntactic properties of machine descriptions. Example: "Does \(M\) have exactly 7 states?" is decidable by direct inspection of \(\langle M\rangle\).