Rice's Theorem
Rice's Theorem
Rice's Theorem
Exampl
e:
: is : has size
empty? 2? N
YE
S O
N
N O
O YE
N S
Trivial Property
A property possessed by ALL Turing-acceptable languages
: has size at
least
True0?for all
languages
Exampl
Suppose
e: alphabet
: is : is has size
1?N
empty?
YE YEO
SN S
N
O
N O
O
Non-trivial property problem
• Input: Turing Machine, M
• Question: Does L(M) have the non-trivial property P? L(M)∈P
• Corresponding language:
Rice’s Theorem
• Determining whether a TM satisfies any non-trivial property is
undecidable [i.e. is
undecidable]
• There is some TM, M1 whose language, L satisfies the property, P i.e. P(L(M1)) = 1
• There is some TM, M2 whose language, L does not satisfies the property, P i.e.
P(L(M2)) = 0
Rice Theorem - Statement
• Let P be a Non-Trivial property of languages of TMs then the
languages, Lp = {<M> | P(L(M)) = 1} is undecidable.
Encodings Language of
of TM TM satisfying P
• Note:
• If the encodings of TM does not satisfy the properties of language, L then, Lp =
{<M> | P(L(M)) = 0} is also undecidable because decidable problems are
closed under complement.
The Rice Theorem states that any non-trivial property (a property that is true for some but not all possible
languages) of a recursively enumerable set (a set of strings that can be recognized by a Turing machine) is
undecidable.
In other words, it is impossible to write a general algorithm that can determine whether an arbitrary Turing
machine recognizes a language with a specific non-trivial property.