6.47k likes | 6.49k Views
Giorgi Japaridze Theory of Computability. The Church-Turing Thesis. Episode 1. 1.1.a. Giorgi Japaridze Theory of Computability. Components of a Turing machine (TM). a a b a b b - - - - - -. (Q, , , ,start,accept,reject).
E N D
Giorgi Japaridze Theory of Computability The Church-Turing Thesis Episode 1
1.1.a Giorgi JaparidzeTheory of Computability Components of a Turing machine (TM) a a b a b b - - - - - - (Q,,,,start,accept,reject) • Q is the finite set of states • is the input alphabet not containing the blank symbol - • is the tape alphabet, where - and • is the transition function of the type Q Q{L,R} • start,accept,rejectQ, where rejectaccept; the states • accept and reject are called halting states. • There are no transitions from the halting states, and they immediately take effect! xy,R q1 q2 If the current tape symbol is x, replace it with y, move the head right and go to q2. The label xx,R is simply written as xR. If we here have L instead of R, then the head is moved left, unless it was on the first cell, in which case it remains where it was.
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R 0 0 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - 0 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept - R - x x x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R start0000 0 0 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R -q2000 - 0 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R -xq300 - x 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R -x0q40 - x 0 0 - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R -x0xq3- - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R -x0q5x - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R -xq50x - x 0 x - - - - - - -
1.1.b Giorgi JaparidzeTheory of Computability 0 L x L How a Turing machine works q5 xR - R - L xR start q2 q3 0 -,R 0x,R • R • x R - R 0 x,R 0R xR q4 reject accept • Configuration: • Current state; • Tape contents; • Head position - R -q5x0x - x 0 x - - - - - - -
1.1.c1 Giorgi JaparidzeTheory of Computability A TM accepts an input string iff, on that input, sooner or later it enters the accept state. Otherwise the string is considered rejected. • Thus, the input is rejected in two cases: • the machine enters the reject state at some point (“explicitly rejects”), • or the machine never halts (“non-explicitly rejects”). A Turing machine is said to be a decider iff it halts on every input. The set recognized by a TM M is the set of the strings that M accepts. If such an M is a decider, then we say that it not only recognizes, but also decides that set. • A set is said to be decidable (可判定的) iff some TM decides it. • A set is said to be recognizable(可识别的) iff some TM recognizes it. • Synonyms of “recognizable” are semidecidable(半可判定的) and • recursively enumerable (递归可枚举的).
1.1.c2 Giorgi JaparidzeTheory of Computability Recognizing vs. deciding start accept 0 R - R - R • R • 0 R 0 R reject What set does the above machine recognize? Does it decide that set? {0} No.
1.1.c2 Giorgi JaparidzeTheory of Computability Recognizing vs. deciding start accept 0 R - R - R • R • 0 R 0 R reject What set does the above machine recognize? Does it decide that set? {0} No. accept start 0 R - R 0 R - R reject {0} What set does the above machine recognize? Does it decide that set? Yes.
1.1.d Giorgi JaparidzeTheory of Computability Diagrams without the reject state 0 L x L xR q5 - R - L start xR q2 q3 0 -,R 0x,R • R • x R - R 0R 0 x,R accept xR - R reject q4 The reject state can be safely removed. It will be understood that all the missing transitions lead to the reject state.
1.1.d Giorgi JaparidzeTheory of Computability Diagrams without the reject state 0 L x L xR q5 - R - L start xR q2 q3 0 -,R 0x,R • R • x R - R 0R 0 x,R accept xR - R reject q4 The reject state can be safely removed. It will be understood that all the missing transitions lead to the reject state.
1.1.d Giorgi JaparidzeTheory of Computability Diagrams without the reject state 0 L x L xR q5 - R - L start xR q2 q3 0 -,R 0x,R - R 0R 0 x,R accept xR q4 The reject state can be safely removed. It will be understood that all the missing transitions lead to the reject state.
1.1.e1 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 Design a TM that recognizes (better – decides) {#n =m | n=m} 1. Sweep left to right across the tape, testing if the input has the form #*=*; if not, reject; if yes, go back to the beginning of the tape and go to step 2 (state q3). L = L x L - L R R = R - L # R start q1 q2 q9 # L q3
1.1.e2 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 2. Keep going to the right, replace the first you see before = with x andgo to step 3 (state q5); if you reach = without seeing a , go to step 4 (state q6). xR x,R q4 q3 q5 # R = R q6
1.1.e3 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 3. Keep going to the right, pass = and then replace the first you see with x andgo to the beginning of the tape, step 2 (this can be done by going to state q9); if you reach a blank without seeing a , reject. q9 x,R R = R xR q7 q5
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 4. Keep going to the right as long as you see x. If you see a before reaching a blank, reject; otherwise accept. xR - R accept q6
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # =
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # = start
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # = q1
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # = q1
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # = q1
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # = q1
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # = q1
1.1.e4 Giorgi JaparidzeTheory of Computability Designing TM: Example 1 L = L x L L = L x L - L R R = R - L # R start q1 q2 q9 # L x,R xR R x,R = R xR q4 q7 q3 q5 # R xR = R - R accept q6 - - - # = q2