Reducibility The Chinese University of Hong Kong Fall 2010

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
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.
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Tutorial CSC3130 : Formal Languages and Automata Theory Tu Shikui ( ) SHB 905, Office hour: Thursday 2:30pm-3:30pm
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Limitations.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Decidability.
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Recursively Enumerable Languages
Theory of Computability
More variants of Turing Machines
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Busch Complexity Lectures: Reductions
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Theory of Computability
Intro to Theory of Computation
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Intro to Theory of Computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CSE 105 theory of computation
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 8: Undecidability, Mapping Reductions
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Decidable and undecidable languages
Undecidable problems:
NP-completeness The Chinese University of Hong Kong Fall 2008
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
Intro to Theory of Computation
CSCI 2670 Introduction to Theory of Computing
More undecidable languages
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Theory of Computability
Instructor: Aaron Roth
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
Theory of Computability
More undecidable languages
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
Theory of Computability
Instructor: Aaron Roth
Instructor: Aaron Roth
CSE 105 theory of computation
Intro to Theory of Computation
Intro to Theory of Computation
Presentation transcript:

Reducibility The Chinese University of Hong Kong Fall 2010 CSCI 3130: Automata theory and formal languages Reducibility Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc3130

Summary of last lecture program 〈M〉 accept, if M accepts w reject, if M rejects w input w loops, if M loops on w The universal TM U takes as inputs a program M and a string x and simulates M on x The program M itself is specified as a TM!

Summary of last lecture qacc qrej accept reject loop halt recognizable: undecidable: By universal TM U Turing’s Theorem ATM = {〈M, w〉: M is a TM that accepts input w}

Another undecidable language HALTTM = {〈M, w〉: M is a TM that halts on input w} HALTTM is an undecidable language We will argue that … so by Turing’s Theorem it is undecidable. If HALTTM is decidable, so is ATM.

Undecidability of halting If HALTTM can be decided, so can ATM. Suppose H decides HALTTM accept if M halts on w 〈M, w〉 R reject if M loops on w We want to use R to design TM S that decides ATM 〈M, w〉 ? accept if M accepts w reject if M rejects or loops on w

Undecidability of halting accept if M halts on w 〈M, w〉 R reject if M loops on w S U R rej acc simulate M on w rej acc accept if M accepts w 〈M, w〉 reject if M rejects or loops on w

Undecidability of halting HALTTM = {〈M, w〉: M is a TM that halts on input w} ATM = {〈M, w〉: M is a TM that accepts input w} Suppose that HALTTM is decidable. Let H be a TM that decides HALTTM. Then this TM decides ATM: S := On input 〈M, w〉, Run R on input 〈M, w〉. If R rejects, reject. If R accepts, run U on input 〈M, w〉 If U accepts, accept. If U rejects, reject. Impossible, because ATM is undecidable.

Reducibility Suppose you think L is undecidable. How do you know for sure? Show: If some TM R decides L then using R, I can build another TM S so that S decides ATM ...but this is impossible, because ATM is undecidable.

Example 1 AEPSTM = {〈M〉: M is a TM that accepts input e} decidable undecidable Step 1: You gotta believe it To know if M accepts e, it looks like we have to simulate it But then we might end up in a loop Step 2: Prove it!

Example 1: Figuring out the reduction reject if not accept if M’ accepts e 〈M’〉 〈M, w〉 reject if not accept if M accepts w S R 〈M’〉 M’ should be a Turing Machine such that: M’ on input e = M on input w If M accepts w, then M’ accepts e If M does not accept w, then M’ does not accept e

Example 1: Implementing the reduction 〈M, w〉 construct M’ 〈M’〉 M’ should be a Turing Machine such that: M’ on input e = M on input w M’ := On input z, Simulate M on input w If M accepts, accept Otherwise, reject

