The Halting Problem Sipser 4.2 (pages 173-182).

Slides:



Advertisements
Similar presentations
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.
Advertisements

Turing -Recognizable vs. -Decidable
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
Algorithms Sipser 3.3 (pages ). CS 311 Mount Holyoke College 2 Computability Hilbert's Tenth Problem: Find “a process according to which it can.
Turing machines Sipser 2.3 and 3.1 (pages )
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Introduction to Computability Theory
Reducibility Sipser 5.1 (pages ).
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
Mapping Reducibility Sipser 5.3 (pages ).
More Turing Machines Sipser 3.2 (pages ).
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
CSCI 2670 Introduction to Theory of Computing October 19, 2005.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
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.
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
CHAPTER 4 Decidability Contents Decidable Languages
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive 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.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
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.
Computer Language Theory
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
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.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Turing -Recognizable vs. -Decidable
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
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.
The Acceptance Problem for TMs
Discrete Mathematics CS 2610
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
This statement is false.
CSCI 2670 Introduction to Theory of Computing
Lecture12 The Halting Problem
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
CSE 105 theory of computation
Decidable Languages Costas Busch - LSU.
CS21 Decidability and Tractability
Formal Languages, Automata and Models of Computation
Intro to Theory of Computation
Theory of Computability
CS21 Decidability and Tractability
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
Decidability continued….
Intro to Theory of Computation
CSE 105 theory of computation
Presentation transcript:

The Halting Problem Sipser 4.2 (pages 173-182)

Context-free languages Taking stock All languages Turing-recognizable ? D Turing-decidable Context-free languages anbncn Regular languages 0n1n 0*1*

Are there problems a computer can’t solve?! But they seem so powerful… What about software verification? Given a program and a specification of what it should do, can we check if it is correct?

What about deciding TMs? ATM = {<M,w> | M is a TM and M accepts w} Theorem 4.11: ATM is undecidable! Is it even recognizable? Let U = “On input <M,w>, where M is a TM: Simulate M on input w. If M ever enters its accept state, accept; if M ever enters its reject state, reject.”

Towards proving undecidability Cantor 1873: How can we tell whether one infinite set is “larger” than another? A function f from A to B is One-to-one if f(x) ≠ f(y) if x≠y (f never maps two elements to the same value) Onto if every element of B is hit A correspondence is a function that is both one-to-one and onto

Countable sets Sets A and B have the same size if: A and B are finite with the same number of elements A and B are infinite with a correspondence between them A set is countable if it is finite or has the same size as N (natural numbers 1, 2, 3,…)

For example… E = { even natural numbers } is countable Define f : N → E as f(n) = 2n n f(n) 1 2 4 3 6 …

Diagonalization Theorem 4.17: R is uncountable. Proof: By contradiction. Assume there is a correspondence. We find a real number x ≠ f(n) for any natural number n. n f(n) 1 3.14159… 2 55.55555… 3 0.12345… 4 0.50000… …

Put your thinking caps on! How do we show that: Σ* is countable assume Σ = {0,1} B = { all infinite binary sequences } is uncountable

Uh-oh… Theorem 4.18: Some languages are not Turing-recognizable. Proof: Let L be the set of all languages over Σ. Define a correspondence from L to B. Σ*= { ε, 0, 1, 00, 01, 10, 11, 000, 001,…} A = { 0, 00, 01, 000, 001,…} ΧA= 0 1 0 1 1 0 0 1 1 …

The Halting Problem ATM = {<M,w> | M is a TM and M accepts w} Theorem 4.11: ATM is undecidable. Proof: By contradiction. Assume H is a decider for ATM. We construct a TM D = “On input <M>, where M is a TM: Run H in input <M, <M>> If H accepts, reject; if H rejects, accept.”

Huh? What if we run D on <D>? Then D(<M>) = accept if M does not accept <M> reject if M accepts <M> What if we run D on <D>? Then Contradiction! Then H cannot exist and ATM is undecidable. D(<D>) = accept if D does not accept <D> reject if D accepts <D>

Where is the diagonalization? Running a machine on its description <M1> <M2> <M3> <M4> … M1 accept M2 M3 M4

Where is the diagonalization? Running H on a machine and its description <M1> <M2> <M3> <M4> … M1 accept reject M2 M3 M4

Where is the diagonalization? Adding D to the picture <M1> <M2> <M3> <M4> … <D> M1 accept reject M2 M3 M4 D ?

So have we found a language that is not Turing-recognizable? Theorem 4.22: A language is decidable iff it and its complement are recognizable Then ATM is not Turing-recognizable!

Context-free languages Updating the picture All languages Turing-recognizable ATM D Turing-decidable Context-free languages anbncn Regular languages 0n1n 0*1*