4.6.20 · D1Theory of Computation

Foundations — Rice's theorem

2,261 words10 min readBack to topic

This is the prerequisite toolbox for the main topic. We define each symbol in plain words, draw the picture it stands for, and say why the theorem needs it — in an order where each idea rests on the one before.


0. What is a "machine" here? — the symbol

Picture the tape as a strip of graph paper stretching forever in both directions, with one little arrow (the head) pointing at a cell.

Figure — Rice's theorem

Why the topic needs it. Rice's theorem is a statement about Turing machines — the model of "any program at all". See Turing Machines for the full construction. Everything downstream is a question we ask about some .


1. Strings, the alphabet , and

Picture as an ever-growing tower: length-0 has just ; length-1 has ; length-2 has ; and so on forever.

Why the topic needs it. The machine's job is to look at a string and eventually say accept or not. The pool of possible inputs is . Example 3 in the parent ("does accept the string 01?") is a question about one specific member of .


2. What a machine accepts — the language

When you feed a string , three things can happen:

  • halts and says accept,
  • halts and says reject,
  • runs forever (never stops — the tape keeps scrolling).
Figure — Rice's theorem

Why the topic needs it. Rice's theorem talks about properties of — the behavior set, not the rulebook. When the parent writes "" or " is infinite", it is asking a question about this bucket of accepted strings.


3. The empty set and other special languages

Contrast three landmark languages you will meet again and again:

Symbol Plain words Picture
accepts nothing empty bucket
accepts everything full bucket
strings like 0011, 000111 matched pairs only

Why the topic needs it. The proof's gadget flips between " (has the property)" and " (does not)". So is not a footnote — it is one of the two worlds the whole reduction swings between.


4. Recursive vs. Recursively Enumerable — decidable vs. recognizable

This is the most important pair of words on the page. See Recursive vs Recursively Enumerable languages.

Figure — Rice's theorem

Why the topic needs it. The whole theorem is the single word "undecidable", and that word is meaningless until you own this pair.


5. Naming a machine as data — the code

Picture a program's source code saved as a text file: the running program is ; the file's contents are . You can also bundle several things: is one string holding both a machine's code and an input string .

Why the topic needs it. A checker is itself a machine; its input must be a string. So to ask a machine about a machine, we hand it . The set the theorem studies is literally — a set of codes.


6. A property and its code-set

Why the topic needs it. "Is property decidable?" is shorthand for "is the language decidable?" — because that is the concrete yes/no set a decider would have to compute.


7. Non-trivial — the one word that turns the theorem on

Why the topic needs it. Without both worlds the gadget machine has nothing to flip between, and the proof collapses. This single condition is why the trivial cases (, all r.e.) are the sole survivors that stay decidable.


8. Mapping reduction — the arrow

Figure — Rice's theorem

Why the topic needs it. The gadget in the parent is the translator : it maps the input to the code , and the flip is precisely .


9. The seed problems — and Halting

Why the topic needs it. Rice does not re-prove impossibility from scratch — it borrows the known impossibility of and spreads it, via the reduction arrow, onto every non-trivial property. is the single fixed point everything is anchored to. (The finer refinement of "which properties are at least recognizable" lives in Rice-Shapiro theorem.)


The prerequisite map

Turing machine M

Language L of M

Alphabet Sigma and strings

Empty language

Decidable vs recognizable

Encoding of M as data

Code set L sub P

Property P as a set of languages

Non-trivial: yes world and no world

Rices theorem

Mapping reduction

A sub TM undecidable


Equipment checklist

Test yourself — cover the right side and answer out loud.

What single letter stands for a Turing machine, and what are its three parts?
— an infinite tape, a read/write head, and a finite rulebook.
What is ?
The set of all finite strings buildable from the alphabet , including the empty string .
Define in one sentence.
The set of exactly those strings that accepts (rejects and forever-loops are excluded).
What does mean as a language?
The empty language — the machine accepts no string at all.
Difference between recognizable (r.e.) and decidable (recursive)?
Recognizable = "yes" always eventually comes but "no" may loop forever; decidable = the machine always halts with the correct yes/no.
What does denote?
The machine encoded as a plain string, so another machine can read it as input.
What is a property , formally?
A set of languages — those languages that "have" the property.
What is ?
— the set of machine-codes whose language has property .
When is non-trivial?
When some r.e. language is in and some other r.e. language is not — both a yes-world and a no-world exist.
What does let you conclude if is undecidable?
That is also undecidable (impossibility flows forward across the arrow).
Which undecidable language does Rice's proof reduce from?
.

Connections

  • Rice's theorem — the topic these foundations build toward.
  • Turing Machines — the model lives in.
  • Recursive vs Recursively Enumerable languages — the decidable/recognizable split.
  • A_TM and undecidability and Halting Problem — the seed of impossibility.
  • Mapping reductions — the arrow that spreads impossibility.
  • Rice-Shapiro theorem — the finer follow-up (recognizability).