Example 1: Impementing the reduction accept if M accepts w construct M’ R 〈M’〉 〈M, w〉 reject if not S := On input 〈M, w〉: Construct the following TM M’: M’ := On input z, Simulate M on input w and output answer Run R on input 〈M’〉 and output its answer.

Example 1: Writing it up undecidable AEPSTM = {〈M〉: M is a TM that accepts input e} ATM = {〈M, w〉: M is a TM that accepts input w} Suppose AEPSTM is decidable and R decides it. Let S := On input 〈M, w〉 where M is a TM and w is a string M’ := On input z, Simulate M on input w and output answer Run R on input 〈M’〉 and output its answer. Construct the following TM M’: Then S accepts 〈M, w〉 if and only if M accepts w So S decides ATM, which is impossible.

Example 2 SOMETM = {〈M〉: M is a TM that accepts some input} decidable undecidable Step 1: You gotta believe it To know if M is in SOMETM, looks like we have to simulate But then we might end up in a loop Step 2: Prove it!

Example 2: Setting up the reduction SOMETM = {〈M〉: M is a TM that accepts some input} Show: If SOMETM can be decided by some TM R, R reject if M’ accepts no inputs accept if M’ accepts some input 〈M’〉 ... then ATM can be decided by some other TM S S 〈M, w〉 reject if not accept if M accepts w

Example 2: Setting up the reduction accept if M accepts w construct M’ R 〈M’〉 〈M, w〉 reject if not Task Given 〈M, w〉, construct M’ so that: If M accepts w, then M’ accepts some input If M does not accept w, then M’ accepts no inputs

Example 2: Implementing the reduction Task Given 〈M, w〉, construct M’ so that: If M accepts w, then M’ accepts some input If M does not accept w, then M’ accepts no inputs M’ := On input z, Simulate M on input w If M accepts, accept Otherwise, reject

Example 2: Writing it up undecidable SOMETM = {〈M〉: M is a TM that accepts some input} ATM = {〈M, w〉: M is a TM that accepts input w} Suppose SOMETM is decidable and R decides it. Let S := On input 〈M, w〉 where M is a TM and w is a string M’ := On input z, Simulate M on input w and output answer Run R on input 〈M’〉 and output its answer. Construct the following TM M’: Then S accepts 〈M, w〉 if and only if M accepts w So S decides ATM, which is impossible.

Example 3 ETM = {〈M〉: M is a TM that accepts no input} decidable undecidable Show: If ETM can be decided by some TM R, ... then SOMETM can be decided by another TM S SOMETM = {〈M〉: M is a TM that accepts some input}

Example 3 undecidable Suppose ETM can be decided by some TM R. ETM = {〈M〉: M is a TM that accepts no input} SOMETM = {〈M〉: M is a TM that accepts some input} Suppose ETM can be decided by some TM R. Consider the following TM S: S := On input 〈M〉 where M is a TM If R accepts, reject. If R rejects, accept. Run R on input 〈M〉. Then S decides SOMETM, a contradiction.

Example 4 EQTM = {〈M1, M2〉: M1 and M2 accept the same inputs} decidable undecidable Show: If EQTM can be decided by some TM R, ... then ETM can be decided by another TM S

Example 4: Setting up the reduction EQTM = {〈M1, M2〉: M1 and M2 accept the same inputs} ETM = {〈M〉: M is a TM that accepts no input} Task Given 〈M〉, construct 〈M1, M2〉 so that: If M accepts no input, then M1, M2 accept same inputs If M accepts some input, then M1, M2 do not accept same inputs Idea Make M1 = M Make M2 accept nothing

Example 2: Writing it up undecidable EQTM = {〈M1, M2〉: M1 and M2 accept the same inputs} ETM = {〈M〉: M is a TM that accepts no input} Suppose EQTM is decidable and R decides it. Let S := On input 〈M〉 where M is a TM M2 := On input z, reject. Run R on input 〈M, M2〉 and output its answer. Construct the following TM M2: Then S accepts 〈M〉 if and only if M accepts no input So S decides ETM, which is impossible.