1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.

Slides:



Advertisements
Similar presentations
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Advertisements

CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
Problem: Give as many proofs as you can for the Pythagorean Theorem. i.e., a 2 + b 2 = c 2 holds for any right triangle with sides a & b and hypotenuse.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
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.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 19 Instructor: Paul Beame.
CHAPTER 4 Decidability Contents Decidable Languages
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
CSE 311 Foundations of Computing I Lecture 30 Computability: Other Undecidable Problems Autumn 2012 CSE 3111.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity Computability With Alan! (not Turing) Mind-
A Universal Turing Machine
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.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
CSE 311 Foundations of Computing I Lecture 26 Cardinality, Countability & Computability Autumn 2011 CSE 3111.
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.
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
Recursively Enumerable and Recursive Languages
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
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.
CSE 311: Foundations of Computing Fall 2014 Lecture 28: Undecidability.
The Acceptance Problem for TMs
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
CIS Automata and Formal Languages – Pei Wang
Busch Complexity Lectures: Reductions
CSE 311 Foundations of Computing I
Lecture12 The Halting Problem
Reductions Costas Busch - LSU.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Andreas Klappenecker [based on slides by Prof. Welch]
CSCE 411 Design and Analysis of Algorithms
CSE 311 Foundations of Computing I
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
Formal Languages, Automata and Models of Computation
Intro to Theory of Computation
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
CSE 311: Foundations of Computing
Instructor: Aaron Roth
Computability and Undecidability
Algorithms CSCI 235, Spring 2019 Lecture 37 The Halting Problem
Intro to Theory of Computation
CIS Automata and Formal Languages – Pei Wang
Presentation transcript:

1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame

2 Turing Machines  Church-Turing Thesis  Any reasonable model of computation that includes all possible algorithms is equivalent in power to a Turing machine  Evidence  Huge numbers of equivalent models to TM’s based on radically different ideas

3 Universal Turing Machine  A Turing machine interpreter U  On input the code of a program (or Turing machine) P and an input x, U outputs the same thing as P does on input x  Basis for modern stored-program computer  Notation:  We’ll write for the code of program P and for the pair of the program code and input

4 Halting Problem  Given: the code of a program P and an input x for P, i.e. given  Output: 1 if P halts on input x and 0 if P does not halt on input x  Theorem (Turing): There is no program that solves the halting problem “The halting problem is undecidable”

5 Proof ideas: Countability (Cantor 1875)  Defn: A set S is countable iff there is a function mapping the natural numbers N onto S.  i.e. we can write S={s 1, s 2, s 3,...}, i.e. f(i)=s i  All finite sets are countable.  The natural numbers are countable  The integers are countable  Z={0,1,-1,2,-2,3,-3,4,-4,5,-5,...} 

6 Countability  The set of all finite strings with any alphabet is countable,  e.g. binary strings  S={ , 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100,...}  i.e. list strings in order of increasing length  Any program code is a string and given any string w, we can interpret w as a program (syntactically incorrect programs are just no-ops) so the set of all programs is countable, too

7 Uncountability  The set of all functions f from the natural numbers N to {0,1} is not countable.  Suppose it were and we had a list of all such functions {f 1,f 2,f 3,...}  We build an infinite table of these functions

input f1f2f3f4f5f6f7f8...f1f2f3f4f5f6f7f8... function

input f1f2f3f4f5f6f7f8...f1f2f3f4f5f6f7f8... function

input f1f2f3f4f5f6f7f8...f1f2f3f4f5f6f7f8... function

11 Diagonalization  Define function D from N to {0,1} such that  D(i)=1-f i (i)  i.e. we flipped the diagonal elements  D must be different from every function in the list since D differs from f i on input i  Contradicts our assumption that the list had all such functions!  Corollary: There is some function f from N to {0,1} not computed by any program  more functions than programs!

12 Undecidability of the Halting Problem  Suppose that there is a program H that computes the answer to the Halting Problem  We’ll build a similar table with all the possible programs down one side and all the possible inputs along the other and do a diagonal flip to produce a contradiction

13  input  program code Entries are 1 if program P given by the code halts on input x and 0 if it runs forever

14  input  program code Want to create a new program whose halting properties are given by the flipped diagonal

15 Diagonal construction  Suppose H exists  Now define a new program D such that  D on input x:  runs H checking if the program P whose code is x halts when given x as input; i.e. does P halt on input  if H outputs 1 then D goes into an infinite loop  if H outputs 0 then D halts.

16 Finishing the argument  D must be different from any program in the list.  Suppose it has code  then D halts on input iff  H outputs 0 given program D and input iff  P runs forever on input