What computers just cannot do. (Part II) COS 116: 3/1/2011 Sanjeev Arora.

Slides:



Advertisements
Similar presentations
Chapter 11: Models of Computation
Advertisements

What computers just cannot do. (Part II) COS 116, Spring 2012 Adam Finkelstein.
CS211 Problems: unsolvable, unfeasible and unsolved Topic 2: Halting problem.
The Recursion Theorem Sipser – pages Self replication Living things are machines Living things can self-reproduce Machines cannot self reproduce.
Limitations. Limitations of Computation Hardware precision Hardware precision Software - we’re human Software - we’re human Problems Problems –complex.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
FLAC Lecture 19 Turing Machines and Real Life * Reductions Mihai Budiu March 3, 2000.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
What computers just cannot do. (Part II) COS 116: 3/5/2008 Sanjeev Arora.
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Self-reproducing programs. And Introduction to logic. COS 116: 3/6/2008 Sanjeev Arora.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
From Greek philosophers to circuits: An introduction to boolean logic. COS 116, Spring 2011 Sanjeev Arora.
Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
CSE 311 Foundations of Computing I Lecture 30 Computability: Other Undecidable Problems Autumn 2012 CSE 3111.
1 Ethics of Computing MONT 113G, Spring 2012 Session 13 Limits of Computer Science.
1 CO Games Development 2 Week 21 Turing Machines & Computability Gareth Bellaby.
The Recursion Theorem Pages 217– ADVANCED TOPICS IN C O M P U T A B I L I T Y THEORY.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
Undecidable Languages (Chapter 4.2) Héctor Muñoz-Avila.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Great Theoretical Ideas in Computer Science for Some.
Halting Problem Introduction to Computing Science and Programming I.
1 Theory: Models of Computation  Readings:  Chapter 11 & Chapter 3.6 of [SG]  Content:  What is a Model  Model of Computation  Model of a Computing.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
CSE 311 Foundations of Computing I Lecture 29 Computability: Turing machines, Undecidability of the Halting Problem Autumn 2012 CSE 3111.
Turing Machines and the Halting Problem This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To.
Great Theoretical Ideas in Computer Science.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Russell’s Paradox and the Halting Problem Lecture 24 Section 5.4 Wed, Feb 23, 2005.
SNU OOPSLA Lab. 1 Great Ideas of CS with Java Part 1 WWW & Computer programming in the language Java Ch 1: The World Wide Web Ch 2: Watch out: Here comes.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
On computable numbers, with an application to the ENTSCHEIDUNGSPROBLEM COT 6421 Paresh Gupta by Alan Mathison Turing.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
The Halting Problem.
CSE 311 Foundations of Computing I
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Computable Problems.
Homework: Friday Read Section 4.1. In particular, you must understand the proofs of Theorems 4.1, 4.2, 4.3, and 4.4, so you can do this homework. Exercises.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Formal Languages, Automata and Models of Computation
Recall last lecture and Nondeterministic TMs
CSE 311: Foundations of Computing
CO Games Development 2 Week 21 Turing Machines & Computability
Turing Machines Everything is an Integer
Presentation transcript:

What computers just cannot do. (Part II) COS 116: 3/1/2011 Sanjeev Arora

Administrivia Midterm - in-class 3/10  Review session Wed during lab slot.  Past midterm available on website for self-study.

Recap from last time Turing-Post computational model:  Greatly simplified model  Infinite tape, each cell contains 0/1  Program = finite sequence of instructions (only 6 types!)  Unlike pseudocode, no conditionals or loops, only “GOTO”  code(P) = binary representation of program P

What does this program do? 1.GO RIGHT 2.GO TO STEP 1 IF 1 SCANNED 3.GO TO STEP 1 IF 0 SCANNED 4.STOP

Example: doubling program 1. PRINT 0 2. GO LEFT 3. GO TO STEP 2 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 Program said to halt on this input data if STOP is executed in a finite number of steps

Some facts Fact 1: Every pseudocode program can be written as a T-P program, and vice versa Fact 2: There is a universal T-P program U … … code(P) V U simulates P’s computation on V

How would you write a universal program for T-P programs? What are some examples of universal programs in real life? Discussion Time

Halting Problem Decide whether P halts on V or not Cannot be solved! Turing proved that no Turing-Post program can solve Halting Problem for all inputs (code(P), V) … … code(P) V

Makes precise something quite intuitive: “Impossible to demonstrate a negative” Suppose program P halts on input V. How can we detect this in finite time? “Just simulate.” Intuitive difficulty: If P does not actually halt, no obvious way to detect this after just a finite amount of time. Turing’s proof makes this intuition concrete.

Ingredients of Turing’s proof…..

Fundamental assumption: A mathematical statement is either true or false “When something’s not right, it’s wrong.” Bob Dylan Ingredient 1: “Proof by contradiction”

Aside: Epimenides Paradox Κρ ῆ τες ἀ ε ί ψε ύ σται “Cretans, always liars!” But Epimenides was a Cretan!’ (can be resolved…) More troubling: “This sentence is false.”

Ingredient 2: Suppose you are given some T-P program P How would you turn P into a T-P program that does NOT halt on all inputs that P halts on? Suppose you have programs A and B. What is the program whose net effect is “Run A first and then B?”

Finally, the proof… Suppose program H solves Halting Problem on ALL inputs of the form code(P), V. H Consider program D 1.On input V, check if it is code of a T-P program. 2.If no, HALT immediately. 3.If yes, use doubling program to create the bit string V, V 4.Run H on bit string V,V. 5.If H says “Doesn’t Halt”, HALT immediately. 6.If H says “Halts”, go into infinite loop Gotcha! Does D halt on the input code(D)? If H halts on every input, so does D

Lessons to take away Computation is a very simple process; 6 simple types of operations! ( Later: can arise in unexpected places) Universal Program No real boundary between hardware, software, and data. (basis of much of modern computer technology, eg JAVA) No program that decides whether or not mathematical statements are theorems. Many tasks are uncomputable; e.g. “If we start Game of life in this configuration, will cell (100, 100) ever have a critter?”

Age-old mystery: Self-reproduction. How does the seed encode the whole?

Self-Reproduction Fallacious argument for impossibility: Blueprint

M.C. Escher Print Gallery

Discussion Time What is “reproduction” at the molecular level?

Fallacy Resolved: “Blueprint” can involve some computation; need not be an exact copy! Print this sentence twice, the second time in quotes. “Print this sentence twice, the second time in quotes.”

High-level description of program that self- reproduces Print 0 Go Right Print 1.. Print 0... } Prints binary code of B } Takes binary string on tape, and in its place prints (in English) the sequence of statements that produce it, followed by the translation of the binary string into English (ie into a T-P program). A B

Fact: for every program P, there exists a program P’ that has the exact same functionality except at the end it also prints code(P’) on the tape Self-reproducing programs MyDoom Crash user’s computer! Reproduce program send to someone else!