Differences

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

Link to this comparison view

Next revision
Previous revision
aa:lab:decidability [2016/10/14 10:55]
pdmatei created
aa:lab:decidability [2016/11/01 12:07] (current)
pdmatei
Line 1: Line 1:
 ===== Decidability ===== ===== Decidability =====
  
-We recall a few basic definitions. Let $Mbe a Turing Machine over $\Sigma^*$ and $f:​\Sigma^*\rightarrow\{0,​1\}be a decision problem. Then: +We recall a few basic definitions. Let $math[Mbe a Turing Machine over $\Sigma^*$ and $math[f:​\Sigma^*\rightarrow\{0,​1\}be a decision problem. Then: 
-  * $Maccepts $f$ iff $\forall w\in\Sigma^*:​ M(w) = 1 \iff f(w) = 1$ +  * $math[Maccepts $math[f$math[\iff$math[\forall w\in\Sigma^*:​ M(w) = 1 \iff f(w) = 1] and $math[M(w) = \bot \text{ otherwise }] 
-  * $Mdecides $f$ iff $Maccepts $fand $Mhalts for all inputs.+  * $math[Mdecides $math[f$math[\iff$math[Maccepts $math[fand $math[Mhalts for all inputs.
  
 We say: We say:
-  * $fis **recursively enumerable** if $fis accepted by some Turing Machine; +  * $math[fis **recursively enumerable** if $math[fis accepted by some Turing Machine; 
-  * $fis **recursive** if $fis decided by some Turing Machine;+  * $math[fis **recursive** if $math[fis decided by some Turing Machine;
  
-Let $REand $Rbe the sets of recursively-enumerable and recursive functions, respectively. We say: +Let $math[REand $math[Rbe the sets of recursively-enumerable and recursive functions, respectively. We say: 
-  * $fis **decidable** iff it is **recursive** +  * $math[fis **decidable** ​$math[\iff] $math[f] ​it is **recursive** 
-  * $fis **semi-decidable** iff it is **recursively-enumerable** but **not recursive** +  * $math[fis **semi-decidable** ​$math[\iff] $math[f] ​it is **recursively-enumerable**but **not recursive** 
-  * $fis **undecidable** iff it is **not recursive** +  * $math[fis **undecidable** ​$math[\iff] $math[f] ​it is **not recursive** 
-We note that the former ('semi-decidable'/'undecidable') may appear in the literature with slightly different meanings. Whenever we want no ambiguity, we prefer the terms recursive/​recursively-enumerable.+We note that the former (//semi-decidable/​/ / //undecidable//) may appear in the literature with slightly different meanings. Whenever we want no ambiguity, we prefer the terms recursive / recursively-enumerable.
  
 ==== Recursive / Recursively-enumerable problems ==== ==== Recursive / Recursively-enumerable problems ====
Line 23: Line 23:
 ==== Proving a problem is NOT recursive ==== ==== Proving a problem is NOT recursive ====
  
-The widely-known technique is called **Turing-reduction**. Suppose $f:\Sigma^* \rightarrow \{0,1\}is a studied problem. The reduction technique implies the following:​ +The widely-known technique is called **Turing-reduction**. Suppose $math[f:\Sigma^* \rightarrow \{0,1\}is a studied problem. The reduction technique implies the following:​ 
-  - select a problem $g:\Sigma^* \rightarrow \{0,1\}which is not recursive +  - select a problem $math[g:\Sigma^* \rightarrow \{0,1\}which is not recursive ​(we know this a priori) 
-  - construct a transformation $T:​\Sigma^*\rightarrow\Sigma^*such that: +  - construct a transformation $math[T:​\Sigma^*\rightarrow\Sigma^*such that: 
-    - $Tcan be implemented as a Turing Machine which always halts +    - $math[Tcan be implemented as a Turing Machine which always halts 
-    - $\forall w\in\Sigma^*:​ g(w) = 1 \iff f(T(w))=1(this double implication must be proven in steps)+    - $math[\forall w\in\Sigma^*:​ g(w) = 1 \iff f(T(w))=1] **(this double implication must be proven in steps)**
  
-Once such a transformation is shown to exist for a particular $g$, we say: +Once such a transformation is shown to exist for a particular $math[g], we say: 
-  * $gis **Turing-reducible** to $f$, and write $g\leq_T f$+  * $math[gis **Turing-reducible** to $math[f], and write $math[g\leq_T f]
  
-The informal intuition is that problem $fis **at least as hard** as problem $g$, since, if we can solve (decide) $f$, we are **guaranteed** to solve (decide) $g$. The argument is as follows: +The informal intuition is that problem $math[fis **at least as hard** as problem $math[g], since, if we can solve (decide) $math[f], we are **guaranteed** to solve (decide) $math[g]. The argument is as follows: 
-  * suppose $M_fdecides $f$+  * suppose $math[M_fdecides $math[f]
-  * we construct $M_g(w) = M_f(T(w))$. Then: +  * we construct $math[M_g(w) = M_f(T(w))]. Then: 
-      * $M_galways halts, since: (i) $Talways halts (ii) $M_falways halts (since it decides $f$+      * $math[M_galways halts, since: (i) $math[Talways halts (ii) $math[M_falways halts (since it decides $math[f]
-      * $M_g(w) = 1 \iff g(w) = 1$, due to the above properties of $T(see above) +      * $math[M_g(w) = 1 \iff g(w) = 1], due to the above properties of $math[T(see above) 
-  * we have shown $M_gdecides $g$.+  * we have shown $math[M_gdecides $math[g].
  
-Finally, having shown $g\leq_T f$, we have constructed a //​reductio-ad-absurdum//​ argument. If we recall point 1: $gis not decidable. However, by assuming $fis decidable, we have shown we can decide $g$. Contradiction!+Finally, having shown $math[g\leq_T f], we have constructed a //​reductio-ad-absurdum//​ argument. If we recall point 1: $math[gis not decidable. However, by assuming $math[fis decidable, we have shown we can decide $math[g]. Contradiction!
  
-==== How to choose $Tand $g====+==== How to choose $math[Tand $math[g====
  
-There is no general rule on how to choose $gand how to construct $T$, when studying a particular problem $f$. As in any other activity, a lot of practice helps. Sometimes, reductions from similar problems seem to be easier. ​+There is no general rule on how to choose $math[gand how to construct $math[T], when studying a particular problem $math[g]. As in any other activity, a lot of practice helps. Sometimes, reductions from similar problems seem to be easier. ​
  
-One general observation is that $Tand $gmust be thought of in tandem, such that condition b. can be proven (usually, the trickiest part of a reduction)+One general observation is that $math[Tand $math[gmust be thought of in tandem, such that condition b. can be proven (usually, the trickiest part of a reduction)
  
 ==== Some undecidable problems ==== ==== Some undecidable problems ====
Line 87: Line 87:
 ==== More stuff ==== ==== More stuff ====
  
-  * When discussing the reduction scheme, we assumed both problems ($fand $g$) are defined over the same alphabet. Should this generally be the case? Can we bypass this restriction?​+  * When discussing the reduction scheme, we assumed both problems ($math[fand $math[g]) are defined over the same alphabet. Should this generally be the case? Can we bypass this restriction?​
  
   * Mathematically,​ $\leq_T \subseteq \mathbb{H}om(\mathbb{N},​\{0,​1\}) \times \mathbb{H}om(\mathbb{N},​\{0,​1\})$,​ i.e. $\leq_T$ is a relation over decision problems. What properties does $\leq_T$ have?   * Mathematically,​ $\leq_T \subseteq \mathbb{H}om(\mathbb{N},​\{0,​1\}) \times \mathbb{H}om(\mathbb{N},​\{0,​1\})$,​ i.e. $\leq_T$ is a relation over decision problems. What properties does $\leq_T$ have?
Line 93: Line 93:
   * how can we use these properties in real-life?   * how can we use these properties in real-life?
  
-  * In a lot of literature, a decision problem is also modelled as a **language**,​ that is, a set $Lof words - a subset of $\Sigma^*$. The words in $Lare the set of //​yes//​-instances of the problem, while those outside $L- the set of //​no//​-instances. This is very similar in spirit with our dual definition for interpretations (as functions, or as sets). This definition for problems will be employed in the 3-rd year lecture on **formal languages** (LFA).+  * In a lot of literature, a decision problem is also modelled as a **language**,​ that is, a set $math[Lof words - a subset of $math[\Sigma^*]. The words in $math[Lare the set of //​yes//​-instances of the problem, while those outside $math[L- the set of //​no//​-instances. This is very similar in spirit with our dual definition for interpretations (as functions, or as sets). This definition for problems will be employed in the 3-rd year lecture on **formal languages** (LFA).