Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines Definition of Algorithm: If there exists an algorithm for computing a function f(w), then there is a Turing Machine capable of computing f(w). Courtesy Costas Busch - RPI 1
The Standard Model Infinite Tape a a b a b b c a c a Read-Write Head (Left or Right) Control Unit Deterministic Courtesy Costas Busch - RPI 2
Variations of Turing Machines Turing machines with: Stay-Option Multi-tape Courtesy Costas Busch - RPI 3
Variations of Turing Machines For any machine M 1 of one class there is a machine M 2 of another class such that: L ( M1) = L( M 2) And vice-versa Courtesy Costas Busch - RPI 4
Variations of Turing Machines Simulation: a technique to prove same power Simulate the machine of one class with a machine of the other class First Class Original Machine Second Class Simulation Machine M 2 M 1 M 1 Courtesy Costas Busch - RPI 5
Final Configuration Original Machine: d f Simulation Machine: d f The Simulation Machine and the Original Machine accept the same language. Courtesy Costas Busch - RPI 6
Turing Machines with Stay-Option The head can stay in the same position a a b a b b c a c a Left, Right, Stay L,R,S: moves Courtesy Costas Busch - RPI 7
Example: Time 1 a a b a b b c a c a q 1 q1 q2 Time 2 b a b a b b c a c a q 2 a b, S Courtesy Costas Busch - RPI 8
Stay-Option Machine a b, L q1 q2 Simulation in Standard Machine a b, L q1 q2 Similar for Right moves Courtesy Costas Busch - RPI 9
Stay-Option Machine a b, S q1 q2 Simulation in Standard Machine a b, L q1 q2 x x, R q 3 For every symbol x Courtesy Costas Busch - RPI 10
Example Stay-Option Machine: a b, S q1 q2 1 a a b a 2 b a b a q 1 q 2 Simulation in Standard Machine: 1 2 3 a a b a b a b a b a b a q 1 q 2 q 3 Courtesy Costas Busch - RPI 11
Standard Machine--Multiple Track Tape a b b a a c b d track 1 track 2 Courtesy Costas Busch - RPI 12
a b b a a c b d track 1 track 2 q 1 a b c d a c b d track 1 track 2 q 2 ( b, a) ( c, d), L q1 q2 Courtesy Costas Busch - RPI 13
Multi-tape Turing Machines Control unit Tape 1 Tape 2 a b c Input e f g Courtesy Costas Busch - RPI 14
Tape 1 Time 1 Tape 2 a b c e f g q1 q1 a g c Time 2 e d g q2 q2 ( b, f ) ( g, d), L, R q1 q2 Courtesy Costas Busch - RPI 15
Multi-tape machines Theorem: Multi-tape machines have the same power with Standard Turing Machines Same power doesn t imply same speed: n b n Language L = { a } Standard machine Two-tape machine Acceptance Time 2 n n Courtesy Costas Busch - RPI 16
n b n L = { a } Standard machine: Multi-tape machines 2 n Go back and forth times Two-tape machine: n b Copy to tape 2 n Leave a on tape 1 Compare tape 1 and tape 2 ( n steps) ( n steps) ( n steps) Courtesy Costas Busch - RPI 17
Universal Turing Machine Reprogrammable machine Simulates any other Turing Machine Input of a Universal Turing Machine: Description of transitions of M Initial tape contents of M Courtesy Costas Busch - RPI 18
Tape 1 Three tapes Description of M Universal Turing Machine Tape 2 Tape Contents of M Tape 3 State of M Courtesy Costas Busch - RPI 19
Alphabet Encoding Symbols: a b c d Κ Encoding: 1 11 111 1111 Courtesy Costas Busch - RPI 20
State Encoding States: q1 q2 q3 q4 Κ Encoding: 1 11 111 1111 Head Move Encoding Move: L R Encoding: 1 11 Courtesy Costas Busch - RPI 21
Transition Encoding δ Transition: ( q 1, a) = ( q2, b, L) Encoding: 1 01 011 011 01 separator Courtesy Costas Busch - RPI 22
Machine Encoding δ Transitions: ( 2 q 1, a) = ( q, b, L) δ ( 3 q 2, b) = ( q, c, R) Encoding: 1 01 011 011 01 00 11 0110111 0111 011 separator Courtesy Costas Busch - RPI 23
A Universal Turing Machine is described with a binary string of 0 s and 1 s Courtesy Costas Busch - RPI 24
Let S be a set of strings An enumeration procedure for is a Turing Machine that generates all strings of one by one and Enumeration procedure S Each string is generated in finite time S Courtesy Costas Busch - RPI 25
strings s1, s2, s3, Κ S Enumeration Machine for S output (on tape) s1, s2, s3, Κ Finite time: t1, t2, t3, Κ Courtesy Costas Busch - RPI 26
Enumeration Machine Time 0 Configuration q 0 Time t 1 x1 # s1 q s Courtesy Costas Busch - RPI 27
Time t 2 x2 # s2 q s Time t 3 x3 # s 3 q s Courtesy Costas Busch - RPI 28
Recursively Enumerable A language is recursively enumerable if some Turing machine accepts it Courtesy Costas Busch - RPI 29
Let L be a recursively enumerable language and M the Turing Machine that accepts it w For string : if w L then halts in a final state M if w L then halts in a non-final state M or loops forever Courtesy Costas Busch - RPI 30
Definition: A language is recursive if some Turing machine accepts it and halts on any input string Courtesy Costas Busch - RPI 31
Let L be a recursive language and M the Turing Machine that accepts it w For string : if w L then halts in a final state M if w L then halts in a non-final state M Courtesy Costas Busch - RPI 32
Theorem: if a language L is recursive then there is an enumeration procedure for it Courtesy Costas Busch - RPI 33
Proof: Enumeration Machine M ~ M Enumerates all Accepts L strings of input alphabet Courtesy Costas Busch - RPI 34
If the alphabet is then M ~ { a, b} can enumerate strings as follows: a b aa ab ba bb aaa aab... Courtesy Costas Busch - RPI 35
Enumeration procedure Repeat: M ~ generates a string w M checks if w L YES: NO: print to output w ignore w End of Proof Courtesy Costas Busch - RPI 36
Example: L = { b, ab, bb, aaa,...} M ~ a L(M ) Enumeration Output b aa ab ba bb aaa aab... b ab bb aaa... Courtesy Costas Busch - RPI 37 b ab bb aaa...