19_universality - 1 Introduction to Computer Science •...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Introduction to Computer Science • Sedgewick and Wayne • Copyright © 2007 • http://www.cs.Princeton.EDU/IntroCS Duality, Universality, and Computability 2 Fundamental Questions Q. What is a general-purpose computer? Q. Are there limits on the power of digital computers? Q. Are there limits on the power of machines we can build? Pioneering work in the 1930s. Hilbert, Gödel, Turing, Church, von Neumann. Automata, languages, computability, universality, complexity, logic. David Hilbert Kurt Gödel Alan Turing Alonzo Church John von Neumann Introduction to Computer Science • Sedgewick and Wayne • Copyright © 2007 • http://www.cs.Princeton.EDU/IntroCS 7.5 Turing Machines Alan Turing (1912-1954) 4 Turing Machine Desiderata. Simple model of computation that is "as powerful" as conventional computers. Intuition. Simulate how humans calculate. Ex. Addition. 0 0 0 0 0 0 0 1 0 0 0 0 2 3 4 5 0 0 + 3 0 0 0 0 1 4 1 5 0 0 0 0 0 0 0 6 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 Turing Machine: Tape Tape. Stores input, output, and intermediate results. One arbitrarily long strip, divided into cells. Finite alphabet of symbols. Tape head. Points to one cell of tape. Reads a symbol from active cell. Writes a symbol to active cell. Moves left or right one cell at a time. tape head tape tape head tape # 1 1 0 0 + 1 0 1 1 # … … tape 6 L L 1 1 : 0 R 2 L 3 # : # + : + R 4 H 5 0 : 1 # : 1 1 : 0 0 : 1 + : # # : # 1 : # Turing Machine: States State. What machine remembers. State transition diagram. Complete description of what machine will do. if in state 3 and tape head is : • write a 1 • go to state 2 • move tape head right # 1 1 0 0 + 1 0 1 1 # … … tape (before) 7 State. What machine remembers. State transition diagram. Complete description of what machine will do. L L 1 1 : 0 R 2 L 3 # : # + : + R 4 H 5 0 : 1 # : 1 1 : 0 0 : 1 + : # # : # 1 : # Turing Machine: States # 1 1 0 0 + 1 0 1 1 # … … tape (after) 1 0 R 2 if in state 3 and tape head is : • write a 1 • go to state 2 • move tape head right 8 Binary Adder # 1 0 1 0 + 1 1 1 1 # … L L 1 : 0 R L # : # + : + R H 0 : 1 # : 1 Fnd right end of y add one to x subtract one from y Fnd plus sign 1 : 0 0 : 1 … x y + : # # : # halt clean up 1 : # 2 5 Turing Machine: Tape Tape. Stores input, output, and intermediate results. One arbitrarily long strip, divided into cells. Finite alphabet of symbols. Tape head. Points to one cell of tape. Reads a symbol from active cell. Writes a symbol to active cell. Moves left or right one cell at a time. tape head tape tape head tape # 1 1 0 0 + 1 0 1 1 # … … tape 6 L L 1 1 : 0 R 2 L 3 # : # + : + R 4 H 5 0 : 1 # : 1 1 : 0 0 : 1 + : # # : # 1 : # Turing Machine: States State. What machine remembers....
View Full Document

Page1 / 14

19_universality - 1 Introduction to Computer Science •...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online