Slide 1“Prof, what’s with all the negative thinking?!?”Slide 3In Science….In Mathematics….. “Can mathematicians be replaced by machines?”Understanding complex systems (or even simple systems)….In computer science……More Computer Science… Automated Software Checking?Slide 9What is a computation?Turing’s modelExample: What does this program do?Let’s try another…Slide 14Surprising facts about this simple modelSlide 16“Code” for a programPrograms and DataUniversal Program UAutomated Bug Checking RevisitedNext Week: Halting Problem is unsolvable by another programWhat computers just cannot do.COS 116, Spring 2012Adam Finkelstein“Prof, what’s with all the negative thinking?!?”An obvious motivation: Understand the limits of technology“What computers can’t do.”The power of negative thinking….In Science….Impossibility of trisecting angle with ruler and compass (Galois)Often, impossibility result deep insightExamples Nothing travels faster than lightGroup Theory and much of modern mathRelativity and modern physicsIn Mathematics…..“Can mathematicians be replaced by machines?”Axioms – Set of statementsDerivation rules – finite set of rules for deriving new statements from axiomsTheorems – Statements that can be derived from axioms in a finite number of stepsMathematician – Person who tries to determine whether or not a statement is a theorem.[Hilbert, 1900]Math is axiomatic“Given starting configuration for the game of life, determine whether or not cell (100,100) is ever occupied by a critter.”John ConwayUnderstanding complex systems(or even simple systems)….Can a simple set of mathematical equations “solve” problems like:In computer science……CryptographyCAPTCHAMore Computer Science…Automated Software Checking?Windows Vista: 50-million line programCan computers check whether or not it will ever crash?Discussion TimeWhat is a computation?(need to know this to know what can/cannot be computed)Next: How did Turing set about formalizing this age-old notion and what were the features of his model?What is a computation?Basic ElementsScratch PadStep-by-step description of what to do (“program”); should be finite!At each step:Can only scan a fixed number of symbolsCan only write a fixed number of symbols(see reading by Davis)Turing’s model1 dimensional unlimited scratchpad (“infinite tape”)Only symbols are 0 or 1 (tape has a finite number of 1s)Can only scan/write one symbol per stepProgram looks like 1. PRINT 0 2. GO LEFT 3. GO TO STEP 1 IF 1 SCANNED 4. PRINT 1 5. GO RIGHT 6. GO TO STEP 5 IF 1 SCANNED 7. PRINT 1 8. GO RIGHT 9. GO TO STEP 1 IF 1 SCANNED 10. STOP The Doubling ProgramExample: What does this program do?1. PRINT 0 2. GO RIGHT 3. GO TO STEP 1 if 1 SCANNED 4. GO TO STEP 2 if 0 SCANNEDLet’s try another…http://ironphoenix.org/tril/tm/Discussion TimeCan this computational model do every computation that pseudocode can?How do we implement arithmetic instructions, arrays, loops?Surprising facts about this simple modelIt can do everything that pseudocode can doHence it can “simulate” any other physical system, and in particular simulate any otherphysically realizable “computer.”[CHURCH-TURING THESIS”]THIS MODEL CAPTURES THE NOTION OF “COMPUTATION” ----TURINGRecall: Numbers and letters can be written in binary.A program can also be represented by a string of bits!“Code” for a programMany conventions possible (e.g., ASCII)Davis’ convention: P Code (P)= Binary RepresentationPrograms and DataUsual viewpoint - A False Dichotomy!ProgramDataBut can have - ProgramCode of ProgramUniversal Program UU “simulates” what P would do on that dataData U Program P(Sometimes also known as “interpreter”)DVAutomated Bug Checking RevisitedHalting ProblemLet P = program such that code(P) = V. Does P halt on data D?Trivial Idea: Simulate P using universal program U. If P halts, will eventually detect.Problem: But if P never halts, neither does the simulation.IDEAS???Next Week: Halting Problem is unsolvable by another programHomework for next week will be posted this afternoon.Includes: Write a Turing-Post program that prints the bit sequence 101 infinitely often,as well as its binary code Thurs: Digital audio (guest: Prof. Fiebrink) Read this proof in the Davis article, and try to understand.Ponder the meaning of “Proof by contradiction.”How convincing is such a proof?“When something’s not right, it’s wrong…” -Bob
View Full Document