Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff

Similar documents
CSE 105 THEORY OF COMPUTATION

There are two main techniques for showing that problems are undecidable: diagonalization and reduction

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

CSE 105 THEORY OF COMPUTATION

Turing Machine Recap

Computability and Complexity

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)

1 Showing Recognizability

Lecture Notes: The Halting Problem; Reductions

TURING MAHINES

Limits of Computability

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 1 Turing Reducibility

Automata Theory CS S-FR2 Final Review

CSCE 551 Final Exam, Spring 2004 Answer Key

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Decidability and Undecidability

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y

CS20a: Turing Machines (Oct 29, 2002)

Computational Models Lecture 8 1

Computability and Complexity

Computable Functions

Lecture 12: Mapping Reductions

Computational Models Lecture 8 1

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Computational Models Lecture 8 1

Decidability: Church-Turing Thesis

CSE 105 Theory of Computation

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

The Unsolvability of the Halting Problem. Chapter 19

Theory of Computation

CSE 105 THEORY OF COMPUTATION

Section 14.1 Computability then else

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

1 Acceptance, Rejection, and I/O for Turing Machines

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

CS20a: Turing Machines (Oct 29, 2002)

Computation Histories

Turing machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Introduction to Turing Machines. Reading: Chapters 8 & 9

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

SD & Turing Enumerable. Lecture 33: Reductions and Undecidability. Lexicographically Enumerable. SD & Turing Enumerable

Equivalent Variations of Turing Machines

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSCE 551: Chin-Tser Huang. University of South Carolina

CSE 105 THEORY OF COMPUTATION

Introduction to Turing Machines

Turing Machines. Lecture 8

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5.

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

Turing Machines Part III

CS481F01 Solutions 8

Turing Machines. Wolfgang Schreiner

Post s Correspondence Problem (PCP) Is Undecidable. Presented By Bharath Bhushan Reddy Goulla

Midterm II : Formal Languages, Automata, and Computability

Theory of Computation

More Turing Machines. CS154 Chris Pollett Mar 15, 2006.

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

CSE 555 Homework Three Sample Solutions

Reducability. Sipser, pages

Non-emptiness Testing for TMs

CSE 105 Theory of Computation

Theory of Computation

Decidability: Reduction Proofs

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Chap. 4,5 Review. Algorithms created in proofs from prior chapters

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

Undecibability. Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not.

Computability Theory

V Honors Theory of Computation

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

Lecture 13: Foundations of Math and Kolmogorov Complexity

Reductions in Computability Theory

CpSc 421 Homework 9 Solution

ACS2: Decidability Decidability

Decidability (What, stuff is unsolvable?)

CSE 105 THEORY OF COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

16.1 Countability. CS125 Lecture 16 Fall 2014

Turing machine recap. Universal Turing Machines and Undecidability. Alphabet size doesn t matter. Robustness of TM

Decidable and undecidable languages

Intro to Theory of Computation

CS21 Decidability and Tractability

Homework Assignment 6 Answers

CMPT 710/407 - Complexity Theory Lecture 4: Complexity Classes, Completeness, Linear Speedup, and Hierarchy Theorems

CSCI3390-Lecture 6: An Undecidable Problem

1 Computational Problems

MTAT Introduction to Theoretical Computer Science

Most General computer?

Undecidable Problems and Reducibility

A Universal Turing Machine

Computational Models Lecture 9, Spring 2009

Theory of Computation

CSE 105 THEORY OF COMPUTATION

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Notes for Lecture Notes 2

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Transcription:

Decidability Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff 1

A property P of strings is said to be decidable if the set of all strings having property P is a recursive set; that is, if there is a total Turing machine that accepts input strings that have property P and rejects those that do not. Kozen 2

Consider problems with answer YES or NO Examples: Does Machine M have three states? Is string w a binary number? Does DFA M accept any input? 3

A problem is decidable if some Turing machine Solves (decides) the problem Decidable problems: Does Machine M have three states? Is string w a binary number? Does DFA M accept any input? 4

The Turing machine that solves a problem answers YES or NO for each instance Input problem instance Turing Machine YES NO 5

The machine that decides a problem: If the answer is YES then halts in a yes state If the answer is NO then halts in a no state These states may not be final states 6

Turing Machine that decides a problem YES states NO states YES and NO states are halting states 7

Difference between Recursive Languages and Decidable problems For decidable problems: The YES states may not be final states 8

[What does the author mean?] No harm in assuming YES states are final. Decidable = Recursive 9

Some problems are undecidable: which means: there is no Turing Machine that solves all instances of the problem 10

A simple undecidable problem: The membership problem 11

The Membership Problem Input: Turing Machine M, and String w Question: Does M accept w? w L(M )? 12

Theorem: The membership problem is undecidable M w (there are and for which we cannot decide whether ) w L(M ) Proof: Assume for contradiction that the membership problem is decidable 13

Assume there exists a Turing Machine that decides/solves the membership problem H M YES M accepts w H w NO M rejects w 14

Let L be a recursively enumerable language Let M be the Turing Machine that accepts L We will prove that L is also recursive: we will describe a Turing machine that accepts L and halts on any input 15

Turing Machine that accepts and halts on any input L M H YES accept w w M accepts w? NO reject w 16

Therefore, L is recursive Since L is chosen arbitrarily, we have proven that every recursively enumerable language is also recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! 17

Therefore, the membership problem is undecidable END OF PROOF 18

Another famous undecidable problem: The halting problem 19

20

The Halting Problem Input: Turing Machine M, and String w Question: Does M halt on input w? 21

Theorem: The halting problem is undecidable M (there are and for which we cannot decide whether halts on input ) M w w Proof: Assume for contradiction that the halting problem is decidable 22

Thus, there exists Turing Machine that solves the halting problem H M YES M halts on w H w NO M doesn t halt on w 23

Construction of H Input: initial tape contents w M w q0 H q y q n YES NO Encoding of M String w 24

Construct machine H : If H returns YES then loop forever If H returns NO then halt 25

H H Loop forever q y YES qa qb w M w q0 qn NO 26

Construct machine Ĥ : Input: w M (machine M ) If M halts on input w M Then loop forever Else halt 27

Ĥ wm copy w M w M w M H 28

Run machine Ĥ with input itself: Input: wh ˆ (machine Ĥ ) If Ĥ halts on input wh ˆ Then loop forever Else halt 29

Ĥ on input wh ˆ : If If Ĥ Ĥ halts then loops forever doesn t halt then it halts NONSENSE!!!!! 30

Therefore, we have contradiction The halting problem is undecidable END OF PROOF 31

Another proof of the same theorem: If the halting problem were decidable then every recursively enumerable language would be recursive. If L={M_w#w M_w halts on w} were recursive, then every r.e. set is recursive. 32

Theorem: The halting problem is undecidable Proof: Assume for contradiction that the halting problem is decidable 33

Thus, there exists Turing Machine that solves the halting problem H M YES M halts on w H w NO M doesn t halt on w 34

Let L be a recursively enumerable language Let M be the Turing Machine that accepts L we will describe a Turing machine that accepts L and halts on any input, proving that L is also recursive. 35

Turing Machine that accepts and halts on any input L M H NO reject w w M halts on w? YES Run M with input w accept w Halts on final state reject w Halts on non-final state 36

Therefore L is recursive Since L is chosen arbitrarily, we have proven that every recursively enumerable language is also recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! 37

Therefore, the halting problem is undecidable END OF PROOF 38