Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
aa:ct:models [2019/10/07 15:23] costin.lupu.almighty |
aa:ct:models [2019/10/08 07:55] (current) costin.lupu.almighty |
||
---|---|---|---|
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 257: | Line 257: | ||
$prop[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 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 conguration 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). |