4.6.20 · D5Theory of Computation

Question bank — Rice's theorem

1,433 words7 min readBack to topic

Before we start, one shared vocabulary reminder so no symbol is used unexplained:

Here, means "the encoded description (source code) of machine ", and means "the language recognizes". See Turing Machines and Recursive vs Recursively Enumerable languages if either feels shaky.


True or false — justify

Non-trivial semantic properties are always undecidable
True — that is exactly Rice's theorem. The reduction from [[A_TM and undecidability|]] builds a gadget that flips between a YES-language and , and non-triviality guarantees both worlds exist.
Every undecidable language property is non-trivial
False — this is the (invalid) converse. Rice only runs one direction: non-trivial ⇒ undecidable. Trivial properties exist but they are decidable, so undecidability does not force non-triviality.
"Does have exactly 10 states?" is undecidable by Rice
False — this is syntactic: two machines with identical languages can have different state counts, so it does not depend on . You just count states in → decidable.
If a property is trivial, its language is decidable
True — a trivial property gives a constant answer ("yes for all r.e." or "no for all r.e."), so a decider that ignores its input and prints that constant works.
Rice's theorem proves the property is not even r.e.
False — Rice only claims undecidable (not recursive). Whether is recognizable is a finer, separate question answered by Rice–Shapiro or direct analysis.
"" is undecidable but recognizable
True — it is a non-trivial semantic property (undecidable by Rice), yet you can dovetail a search: run on all strings in parallel and accept the moment any accepts. So it is r.e. but not recursive.
Rice's theorem is a special case of the Halting Problem
False — it is the reverse: Rice is a generalization. Halting is one behavioural property; Rice says every non-trivial behavioural property is at least as hard, by reducing halting into each one.
The set of all r.e. languages having some property must itself be r.e. for Rice to apply
False — Rice makes no r.e. requirement on at all. It only needs to be a set of r.e. languages that is non-trivial as a property; nothing about 's own decidability is assumed.

Spot the error

" is regular is a syntactic property, so Rice does not apply."
Error: regularity is a fact about the language , not the code — it is semantic. It is non-trivial ( is regular, is not), so Rice does apply and it is undecidable.
" is non-trivial because I found a machine with ."
Error: one witness is not enough. Non-triviality needs a YES-language and a NO-language. Only exhibiting the YES side leaves open that every r.e. language has (trivial-true).
"The gadget decides halting, contradiction, so is undecidable."
Error: does not decide anything — it is the transformed input. The contradiction comes from the assumed decider for applied to ; the gadget only encodes the halting question into a property question (Mapping reductions).
"Since here, Rice cannot be used."
Error: whether has is irrelevant to whether Rice applies. If , prove undecidability for the complement property instead — deciding would decide , so it is symmetric.
"Rice proves everything about a TM's behaviour is undecidable."
Error: only non-trivial semantic questions. "Does accept something or reject-or-loop on everything with the same answer for all machines?" — trivial questions and structural questions are outside Rice and are often decidable.
" is trivial because it names only one language."
Error: 'trivial' is not about how many languages are listed — it is about whether the YES/NO split is empty on one side. has as a YES-witness and as a NO-witness, so it is non-trivial and undecidable.

Why questions

Why does the reduction require a YES-witness language ?
Because the gadget must be able to enter a "has property" world when accepts . Without a target language that actually possesses , there is nothing to switch into and the flip fails.
Why is used as the "no" baseline in the standard proof?
When never accepts , the gadget's first stage loops forever, so it accepts nothing — its language is . Assuming makes that the guaranteed NO-world, giving a clean flip: property accepts .
Why does the gadget run on before looking at its own input ?
So that reaching the useful behaviour is gated on accepting . If never accepts, the gadget is stuck and accepts nothing; only if accepts does the gadget go on to mimic and inherit .
Why does non-triviality being false collapse the whole proof?
A trivial property has only one world (all-yes or all-no), so the gadget cannot flip its language between and not-. With no flip there is no encoding of halting, and indeed the trivial property is genuinely decidable by a constant answer.
Why can't we fix syntactic properties by "just applying Rice anyway"?
Because Rice's hypothesis literally demands the property depend only on . Syntactic properties violate this: two machines with equal languages can disagree on the property, so the theorem's premise is not met.

Edge cases

Is (no r.e. language has the property) decidable?
Yes — it is one of the two excluded trivial cases. The decider always answers "no", since by assumption no machine's language is in .
Is decidable?
Yes — the other trivial case. Every r.e. language qualifies, so the decider always answers "yes".
Is "does accept the specific string 01?" decidable?
No — it is non-trivial semantic ( contains 01 and is a YES-witness; is a NO-witness). By Rice it is undecidable, even though it feels like a single concrete check.
Is "does ever write a blank symbol on its tape?" decidable by Rice?
Rice says nothing — it is syntactic/operational (about the machine's runtime steps, not ). Whether it is decidable is a separate analysis; Rice simply does not classify it.
If both and recognize the same language, is still non-trivial?
No — non-triviality needs two different languages, one in and one out. Same language means same property value, so you have failed to exhibit a genuine split.
Can a non-trivial semantic property ever be co-r.e. instead of r.e.?
Yes — e.g. "" () is co-r.e. but still undecidable. Rice fixes only the undecidability; the r.e./co-r.e. side is a finer distinction it leaves open.
Does Rice apply to properties of deciders only, or all Turing machines?
All Turing machines that recognize r.e. languages — the property is about , and every TM defines an r.e. language. Restricting to deciders is unnecessary and would change the setting.

Connections

  • Halting Problem — the seed reduced into every non-trivial property.
  • A_TM and undecidability — the base undecidable language.
  • Mapping reductions — why the gadget "transforms input", never "decides".
  • Recursive vs Recursively Enumerable languages — undecidable ≠ non-r.e.
  • Rice-Shapiro theorem — the finer tool for recognizability.
  • Turing Machines — the model underneath and .