Introduction to Computability Theory

Slides:



Advertisements
Similar presentations
By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
Advertisements

Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Addition Facts
Formal Models of Computation Part III Computability & Complexity
Computing functions with Turing machines
Chapter 11: Models of Computation
Turing Machines.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
ABC Technology Project
25 seconds left…...
Introduction to Computability Theory
We will resume in: 25 Minutes.
Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
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.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping 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.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CHAPTER 4 Decidability Contents Decidable Languages
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
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.
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.
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]
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
1 Recursively Enumerable and Recursive Languages.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
The Acceptance Problem for TMs
Recursively Enumerable Languages
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Undecidable Problems Costas Busch - LSU.
Lecture12 The Halting Problem
Reductions Costas Busch - LSU.
Theory of Computability
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CSCE 411 Design and Analysis of Algorithms
CSE 105 theory of computation
Decidable Languages Costas Busch - LSU.
Decidable and undecidable languages
Theory of Computability
CSE 105 theory of computation
Theory of Computability
Instructor: Aaron Roth
More undecidable languages
Theory of Computability
Automata, Grammars and Languages
CSE 105 theory of computation
Presentation transcript:

Introduction to Computability Theory 04:39:06 Introduction to Computability Theory Lecture14: The Halting Problem Prof. Amos Israeli

The Halting Problem In this lecture we present an undecidable language. The language that we prove to be undecidable is a very natural language namely the language consisting of pairs of the form where M is a TM accepting string w:

The Halting Problem Since this language requires to decide whether the computation of TM M halts on input w, it is often called The Halting Problem. Theorem The halting problem is Turing Recognizable.

Proof Consider a TM U that gets a pair as input and simulates the run of M on input w. If M accepts or rejects so does U. Otherwise, U loops. Note: U recognizes ATM ,since it accepts any pair , that is: any pair in which M accepts input w.

Simulating an Input TM On the previous lecture, we detailed the simulation of a DFA by a TM. Simulating one TM by another, using the encoding of the first TM is a very similar process. In the next slide we review the main characteristics of TM N simulating TM M, using M’s encoding <M>.

Simulating an Input TM TM N works as follows: Mark M’s initial state and w’s initial symbol as the “current state” and “current head location”. Look for M’s next transition on the description of its transition function. Execute M’s transition.

Simulating an Input TM Move M’s “current state” and “current head location” to their new places. If M’s new state is a deciding state decide according to the state, otherwise – repeat stages 2-5.

The Language ___ Is Undecidable So far we proved the existence of a language which is not Turing recognizable. Now we continue our quest to prove: Theorem The language is undecidable.

The Language ___ Is Undecidable Before we start the proof let us consider two ancient questions: Question1: Can god create a boulder so heavy such that he (god) cannot lift?

The Language ___ Is Undecidable Question2: In the small town of L.J. there is a single barber: Over the barber’s chair there is a note saying: “I will shave you on one condition: Thaw shall never shave thyself!!!” Who Shaves the Barber?

Proof Assume, by way of contradiction, that is decidable and let H be a TM deciding . That is Define now another TM, D, that uses H as a subroutine as follows:

Proof Define now another TM new D that uses H as a subroutine as follows: D=“On input where M is a TM: 1. Run H on input . 2. Output the opposite of H’s output namely: If H accepts reject, otherwise accept.“

Proof Note: What we do here is taking advantage of the two facts: Fact1: TM M should be able to compute with any string as input. Fact2: The encoding of M, , is a string.

Proof Running a machine on its encoding is analogous to using a compiler for the computer language Pascal, to compile itself (the compiler is written in Pascal). As we recall from the two questions self-reference is sometimes means trouble (god forbid…)

Proof What we got now is: Consider now the result of running D with input . What we get is:

Proof So if D accepts, it rejects and if it rejects it accepts. Double Trouble. And it all caused by our assumption that TM H exists!!!

Proof Review Define . Assume that id decidable and let H be a TM deciding it. Use H to build TM D that gets a string and behaves exactly opposite to H’s behavior, namely:

Proof Review Run TM D on its encoding and conclude: Contradiction.

So Where is the Diagonalization? The following table describes the behavior of each machine on some machine encodings:

So Where is the Diagonalization? This table describes the behavior of TM H. Note: TM H rejects where loops.

Proof Review Now TM D is added to the table…

__ Is Not Turing Reecognizable So far we proved the existence of a language which is not Turing recognizable. Now we will prove a theorem that will enable us to identify a specific language, namely , as a language that is not Turing recognizable.

__ Is Not Turing Reecognizable (Reminder) A Language L is Turing recognizable if there exists a TM recognizing L. That is, a TM that accepts any input . A Language L is co-Turing recognizable if the complement of L, , is Turing recognizable.

__ Is Not Turing Reecognizable Theorem A language L Is decidable, if and only if it is Turing recognizable and co-Turing recognizable. Proof -> If L is decidable so is its complement, . Any decidable language is Turing recognizable.

__ Is Not Turing Reecognizable Proof -> If L is decidable so is its complement, . A TM to decide , is obtained by running a TM deciding L and deciding the opposite. Any decidable language is Turing recognizable, hence is Turing recognizable and L is co-Turing recognizable.

__ Is Not Turing Recognizable Proof <- If L and are both Turing recognizable, there exist two TM-s, , and , that recognize and , respectively. A TM M to decide L can be obtained by running both , and in parallel and halt when one of them accepts.

__ Is Not Turing Recognizable Corollary The language is not Turing recognizable. Proof We already know that is Turing recognizable. Assume is Turing recognizable. Then, is co-Turing recognizable. By the previous theorem is decidable, a contradiction.

Discussion This is the diagram we had after we studied CFL-s: RL-s Ex: ??? Non CFL-s Ex: CFL-s Ex: RL-s Ex:

Discussion Now, we can add some more details: Non Turing recognizable Ex: Now, we can add some more details: Turing recognizable Ex: Decidable Ex: CFL-s Ex: RL-s Ex: