Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aa:beyondre [2016/10/20 11:31]
pdmatei created
aa:beyondre [2016/10/31 14:31] (current)
rstefan
Line 133: Line 133:
 Note that our machine will always terminate if there exists an input for which $math[M] does not halt since the oracle **always terminate**. Note that our machine will always terminate if there exists an input for which $math[M] does not halt since the oracle **always terminate**.
  
-To conclude, in our Universe, $math[f_{all}\in coRE]. ​+To conclude, in 
 +ur Universe, $math[f_{all}\in coRE]. ​
  
 There is an infinity of classes $math[(co)RE^Y],​ which contain (co)-recursively enumerable problems, given an oracle from class $math[Y]. Hence, formally, $math[f_{all}\in coRE^{RE}]. There is an infinity of classes $math[(co)RE^Y],​ which contain (co)-recursively enumerable problems, given an oracle from class $math[Y]. Hence, formally, $math[f_{all}\in coRE^{RE}].
  
-===== Beyond coRE (Rice'​s Theorem) ====+===== A general undecidability result ​(Rice'​s Theorem) ====
  
-==== 1.4.1 Theorem (Rice) ==== +$prop[Rice] 
-//Let $math[\mathcal{C} \subseteq RE]. Given a Turing Machine $math[M], we ask:// "The problem accepted by $math[M] is in $math[\mathcal{C}]?"​. //Answering this question is not in $math[R].//+Let $math[\mathcal{C} \subseteq RE]. Given a Turing Machine $math[M], we ask:// "The problem accepted by $math[M] is in $math[\mathcal{C}]?"​. //Answering this question is not in $math[R] ​(not decidable). 
 +$end
  
-//Proof:// We consider that the trivial problem $math[f(n) = 0] is not in $math[\mathcal{C}]. Since $math[\mathcal{C}is non-empty, suppose ​$math[f^\in \mathcal{C}],​ and since $math[f^*] is recursively-enumerablelet $math[M^*] be the Turing Machine which accepts $math[f^*].+Before looking at the proof, let us examine the statement made by the theorem. Suppose ​$math[A\subsetneq B]. The elements of $math[Acan be interpreted as members of $math[B] with a **given property**. Hence, $math[Acan be identified with **the property itself**. 
  
-We apply a reduction from a variant of $math[f_{111}],​ namely $math[f_x]. $math[f_x] asks if a Turing Machine halts for input $math[x]. We assume we can decide ​the membership ​$math[f \in \mathcal{C}] ​by some Turing MachineBased on the latter, we construct ​Turing Machine which decides $math[f_x] (i.e. solves the halting problem for a particular input). Let $math[M_x] be the Turing Machine which //accepts// $math[fx].+The same is the case with $math[\mathcal{C}]. ​It represents ​**//property//** of recursively-enumerable problems. The theorem states undecidability of a very general problem.
  
-Let:+The **input** of the problem is //another (recursively-enumerable) problem itself//, given in the form of the Turing Machine which accepts it. Note that we have no means of encoding problems as words. But a recursively-enumerable problem can be completely specified by any of its accepting Turing Machines.
  
-$math[\Pi_w(\omega) = \mboxif M_x(w) ​\mboxthen M^*(\omega\mbox{ else loop.}]+The **output** of the problem is to decide if the given problem has property ​$math[\mathcal{C}], where $math[\mathcal{C}] is arbitrary but fixed, and it is not a trivial set (the emptyset).
  
-If $math[f_{\Pi_w}] is the problem accepted by $math[\Pi_w],​ we show that:+This decision problem is **undecidable**. To better understand its meaning, imagine that $math[\mathcal{C}] may stand for: 
 +  * //the set of problems which return 1 for odd inputs// 
 +  * //the set of problems whose accepting Turing Machines implement a '​virus-like'​ behaviour during their computation//​
  
-$math[f_{\Pi_w} \in \mathcal{C} \mbox{ iff } M_x(w\mbox{ halts}]+In general, verifying non-trivial ​(and non-structuralproperties of programs (such as '​virus-like'​ behaviour) is undecidable.
  
-$math[(\Rightarrow)]. Suppose ​$math[f_{\Pi_w} \in \mathcal{C}]. ​Then $math[\Pi_w(\omega)cannot loop for every input $math[\omega ​\in \Sigma^*]. If there were so, then $math[f_{\Pi_w}] would be the trivial function always returning ​$math[0for any inputwhich we have assumed is not in $math[\mathcal{C}]. Thus, $math[M_x(w)halts.+$proof 
 +We consider that the trivial problem ​$math[f(n= 0whose answer is $math[0] for any instance, is not in $math[\mathcal{C}]. ​Since $math[\mathcal{C}is non-empty, suppose ​$math[f^* \in \mathcal{C}], and since $math[f^*] is recursively-enumerablelet $math[M^*be the Turing Machine which accepts ​$math[f^*].
  
-$math[(\Leftarrow)]. Suppose ​$math[M_x(w)haltsThen the behaviour of $math[\Pi_w(\omega)is precisely that of +We apply a reduction from a variant of $math[f_{111}], namely ​$math[f_x]. $math[f_xasks if a Turing Machine halts for input $math[x]. Suppose we can decide the membership ​$math[\in \mathcal{C}by some Turing Machine. Based on the latter, we construct a Turing Machine which decides ​$math[f_x] (i.e. solves the halting problem for a particular input). Let $math[M_xbe the Turing Machine which //​accepts// ​$math[f_x].
-$math[M^*(\omega)]. $math[\Pi_w(\omega)will return ​$math[1whenever $math[M^*(\omega)] will return $math[1] and $math[\Pi_w(\omega) = \perp] whenever $math[M^*(\omega) = \perp]Since $math[f \in \mathcal{C}], then also $math[f_{\Pi_w} \in \mathcal{C}].+
  
-In Theorem 1.4.1, the set $math[\mathcal{C}] should be interpreted as a //​property//​ of problems, and subsequently of the Turing Machines which accept them. Checking if some Turing Machine $math[M^*] satisfi es the given property is undecidable. Consider the property informally described as//The set of Turing Machines(/​computer programs) that behave as viruses.// The ability of deciding whether a Turing Machine behaves as a virus (i.e. belongs to the former set) is undecidable,​ via Rice's Theorem.+Let:
  
-===== Generation =====+$math[\Pi_M(\omega) ​\mbox{ if } M_x(M) \mbox{halts,​ then run} M^*(\omega) \mbox{.}]
  
 +If $math[f_{\Pi_M}] is the problem accepted by $math[\Pi_M],​ we show that:
  
-Returning to our simpler classi cation,​ we must observe an interesting feature of recursively-enumerable functions, which is also the reason they are called this way.+$math[f_{\Pi_M} \in \mathcal{C} \mbox{ iff } M_x(M) \mbox{ halts}]
  
-==== - Proposition ==== +$math[(\Rightarrow)]. Suppose ​$math[f_{\Pi_M} ​\in \mathcal{C}]. Then $math[\Pi_M(\omega)] cannot loop for every input $math[\omega \in \Sigma^*]. If there were sothen $math[f_{\Pi_M}would be the trivial function always returning ​$math[0] for any input, ​which we have assumed ​is not in $math[\mathcal{C}]. Thus, $math[M_x(M)] halts.
-//A function ​$math[f \in Hom(\mathbb{N}, \{0, 1\})] is recursively enumerable iff there exists a Turing Machine which can **enumerate/​generate** all elements in $math[A_f = \{\in \mathbb{N} \mid f(n^w= 1\}]. Intuitively, $math[A_fis the set of inputs of $math[f] for which the answer at hand is yes.//+
  
-//Proof:// $math[\Longrightarrow] Suppose $math[f] is recursively-enumerable and $math[M] accepts $math[f]. We write $math[w_i] to refer to the //i//th word from $math[\Sigma^*]. We specify the $math[TM] generating $math[A_f] by the following pseudocode:+$math[(\Leftarrow)]. Suppose $math[M_x(M)] halts. Then the 
 + ​behaviour of $math[\Pi_M(\omega)] is precisely that of 
 +$math[M^*(\omega)]. $math[\Pi_M(\omega)] will return $math[1] whenever $math[M^*(\omega)] will return $math[1] and $math[\Pi_M(\omega) = \perp] whenever $math[M^*(\omega) = \perp]. Since $math[f \in \mathcal{C}],​ then also $math[f_{\Pi_M} \in \mathcal{C}]. 
 +$end 
 + 
 +===== Generation ===== 
 + 
 +In what follows, we look at an interesting property of recursively-enumerable problems - property which gives the name of this class of problems. 
 + 
 +$prop 
 +A problem $math[f \in Hom(\mathbb{N},​ \{0, 1\})] is recursively enumerable iff there exists a Turing Machine which can **enumerate/generate** all elements in $math[A_f = \{w \in \mathbb{N} \mid f(n^w) = 1\}]. Intuitively,​ $math[A_f] is the set of inputs of $math[f] for which the answer at hand is yes. 
 +$end 
 + 
 +==== Proof ==== 
 +$math[\Longrightarrow] Suppose $math[f] is recursively-enumerable and $math[M] accepts $math[f]. We write $math[w_i] to refer to the //i//th word from $math[\Sigma^*]. We specify the $math[TM] generating $math[A_f] by the following pseudocode:
  
 $algorithm[$math[GEN()]] $algorithm[$math[GEN()]]
Line 217: Line 235:
 $math[M] simply uses $math[GEN] to generate elements in $math[A_f] . If $math[w \in A_f] , if will eventually be generated, and $math[M] will output $math[1]. Otherwise $math[M] will loop. Thus $math[M] accepts $math[f]. $math[M] simply uses $math[GEN] to generate elements in $math[A_f] . If $math[w \in A_f] , if will eventually be generated, and $math[M] will output $math[1]. Otherwise $math[M] will loop. Thus $math[M] accepts $math[f].
  
-Proposition 1.4.6 is useful since, in many cases, it is easier to find a generator for $math[f], instead of a Turing Machine which accepts $math[f]. 
  
-Finally, ​in what followswe shall take few decision problemsand apply a //​reduction//​ technique, in order to prove they are not decidable.+The Proposition is useful since in some casesit may be easier to find generator for $math[f]instead of an accepting Turing Machine.