What computers just cannot do. (Part II) COS 116: 3/5/2008 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.
Prove the Impossible Sep 28 No program can check whether another program will run into infinite loop. x=0.
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.
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.
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.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
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.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
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.
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
Algorithms: Selected Exercises Goals Introduce the concept & basic properties of an algorithm.
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.
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.
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.
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.
What computers just cannot do. (Part II) COS 116: 3/1/2011 Sanjeev Arora.
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.
Recursively Enumerable and Recursive Languages
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Introduction to Turing Machines
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.
Undecidability and The Halting Problem
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
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
P.V.G’s College of Engineering, Nashik
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/5/2008 Sanjeev Arora

Administrivia Midterm - in-class 3/13  Review session Tues and Wed during lab slot.  2006 midterm linked under “extras” on web

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

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 halts 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

Is there a universal pseudocode program ? How would you write it? 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 the 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: Discussion Time 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?

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 and simulate H on it. 4.If H says “Doesn’t Halt”, HALT immediately. 5.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 ( can arise in unexpected places) Universal Program No real boundary between hardware, software, and data 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

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 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. 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!