Download presentation
Presentation is loading. Please wait.
1
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
2
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
3
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
4
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
5
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
6
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
7
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
8
Problems in language theory
ADFA decidable ACFG decidable EDFA decidable ECFG decidable EQDFA decidable ATM undecidable ETM ? EQCFG ? EQTM ? 10/7/2019
9
Reductions Now that we have an undecidable language, can we get more?
10/7/2019
10
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
11
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
12
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
13
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
14
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
15
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
16
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
17
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.