7,495 views
5 votes
5 votes
Please share some good resources and questions which can make it easier for me to understand and apply Rice theorem.

2 Answers

Best answer
10 votes
10 votes

Rice's Theorem

Part 1 (For some undecidable languages)

Any non-trivial property of the LANGUAGE recognizable by a Turing machine is undecidable

For a property to be non-trivial, there should exist at least two Turing machines, the property holding for the language of one (\(T_{yes}\)) and not holding for the language of other (\(T_{no}\)).

Thus, as per Rice's theorem the language describing any nontrivial property of Turing machine is not recursive. It can either be recursively enumerable or not recursively enumerable. (Obviously there are also other languages which are not recursive)

Examples

(1) \(L(M)\) has at least 10 strings

We can have \(T_{yes}\) for \(\Sigma^*\) and \(T_{no}\) for \(\phi\). Hence, $L = \left\{M \mid L(M) \text{ has at least 10 strings}\right\}$ is not Turing decidable (not recursive). (Any other $T_{yes}$ and $T_{no}$ would also do. $T_{yes}$ can be any TM which accepts at least 10 strings and $T_{no}$ any TM which doesn't accept at least 10 strings )

(2) \(L(M)\) has at most 10 strings

We can have \(T_{yes}\) for \(\phi\) and \(T_{no}\) for \(\Sigma^*\). Hence, \(L = \{M\mid L(M)\) has at most 10 strings\(\}\) is not Turing decidable (not recursive).

(3) \(L(M)\) is recognized by a \(TM\) having even number of states

This is a trivial property. This set equals the set of recursively enumerable languages.

(4) \(L(M)\) is a subset of \(\Sigma^{*}\)

This is a trivial property. All languages are subset of \(\Sigma^{*}\) and hence this set contains all languages including all recursively enumerable languages.

Part 2 (For some unrecognizable languages)

Any non-monotonic property of the LANGUAGE recognizable by a Turing machine is unrecognizable

For a property to be non-monotonic, there should exist at least two Turing machines, the property holding for the language of one (\(T_{yes}\)) and not holding for the language of other (\(T_{no}\)) and the language of \(T_{yes}\) must be a proper subset of the language of \(T_{no}\).

Examples

(1) \(L(M)\) is finite

We can have \(T_{yes}\) for \(\phi\) and \(T_{no}\) for \(\Sigma^*\) (\(\phi \subset \Sigma^*\)). Hence, \(L = \{M\mid L(M)\) is finite\(\}\) is not Turing recognizable (not recursively enumerable)

(2) \(L(M) = \{0\}\)

We can have \(T_{yes}\) for \(\{0\}\) and \(T_{no}\) for \(\Sigma^*\) (\(\{0\} \subset \Sigma^*\)). Hence, \(L = \{M\mid L(M) = \{0\}\}\) is not Turing recognizable (not recursively enumerable)

(3) \(L(M)\) is regular

We can have \(T_{yes}\) for \(\phi\) and \(T_{no}\) for any non-regular language. Hence, \(L = \{M\mid L(M)\) is regular\(\}\) is not Turing recognizable (not recursively enumerable)

(4) \(L(M)\) is not regular

We can have \(T_{yes}\) for \(\{a^nb^n\mid n\ge0\}\) and \(T_{no}\) for \(\Sigma^*\) (\(\{a^nb^n\mid n\ge0\}\subset \Sigma^*\)). Hence, \(L = \{M\mid L(M)\) is not regular\(\}\) is not Turing recognizable (not recursively enumerable)

(5) \(L(M)\) is infinite

We cannot have \(T_{yes}\) and \(T_{no}\) such that \(L(T_{yes}) \subset L(T_{no})\). Hence, this is not a non-monotonic property and Rice's \(2^{nd}\) theorem is not applicable. Still, \(L = \{M\mid L(M)\) is infinite \(\}\) is not Turing recognizable (not recursively enumerable)

(6) \(L(M)\) has at least 10 strings

We cannot have \(T_{yes}\) and \(T_{no}\) such that \(L(T_{yes}) \subset L(T_{no})\). Hence, this is not a non-monotonic property and Rice's \(2^{nd}\) theorem is not applicable.

This language is in fact Turing recognizable. See here

(7) \(L(M)\) has at most 10 strings

We can have \(T_{yes}\) for \(\phi\) and \(T_{no}\) for \(\Sigma^*\)(\(\phi \subset \Sigma^*\)). Hence, \(L = \{M\mid L(M)\) has at most 10 strings\(\}\) is not Turing recognizable (not recursively enumerable)

 

 

 

 

 

selected by
1 flag
3 votes
3 votes

Related questions

0 votes
0 votes
0 answers
2
2 votes
2 votes
0 answers
3