cs 758 858 algorithms
play

CS 758/858: Algorithms http://www.cs.unh.edu/~ruml/cs758 Turing - PowerPoint PPT Presentation

CS 758/858: Algorithms http://www.cs.unh.edu/~ruml/cs758 Turing Machines Undecidability Wheeler Ruml (UNH) Class 23, CS 758 1 / 23 Turing Machines Computing Models A.M. Turing The set up In summary Extensions


  1. CS 758/858: Algorithms http://www.cs.unh.edu/~ruml/cs758 Turing Machines Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 1 / 23

  2. Turing Machines ■ ‘Computing’ ■ Models ■ A.M. Turing ■ The set up ■ In summary ■ Extensions ■ The thesis ■ Other models Turing Machines ■ Universality ■ Minsky’s machine Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 2 / 23

  3. What is ‘information processing’? Take some input, process it, render some output. Turing Machines ■ ‘Computing’ ■ Models Would like an abstract model for this, independent of realization. ■ A.M. Turing ■ The set up ■ In summary No homunculi! ‘Process’ steps must be clear and unambiguous. ■ Extensions ■ The thesis ■ Other models ■ Universality ■ Minsky’s machine Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 3 / 23

  4. Modeling of Computing finite-state machine: regular langauges ■ Turing Machines pushdown automaton: context-free languages ■ ‘Computing’ ■ ■ Models Turing machine: computable languages ■ ■ A.M. Turing ■ The set up ■ In summary ■ Extensions ■ The thesis ■ Other models ■ Universality ■ Minsky’s machine Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 4 / 23

  5. Alan Mathison Turing (1912-1954) Turing Machines ■ ‘Computing’ ■ Models ■ A.M. Turing ■ The set up ■ In summary ■ Extensions ■ The thesis ■ Other models ■ Universality ■ Minsky’s machine Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 5 / 23

  6. The set up A Turing machine has: Turing Machines ■ ‘Computing’ a processor that can be in one of a finite number of states ■ ■ Models ■ A.M. Turing an infinite tape of symbols (from finite alphabet) ■ ■ The set up a head that reads and writes the tape, one symbol at a time ■ ■ In summary ■ Extensions ■ The thesis q8 q0 ■ Other models q7 q1 ■ Universality ■ Minsky’s machine q6 q2 Undecidability q5 q3 q4 ... ... a b b a Wheeler Ruml (UNH) Class 23, CS 758 – 6 / 23

  7. The set up A Turing machine has: Turing Machines ■ ‘Computing’ a processor that can be in one of a finite number of states ■ ■ Models ■ A.M. Turing an infinite tape of symbols (from finite alphabet) ■ ■ The set up a head that reads and writes the tape, one symbol at a time ■ ■ In summary ■ Extensions ■ The thesis q8 q0 ■ Other models q7 q1 ■ Universality ■ Minsky’s machine q6 q2 Undecidability The processor looks at q5 q3 q4 1. the symbol under the head 2. its current state ... ... a b b a and then 3. writes a symbol (could be same as old) 4. moves the head left, right, or stays still 5. puts itself in a next state (could be same as old) Wheeler Ruml (UNH) Class 23, CS 758 – 6 / 23

  8. In summary A Turing machine is: Turing Machines ■ ‘Computing’ 1. a finite alphabet of possible tape symbols (including ✷ ) ■ Models ■ A.M. Turing 2. an infinite tape of symbols (initially ✷ , except for input) ■ The set up 3. a starting head position ■ In summary ■ Extensions 4. a finite set of possible processor states ■ The thesis 5. a starting processor state ■ Other models ■ Universality 6. a set of ‘final’ processor states ■ Minsky’s machine 7. a set of transition rules for the processor Undecidability One of the first (and still most popular) abstract models of computation. Wheeler Ruml (UNH) Class 23, CS 758 – 7 / 23

  9. Extensions tape infinite in only one direction ■ Turing Machines multiple tapes at once ■ ‘Computing’ ■ ■ Models multiple heads at once ■ ■ A.M. Turing ■ The set up 2-D ”tape” ■ ■ In summary ■ Extensions All polytime related! ■ The thesis ■ Other models ■ Universality ■ Minsky’s machine Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 8 / 23

  10. Church-Turing Thesis Turing Machines ■ ‘Computing’ ■ Models ■ A.M. Turing ■ The set up ■ In summary ■ Extensions ■ The thesis ■ Other models ■ Universality Any ‘effective computing procedure’ can be ■ Minsky’s machine represented as a Turing machine. Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 9 / 23

  11. Other models equivalent to Turing machines (compute time may vary): Turing Machines ■ ‘Computing’ Post rewriting systems (grammars) ■ ■ Models ■ A.M. Turing recursive functions ■ ■ The set up λ calculus ■ ■ In summary ■ Extensions parallel computers ■ ■ The thesis cellular automata ■ Other models ■ ■ Universality certain artificial neural networks (most are weaker) ■ ■ Minsky’s machine quantum computers ■ Undecidability There must be something substantive about this! Wheeler Ruml (UNH) Class 23, CS 758 – 10 / 23

  12. Universal machines Can represent Turing machine as a table Turing Machines ■ ‘Computing’ ■ Models state, symbol → symbol, action, state ■ A.M. Turing state, symbol → symbol, action, state ■ The set up . ■ In summary . . ■ Extensions ■ The thesis ■ Other models ■ Universality Can write the table on an input tape ■ Minsky’s machine Undecidability Universal machine: input is machine and machine’s input ‘Stored program’ computation Wheeler Ruml (UNH) Class 23, CS 758 – 11 / 23

  13. Minsky’s universal machine Turing Machines ■ ‘Computing’ ■ Models ■ A.M. Turing ■ The set up ■ In summary ■ Extensions ■ The thesis ■ Other models ■ Universality ■ Minsky’s machine Undecidability Wheeler Ruml (UNH) Class 23, CS 758 – 12 / 23

  14. Turing Machines Undecidability ■ Halting problem ■ A simpler problem ■ A paradox ■ Undecidability ■ Break ■ Rice’s Theorem ■ Proof Sketch Undecidability ■ Summary ■ Coping with NPC ■ EOLQs Wheeler Ruml (UNH) Class 23, CS 758 – 13 / 23

  15. The halting problem H: given M and its input i , does M halt on i ? Turing Machines Undecidability ■ Halting problem ■ A simpler problem ■ A paradox ■ Undecidability ■ Break ■ Rice’s Theorem ■ Proof Sketch ■ Summary ■ Coping with NPC ■ EOLQs Wheeler Ruml (UNH) Class 23, CS 758 – 14 / 23

  16. The halting problem H: given M and its input i , does M halt on i ? Turing Machines Undecidability deciding H: output Y or N ■ Halting problem accepting H: halting ( = Y ) or computing forever ( = N ) ■ A simpler problem ■ A paradox ■ Undecidability Any universal machine can accept H. ■ Break ■ Rice’s Theorem But can a machine decide it? ■ Proof Sketch ■ Summary ■ Coping with NPC ■ EOLQs Wheeler Ruml (UNH) Class 23, CS 758 – 14 / 23

  17. A simpler problem H: given M and its input i , does M halt on i ? Turing Machines Undecidability SH: given M , does M halt on its own encoding? ■ Halting problem ■ A simpler problem ■ A paradox But can a machine decide this simpler problem? ■ Undecidability ■ Break ■ Rice’s Theorem ■ Proof Sketch ■ Summary ■ Coping with NPC ■ EOLQs Reminder: deciding H: output Y or N accepting H: halting ( = Y ) or computing forever ( = N ) Wheeler Ruml (UNH) Class 23, CS 758 – 15 / 23

  18. A simpler problem H: given M and its input i , does M halt on i ? Turing Machines Undecidability SH: given M , does M halt on its own encoding? ■ Halting problem ■ A simpler problem ISH: given M , does M not halt on its own encoding? ■ A paradox ■ Undecidability ■ Break ‘Can a machine decide SH?’ is fundamentally the same as ■ Rice’s Theorem ■ Proof Sketch ‘Can a machine decide ISH?’ which is easier than ■ Summary ‘Can a machine accept ISH?’ ■ Coping with NPC ■ EOLQs Reminder: deciding H: output Y or N accepting H: halting ( = Y ) or computing forever ( = N ) Wheeler Ruml (UNH) Class 23, CS 758 – 15 / 23

  19. A paradox H: given M and its input i , does M halt on i ? Turing Machines Undecidability SH: given M , does M halt on its own encoding? ■ Halting problem ■ A simpler problem ISH: given M , does M not halt on its own encoding? ■ A paradox ■ Undecidability ■ Break Let’s assume we have a machine S that accepts ISH. ■ Rice’s Theorem ■ Proof Sketch What happens when S is given itself as input? Does it halt? ■ Summary ■ Coping with NPC ■ EOLQs Reminder: deciding H: output Y or N accepting H: halting ( = Y ) or computing forever ( = N ) Wheeler Ruml (UNH) Class 23, CS 758 – 16 / 23

  20. A paradox H: given M and its input i , does M halt on i ? Turing Machines Undecidability SH: given M , does M halt on its own encoding? ■ Halting problem ■ A simpler problem ISH: given M , does M not halt on its own encoding? ■ A paradox ■ Undecidability ■ Break Let’s assume we have a machine S that accepts ISH. ■ Rice’s Theorem ■ Proof Sketch What happens when S is given itself as input? Does it halt? ■ Summary ■ Coping with NPC If S halts on S , the definition of ISH means S doesn’t halt on S . ■ EOLQs If S doesn’t halt on S , that means that S does halt on S . Reminder: deciding H: output Y or N accepting H: halting ( = Y ) or computing forever ( = N ) Wheeler Ruml (UNH) Class 23, CS 758 – 16 / 23

Recommend


More recommend