Rice’s Theorem
We will show that every non-trivial property of languages of Turing machines is undecidable (Rice’s theorem). To show this theorem, we will formalize what properties of languages are and what it means for them to be non-trivial for Turing machines.
Let 2{0,1}∗2{0,1}∗ be the set of all languages over the binary alphabet. A propertyof languages is a subset P⊆2{0,1}∗P⊆2{0,1}∗. We say LL satisfies PP if L∈PL∈P and we say that LL violates PP if L∉PL∉P. For example, we can choose PP to be the set of languages that contain the string 00000000.
We say that PP is a non-trivial property of languages of Turing machines if there exists Turing machines MYMY and MNMN such that L(MY)L(MY) satisfies the property and L(MN)L(MN) violates the property. Here is an example of a property that is non-trivial for languages of Turing machines,
Pempty={∅}.Pempty={∅}.
The property is non-trivial because there are Turing machines that recognize the empty language and there are Turing machines that recognize a non-empty language. Here is an examples of a property that is trivial for languages of Turing machines,