IDT Open Seminar AAN TUING AND HIS EGACY 00 Years Turing celebration http://www.mrtc.mdh.se/~gdc/work/turingcentenary.pdf http://www.mrtc.mdh.se/ mdh se/~gdc/work/turingmachine.pdf Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University March 8 th 202
Chomsky anguage Hyerarchy a n b n c n Turing Machines Push-down Automata n n b a b ww ww Finite Automata a * a *b* 2
TUING MACHINES Turing s "Machines". These machines are humans who calculate. (Wittgenstein) A man provided with paper, pencil, and rubber, and subject to strict discipline, is in effect a universal machine. (Turing) 3
Tape... Turing Machine... Control Unit ead-write head 4
... The Tape No boundaries -- infinite length... ead-write head The head moves eft or ight 5
...... ead-write head The head at each time step:. eads a symbol 2. Writes a symbol 3. Moves eft or ight 6
The Input String Input string Blank symbol... # # a b a c # # #... head Head starts t at the leftmost t position of the input string 7
Determinism Turing Machines are deterministic Allowed Not Allowed q a b, a b, q2 q 2 q d 3 q a d, 3 b d, q No lambda transitions allowed in TM! 8
Determinism Note the difference between state indeterminism when not even possible future states are known in advance. and choice indeterminism when possible future states are known, but we do not know which state will be taken. 9
Halting The machine halts if there are no possible transitions to follow 0
Example... # # a b a c # # #... q a b, b d, q 2 q 3 q No possible transition HAT!
Final States q q 2 Allowed q q2 Not Allowed Final states have no outgoing transitions In a final state the machine halts 2
Acceptance Accept Input If machine halts in a final state eject Input If machine halts in a non-final state or If machine enters an infinite loop 3
Formal Definitions for Turing Machines 4
Transition Function a b, q q 2 δ ( 2 q, a) = ( q, b, ) 5
Transition Function c d, q q2 δ ( q, c ) = ( q2, d, ) 6
Turing Machine States Input alphabet Tape alphabet M = ( Q, Σ, Γ, δ, q, #, F 0 ) Transition Final function Initial state blank states 7
The Accepted anguage For any Turing Machine M ( M ) = { w : q0 w a x q f x2} Initial state Final state 8
Standard Turing Machine The machine we described is the standard: Deterministic Infinite tape in both directions Tape is the input/output file 9
Computing Functions with Turing Machines 20
f A function is computable if there is a Turing Machine M such that a q0 w a q f f (w) w Initial Configuration Final Configuration For all w D Domain 2
Example (Addition) The function f ( x, y) = x + y is computable x, y are integers Turing Machine: Input string: x00 y unary Output string: xy0 unary 22
x y Start 0 # # q 0 initial state x + y Finishi # 0 # q f final state 23
Turing machine for function f ( x, y) = x + y,,, 0, q0 q # #, q 0, 2 q 3 q 4 # #, 24
Execution Example: Time 0 x y = x (2) # 0 # y = (2) q0 Final esult x + y # 0 # q 4 25
f ( x, y) = x + y Time 0 0 # # q 0,,, q0 q # #, q2 0, 0, q 3 q 4 # #, 26
f ( x, y) = x + y Time # 0 # q 0,,, q0 q # #, q2 0, 0, q 3 # #, q 4 27
Time 2 # 0 # q 0 f ( x, y) = x + y,,, 0, q # #,# q2 q0 0, q 3 q 4 # #, 28
f ( x, y) = x + y Time 3 # # q,,, q0 q # #, q2 0, 0, q 3 # #, q 4 29
f ( x, y) = x + y Time 4 # # q,,, q0 q # #, q2 0, 0, q 3 q 4 # #, 30
f ( x, y) = x + y Time 5 # # q,,, q0 q # #, q2 0, 0, q 3 q 4 # #, 3
f ( x, y) = x + y Time 6 # # q 2,,, q0 q # #, q2 0, 0, q 3 # #, q 4 32
f ( x, y) = x + y Time 7 # 0 # q 3,,, q0 q # #, q2 0, 0, q 3 q 4 # #, 33
f ( x, y) = x + y Time 8 # 0 # q 3,,, q0 q # #, q2 0, 0, q 3 q 4 # #, 34
f ( x, y) = x + y Time 9 # 0 # q 3,,, q0 q # #, q2 0, 0, q 3 q 4 # #, 35
f ( x, y) = x + y Time 0 # 0 # q 3,,, q0 q # #, q2 0, 0, q 3 q 4 # #, 36
f ( x, y) = x + y Time # 0 # q 3,,, q0 q # #, q2 0, 0, q 3 # #, q 4 37
f ( x, y) = x + y Time 2 # 0 # q 4,,, q0 q # #, q2 0, 0, q 3 HAT & accept q 4 # #, 38
Universal Turing Machine 39
A limitation of Turing Machines: Turing Machines are hardwired they execute only one program 40
Solution: Universal Turing Machine Characteristics: eprogrammable machine Simulates any other Turing Machine 4
Universal Turing Machine simulates any other Turing Machine M Input to Universal Turing Machine: Description of transitions ofmm Initial tape contents of M 42
Tape Three tapes Description of M Universal Turing Machine Tape 2 Tape Contents of Tape 3 M State of M 43
Tape Description of M We describe Turing machine as a string of symbols: M We encode as a string of symbols M 44
Alphabet Encoding Symbols: a b c d K Encoding: 45
State Encoding States: q q2 q3 q4 K Encoding: Head Move Encoding Move: Encoding: 46
Transition Encoding δ Transition: ( q, a) = ( q2, b, ) Encoding: 0 0 0 0 separator 47
Machine Encoding Transitions: δ ( q, a ) = ( q2, b, ) δ ( q 2, b ) = ( q3, c, ) Encoding: 0 0 0 0 00 00 0 0 separator 48
Tape contents of Universal Turing Machine: encoding of the simulated machine as a binary string of 0 s and s M 49
As Turing Machine is described with a binary string of 0 s and s the set of Turing machines forms a language: g Each string of the language is the binary encoding of a Turing Machine. 50
anguage of Turing Machines = { 00000, (Turing Machine ) 0000000, (Turing Machine 2) 0000000, } 5
CHUCH TUING THESIS Question: Do Turing machines have the same power with a digital computer? Intuitive answer: Yes There was no formal proof of Church-Turing u thesis ess until 2008! 52
Dershowitz, N. and Gurevich, Y. A Natural Axiomatization of Computability and Proof of Church's Thesis, Bulletin of Symbolic ogic, v. 4, No. 3, pp. 299-350 (2008) This formal proof of Church-Turing thesis relies on an axiomatization of computation that excludes randomness, parallelism and quantum computing and thus corresponds to the idea of computing that Church and Turing had. 53
Turing s gs thesis ess Any computation carried out by algorithmic means can be performed by a Turing Machine. (930) http://www.engr.uconn.edu/~dqg/papers/myth.pdf p p p The Origins of the Turing Thesis Myth Goldin & Wegner 54