Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
aa:ct:models [2017/10/02 14:24]
pdmatei
aa:ct:models [2019/10/08 07:55] (current)
costin.lupu.almighty
Line 86: Line 86:
  
 Let us make a few observations:​ Let us make a few observations:​
-  - each $math[i \in I] must be, in some sense finite. For instance, the graphs\footnotes{Graphs can also be infinite, however we do not consider them hereare finite objects ​+  - each $math[i \in I] must be, in some sense finite. For instance, the graphs ​((Graphs can also be infinite, however we do not consider them here)) are finite objects ​
   - $math[I] must be //​countable//​ (but not necessarily finite). ​   - $math[I] must be //​countable//​ (but not necessarily finite). ​
  
Line 140: Line 140:
 To conclude: ​ To conclude: ​
   * when trying to solve concrete problems, the encoding issue is fundamental, ​     * when trying to solve concrete problems, the encoding issue is fundamental, ​  
-  * From the perspective of **Complexity Theory**, **how** the encoding is done is unessential\footnote{There are exponentially-inefficient ways of encoding objects, which we shall discuss in a later lecture}, and can be viewed+  * From the perspective of **Complexity Theory**, **how** the encoding is done is unessential ​((There are exponentially-inefficient ways of encoding objects, which we shall discuss in a later lecture)), and can be viewed
 without “//loss of information//​” to a natural number. without “//loss of information//​” to a natural number.
  
Line 226: Line 226:
   * At the same time, The ''​TM''​ Definition illustrates an **interpretation procedure** which tells us how to perform the computation specified by a Turing Machine. But what //Machine// is performing this interpretation?​   * At the same time, The ''​TM''​ Definition illustrates an **interpretation procedure** which tells us how to perform the computation specified by a Turing Machine. But what //Machine// is performing this interpretation?​
  
-Turing'​s seminal result shows that the interpretation of **any** Turing Machine can be performed a very special Turing Machine which he calls **The Universal Turing Machine** (abbreviated henceforth as UTM):+Turing'​s seminal result shows that the interpretation of **any** Turing Machine can be performed ​by a very special Turing Machine which he calls **The Universal Turing Machine** (abbreviated henceforth as UTM):
   * The **input** of the UTM is a Turing Machine (any TM); hence, to preserve our formalism, we need a mechanism to encode Turing Machines as **words**;   * The **input** of the UTM is a Turing Machine (any TM); hence, to preserve our formalism, we need a mechanism to encode Turing Machines as **words**;
   * The **output** of the UTM is the **word computed by the TM given as input** ​   * The **output** of the UTM is the **word computed by the TM given as input** ​
Line 256: Line 256:
 Thus, $math[enc(M)] is a word, which can be fed to another Turing Machine. The latter should have the ability to execute (or to simulate) $math[M]. This is indeed possible: Thus, $math[enc(M)] is a word, which can be fed to another Turing Machine. The latter should have the ability to execute (or to simulate) $math[M]. This is indeed possible:
  
-$proposition[The Universal Turing Machine] +$prop[The Universal Turing Machine] 
-There exists a ''​TM''​ $math[U] which, for any ''​TM''​ $math[M]and every word $math[w \in \Sigma^*], takes $math[enc(M)] and $math[w] as input and outputs $math[1] whenever $math[M(w) = 1] and $math[0] whenever $math[M(w) = 0]. We call $math[U]the **Universal Turing Machine**and say that $math[U] simulates $math[M].+There exists a ''​TM''​ $math[U] which, for any ''​TM''​ $math[M] and every word $math[w \in \Sigma^*], takes $math[enc(M)] and $math[w] as input and outputs $math[1] whenever $math[M(w) = 1] and $math[0] whenever $math[M(w) = 0]. We call $math[U] the **Universal Turing Machine** and say that $math[U] simulates $math[M].
 $end $end
  
 $proof ​ $proof ​
-Let $math[M] be a ''​TM''​ and $math[w = c_1c_2 ... c_n] be a word which is built from the alphabet of $math[M]. We build the Universal Turing Machine $math[U]as follows: +Let $math[M] be a ''​TM''​ and $math[w = c_1c_2 ... c_n] be a word which is built from the alphabet of $math[M]. We build the Universal Turing Machine $math[U] as follows: 
-  * The input of $math[U] is $math[enc(M)\#​enc(s_0)\#​c_1\#​c_2 ... c_n]. Note that $math[enc(s_0)] encodes the initial state of $math[M] while $math[c_1] is the fi rst ​symbol from $math[w]. The portion of the tape $math[enc(s_0)\#​c_1\#​c_2 ... c_n] will be used to mark the current ​con guration ​of $math[M], namely the current state of $math[M] (initially $math[s_0]),​ the contents of $math[M]'​s tape, and $math[M]'​s current head position. More generally, this portion of the tape is of the form $math[enc(s_i)\#​u\#​v],​ with $math[u, v \in \Sigma_b^*] and $math[s_i] being the current state of $math[M]. The last symbol of $math[u] marks the current symbol, while $math[v] is the word which is to the left of the head. Initially, the current symbol is the  first one, namely $math[c_1]. +  * The input of $math[U] is $math[enc(M)\#​enc(s_0)\#​c_1\#​c_2 ... c_n]. Note that $math[enc(s_0)] encodes the initial state of $math[M] while $math[c_1] is the first symbol from $math[w]. The portion of the tape $math[enc(s_0)\#​c_1\#​c_2 ... c_n] will be used to mark the current ​configuration ​of $math[M], namely the current state of $math[M] (initially $math[s_0]),​ the contents of $math[M]'​s tape, and $math[M]'​s current head position. More generally, this portion of the tape is of the form $math[enc(s_i)\#​u\#​v],​ with $math[u, v \in \Sigma_b^*] and $math[s_i] being the current state of $math[M]. The last symbol of $math[u] marks the current symbol, while $math[v] is the word which is to the left of the head. Initially, the current symbol is the first one, namely $math[c_1]. 
-  * $math[U] will scan the initial state of $math[M], then it will move on the initial symbol from $math[w]and  finally will move on the portion of $math[enc(M)] were transitions are encoded. Once a valid transition is found, it will execute it: +  * $math[U] will scan the initial state of $math[M], then it will move on the initial symbol from $math[w] and finally will move on the portion of $math[enc(M)] were transitions are encoded. Once a valid transition is found, it will execute it: 
     - $math[U] will change the initial state to the current one, according to the transition;     - $math[U] will change the initial state to the current one, according to the transition;
     - $math[U] will change the original symbol in $math[w] according to the transition;     - $math[U] will change the original symbol in $math[w] according to the transition;
Line 291: Line 291:
 In what follows, we examine the **Church-Turing Thesis** which is an **argument** for using the Turing Machine as a computational model: In what follows, we examine the **Church-Turing Thesis** which is an **argument** for using the Turing Machine as a computational model:
  
-//Any problem which can be solved ​byh the Turing Machine is //"​universally solvable"//​.//​+//Any problem which can be solved ​by the Turing Machine is //"​universally solvable"//​.//​
  
 The term //"​universally solvable"//​ cannot be given a precise mathematical definition. We only know solvability w.r.t. a given model of computation (abstract or concrete). ​ The term //"​universally solvable"//​ cannot be given a precise mathematical definition. We only know solvability w.r.t. a given model of computation (abstract or concrete). ​