Rice’s Theorem: Short Note with an Application
Rice’s theorem is a foundational result in computability theory stating that there is no general algorithm to decide interesting properties of the language recognized by an arbitrary Turing machine. In particular, if a property depends only on the recognized language (not on the machine’s syntactic description), and the property is neither always true nor always false, then the problem of deciding that property is undecidable. 2
Key idea: if we could decide such a property, we could decide the halting problem (or an equivalent undecidable problem) by reducing it to the property, contradicting known undecidability. 2
Footnotes
-
Rice's theorem - Wikipedia - Formal statement and discussion of semantic/non-trivial properties. ↩ ↩2
-
Lecture 16: Post’s Correspondence Problem and Rice's Theorem (Georgia Tech) - Statement of Rice’s theorem; semantic vs syntactic; proof outline. ↩ ↩2
Rice's Theorem (Undecidability): 5 Proofs and Examples
What Rice’s theorem is actually about (semantic properties)
Rice’s theorem applies to language properties (semantic properties), i.e., properties of the form: “ has property ,” where is the language recognized by machine . The property must satisfy:
- Non-triviality: some Turing-recognizable languages have the property and some do not. 2
- Semantic dependence: if then and either both satisfy the property or both fail it. 2
Syntactic properties (about the code/structure of the machine, like “ has exactly 17 states”) are a different class and are not covered by Rice’s theorem.
Footnotes
-
Lecture 16: Post’s Correspondence Problem and Rice's Theorem (Georgia Tech) - Statement of Rice’s theorem; semantic vs syntactic; proof outline. ↩ ↩2
-
Rice's Theorem (Grinnell CSC 341 PDF) - Non-trivial vs trivial properties; alternative application framing. ↩
-
Rice's theorem - Wikipedia - Formal statement and discussion of semantic/non-trivial properties. ↩ ↩2
Formal statement (index set form)
Let be a non-trivial semantic property of recursively enumerable languages. Define the associated decision problem:
Rice’s theorem says that is undecidable whenever is non-trivial. 2
Footnotes
-
Rice's theorem - Wikipedia - Formal statement and discussion of semantic/non-trivial properties. ↩
-
Lecture 16: Post’s Correspondence Problem and Rice's Theorem (Georgia Tech) - Statement of Rice’s theorem; semantic vs syntactic; proof outline. ↩
type="tip" title="Pro Tip: How to use Rice’s theorem" content="To apply Rice’s theorem, you usually (i) define the property on languages, then (ii) prove it’s non-trivial by exhibiting two machines whose languages differ on the property, and (iii) argue the property depends only on (semantic dependence). 2"
Footnotes
-
Rice's theorem - Wikipedia - Formal statement and discussion of semantic/non-trivial properties. ↩
-
Lecture 16: Post’s Correspondence Problem and Rice's Theorem (Georgia Tech) - Statement of Rice’s theorem; semantic vs syntactic; proof outline. ↩
Template proof when applying Rice’s theorem
- 1Step 1
Specify the property in terms of the recognized language (e.g., empty, infinite, finite, contains a specific string).
- 2Step 2
Prove that if then either both satisfy the property or both do not.
- 3Step 3
Find one machine such that and another such that .
- 4Step 4
Since is non-trivial and semantic, Rice’s theorem implies is undecidable. 2
Footnotes
-
Rice's theorem - Wikipedia - Formal statement and discussion of semantic/non-trivial properties. ↩
-
Lecture 16: Post’s Correspondence Problem and Rice's Theorem (Georgia Tech) - Statement of Rice’s theorem; semantic vs syntactic; proof outline. ↩
-
Visualizing the logic
Rice’s theorem is essentially an “all-or-nothing” statement for non-trivial semantic questions about recognized languages.
Application: Undecidability of emptiness of a recognized language
Consider the classical emptiness problem for Turing machines:
[ETM]{def="Set of TM descriptions
Why Rice’s theorem applies
Define a property on languages by:
This property is:
By Rice’s theorem, is undecidable. 2
Footnotes
-
Rice's Theorem (Grinnell CSC 341 PDF) - Application example proving emptiness problem undecidable via Rice. ↩ ↩2 ↩3 ↩4 ↩5
-
Rice's theorem - Wikipedia - Formal statement and discussion of semantic/non-trivial properties. ↩
type="warning" title="Common mistake" content="Rice’s theorem does NOT apply to syntactic properties of the machine (e.g., number of states). It applies to properties that depend only on the recognized language . 2"
Footnotes
-
Rice's theorem - Wikipedia - Formal statement and discussion of semantic/non-trivial properties. ↩
-
1 Rice's Theorem (Illinois CS 373 Lecture PDF) - Distinguishes properties of TMs vs properties of languages; lists undecidable language properties. ↩
Another application (quick): “Language is infinite”
Let mean “ is infinite.” This is a semantic property of . It is also non-trivial because there are recognizable languages that are infinite (e.g., ) and recognizable languages that are finite (e.g., or ). Therefore, by Rice’s theorem, the index set
is undecidable. 2
Footnotes
-
Rice's Theorem (Grinnell CSC 341 PDF) - Non-trivial vs trivial properties; alternative application framing. ↩
-
6.045J Lecture 9: Mapping reducibility and Rice's theorem (MIT OCW) - Examples and interpretation of Rice’s theorem for language properties. ↩
How Rice’s theorem fits into undecidability proofs
Choose a semantic question
1) Define propertyTurn the informal requirement into a property of languages."
Verify language-only dependence
2) Check semanticsShow the property depends only on ."
Exhibit yes/no witnesses
3) Check non-trivialityProduce machines whose languages differ on the property."
Conclude undecidability
4) Apply theoremRice’s theorem yields undecidability of the associated index set."
Rice’s theorem quick-check flashcards
Knowledge Check
Rice’s theorem applies to which type of property?