Solution

ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/computational-complexity/1/b/solution

Rice's theorem, in its formal language version, says: every nontrivial property of the computably enumerable language accepted by a Turing machine has an undecidable set of machine descriptions. Here nontrivial means that some computably enumerable language has the property and some does not. The property must be an extensional property of programs: any two Turing machines accepting the same formal language must agree about it. It need not be a property of all formal languages, including those no Turing machine accepts.
Let be such a property and write
We prove the theorem by a many-one reduction from the halting problem. First suppose the empty language is not in . Nontriviality provides a fixed Turing machine with . Given a Turing machine and a word over an alphabet , effectively construct a Turing machine which, on input , first simulates on . If that simulation ever halts, it simulates on and accepts precisely when accepts. If the first simulation never halts, it never accepts .
The Turing machine encoding of is computable from those of : the description merely embeds and the fixed simulator for . Constructing it does not require predicting whether halts. Its accepted formal language is
Consequently
A decider for would therefore decide the halting problem, a contradiction. Invalid descriptions can be mapped to a fixed description of a machine accepting the empty language, if the many-one reduction is formulated on all strings.
If the empty language does belong to , apply the preceding argument to the opposite property, within the computably enumerable languages. This opposite property is still nontrivial and excludes the empty language. A hypothetical decider for would decide the opposite property's index set by first rejecting malformed Turing machine encodings and otherwise reversing its answer. The opposite property is undecidable by the first case, giving the required contradiction in this case too.

New to topics? Read the docs here!