Intro to Theory of Computation

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
Midterm 2 review Jundong Liu School of EECS
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 20 Last time Mapping reductions Computation history method Today Computation history method.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Decidability.
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Busch Complexity Lectures: Reductions
Reductions.
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
Automata, Grammars and Languages
Theory of Computability
Intro to Theory of Computation
BCS 2143 Theory of Computer Science
CSE 2001: Introduction to Theory of Computation Fall 2013
Reducibility The Chinese University of Hong Kong Fall 2010
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
CSE 105 theory of computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Intro to Theory of Computation
CSE 105 theory of computation
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 8: Undecidability, Mapping Reductions
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
CSC 4170 Theory of Computation Decidable languages Section 4.1.
Decidable and undecidable languages
Undecidable problems:
Reducability Sipser, pages
CSCI 2670 Introduction to Theory of Computing
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
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
CSE 105 theory of computation
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
Automata, Grammars and Languages
CSE 105 theory of computation
Intro to Theory of Computation
Intro to Theory of Computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Intro to Theory of Computation LECTURE 15 Last time Countable/uncountable sets. Diagonalization Undecidable/unrecognizable languages (ATM is undecidable) Today ATM is unrecognizable Reductions CS 332 Sofya Raskhodnikova 10/7/2019

Classes of languages recognizable decidable CFL regular ATM {0 𝑛 1 𝑛 0 𝑛 ∣𝑛≥0} {0 𝑛 1 𝑛 ∣𝑛≥0} regular 1* ATM = {〈M,w〉| M is a TM, w is a string, and M accepts w } 10/7/2019

Exercise The fact that ATM is undecidable means that if we are given input <M,w>, then M is not a decider there is no TM S such that L(S)= ATM there is no TM S that accepts on strings in ATM and halts and rejects on strings on strings not in ATM . Both B and C are correct. None of the above. {madam, dad, but, tub, book} 10/7/2019

Classes of languages recognizable decidable CFL regular ATM ATM {0 𝑛 1 𝑛 0 𝑛 ∣𝑛≥0} {0 𝑛 1 𝑛 ∣𝑛≥0} regular 1* ATM = {〈M,w〉| M is a TM, w is a string, and M accepts w } 10/7/2019

Theorem. Language L is decidable iff L and L are Turing-recognizable Proof: 1) L is decidable ⇒ 𝑳 and 𝑳 are Turing-recognizable. 2) 𝑳 and 𝑳 are Turing-recognizable ⇒ L is decidable. 10/7/2019

Prove that the following languages are Turing-recognizable ATM = { 𝑴, 𝒘 ∣ 𝑴 is a TM that accepts string 𝒘} HALTTM = { 𝑴, 𝒘 ∣ 𝑴 is a TM that halts on string 𝒘 } Corollary. is not Turing-recognizable. ATM 10/7/2019

Classes of languages recognizable decidable CFL regular ATM ATM {0 𝑛 1 𝑛 0 𝑛 ∣𝑛≥0} {0 𝑛 1 𝑛 ∣𝑛≥0} regular 1* ATM = {〈M,w〉| M is a TM, w is a string, and M accepts w } 10/7/2019

Problems in language theory ADFA decidable ACFG decidable EDFA decidable ECFG decidable EQDFA decidable ATM undecidable ETM ? EQCFG ? EQTM ? 10/7/2019

Reductions Now that we have an undecidable language, can we get more? 10/7/2019

What is a reduction? A reduction from problem A to problem B is an algorithm for problem A that uses a subroutine for problem B. Many of the deciders we constructed use reductions to one of these problems: ADFA, EDFA, EQDFA, ACFG, ECFG. 10/7/2019

Old Theorem. EQDFA is decidable. EQDFA = { ⟨ 𝑫 𝟏 , 𝑫 𝟐 ⟩| 𝑫 𝟏 , 𝑫 𝟐 are DFAs & 𝑳 𝑫 𝟏 =𝑳( 𝑫 𝟐 )} Proof: The following TM M decides EQDFA. M = `` On input 〈 𝑫 𝟏 , 𝑫 𝟐 〉, where 𝑫 𝟏 , 𝑫 𝟐 are DFAs: Construct a DFA D that recognizes the set difference of 𝑳 𝑫 𝟏 and 𝑳( 𝑫 𝟐 ). Run the decider for EDFA on <D>. If it accepts, accept. O.w. reject.’’ That’s a reduction from EQDFA to EDFA. 10/7/2019

How to tell a difference between a CS student and a CE student? Put an empty kettle in the middle of the kitchen floor and ask your subjects to boil some water. Both subjects will fill the kettle with water, turn on the stove and turn the flame on. Put the kettle full of water on the stove and ask the subjects to boil the water. CE student will turn the flame on. CS student will empty the kettle and put it in the middle of the kitchen floor… thereby reducing the problem to the one that has already been solved! 10/7/2019

Using reductions to prove undecidability We want to prove that language L is undecidable. Idea: Use a proof by contradiction. Suppose to the contrary that L is decidable. Use a decider for L as a subroutine to construct a decider for ATM. But ATM is undecidable. Contradiction! 10/7/2019

Prove that HALTTM is undecidable HALTTM= { 𝑴, 𝒘 ∣ 𝑴 is a TM that halts on string 𝒘 } Proof: Suppose to the contrary that HALTTM is decidable, and let R be a TM that decides it. We construct TM S that decides ATM. S = `` On input 〈𝑴,𝒘〉, where 𝑴 is a TM and w is a string: Run TM R on input <M,w>. If it rejects, reject. If R accepts, simulate M on w. If it accepts, accept. O.w. reject.’’ M must halt on w, since R accepted. That’s a reduction from ATM to HALTTM. 10/7/2019

Prove that ETM is undecidable ETM = { 𝑴 ∣ 𝑴 is a TM and 𝑳 𝑴 =∅} Proof: Suppose to the contrary that ETM is decidable, and let R be a TM that decides it. We construct TM S that decides ATM. S = `` On input 〈𝑴,𝒘〉, where 𝑴 is a TM and w is a string: Run TM R on input ??? 10/7/2019

Prove that ETM is undecidable ETM = { 𝑴 ∣ 𝑴 is a TM and 𝑳 𝑴 =∅} Proof: Suppose to the contrary that ETM is decidable, and let R be a TM that decides it. We construct TM S that decides ATM. S = `` On input 〈𝑴,𝒘〉, where 𝑴 is a TM and w is a string: Construct TM 𝑀′. Run TM R on input <𝑴′>. If , accept. O.w. reject.’’ 𝑀′ = `` On input x, Ignore the input. Run TM M on input w. If it accepts, accept.’’ it rejects 10/7/2019

Prove that CFLTM is undecidable CFLTM = { 𝑴 ∣ 𝑴 is a TM and 𝑳 𝑴 is context-free} Proof: Suppose to the contrary that CFLTM is decidable, and let R be a TM that decides it. We construct TM S that decides ATM. S = `` On input 〈𝑴,𝒘〉, where 𝑴 is a TM and w is a string: Construct TM 𝑀′. Run TM R on input <𝑴′>. If , accept. O.w. reject.’’ 𝑀′ = `` On input x, If x is not of the form 𝟎 𝒏 𝟏 𝒏 𝟐 𝒏 , reject. Run TM M on input w. If it accepts, accept.’’ it rejects 10/7/2019