Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Theory of Computation

Similar presentations


Presentation on theme: "Intro to Theory of Computation"— Presentation transcript:

1 Intro to Theory of Computation
LECTURE 16 Last time ATM is unrecognizable Reductions Today Mapping reductions CS 332 Sofya Raskhodnikova 3/17/2016

2 Problems in language theory
ADFA decidable ACFG decidable EDFA decidable ECFG decidable EQDFA decidable ATM undecidable ETM undecidable EQCFG ? EQTM ? 3/17/2016

3 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! 3/17/2016

4 Exercise To prove that ETM is undecidable
we assumed ETM had a decider and used it to construct a decider for ATM we assumed ATM had a decider and used it to construct a decider for ETM we constructed a TM 𝑺 that on input <𝑴,𝒘> decides whether 𝑴 accepts 𝒘, assuming the existence of a TM 𝑹 that decides on input <𝑴′> whether the language of <𝑴′> is empty There is more than one correct answer. None of the above. {madam, dad, but, tub, book} 3/17/2016

5 Prove that EQTM is undecidable
EQTM = { 𝑴 𝟏 , 𝑴 𝟐 ∣ 𝑴 𝟏 , 𝑴 𝟐 are TMs, 𝑳 𝑴 𝟏 =𝑳( 𝑴 𝟐 )} Proof: Suppose to the contrary that EQTM 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 TMs 𝑴 ′ ,𝑴′′. 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.’’ 𝑀′′ = ``Accept.’’ it accepts 3/17/2016

6 Proof 2 that EQTM is undecidable
EQTM = { 𝑴 𝟏 , 𝑴 𝟐 ∣ 𝑴 𝟏 , 𝑴 𝟐 are TMs, 𝑳 𝑴 𝟏 =𝑳( 𝑴 𝟐 )} Proof: Suppose to the contrary that EQTM is decidable, and let R be a TM that decides it. We construct TM S that decides ETM. What do we change? S = `` On input 〈𝑴,𝒘〉, where 𝑴 is a TM and w is a string: 𝑴 Construct TMs 𝑴 ′ ,𝑴′′. Run TM R on input < 𝑴 ′ ,𝑴′′>. If , accept. O.w. reject.’’ TM 𝑴 ′ 𝑀′ = `` On input x, Ignore the input. Run TM M on input w. If it accepts, accept.’’ 𝑀′ = ``Reject.’’ 𝑀′′ = ``Accept.’’ < 𝑴, 𝑴 ′ > it accepts 3/17/2016

7 Problems in language theory
ADFA decidable ACFG decidable EDFA decidable ECFG decidable EQDFA decidable ATM undecidable ETM undecidable EQCFG ? EQTM undecidable 3/17/2016

8 Mapping Reductions Proving undecidability and unrecognizability
3/17/2016

9 Computable functions A function 𝒇: 𝚺 ∗ → 𝚺 ∗ is computable if some TM M, on every input 𝒘, halts with only 𝒇(𝒘) on its tape. Example 1: 𝒇( 𝒙,𝒚 )=𝒙+𝒚. Example 2: 𝒇 𝑴,𝒘 = 𝑴′ , where 𝑴 is a TM and 𝒘 is a string, and 𝑴′ is a TM that ignores its input and runs 𝑴 on 𝒘. 3/17/2016

10 if there is a computable function 𝒇, such that for all strings 𝒘,
Mapping reductions Given languages A and B, A ≤ 𝒎 B if there is a computable function 𝒇, such that for all strings 𝒘, 𝒘∈ 𝑨 iff 𝒇(𝒘)∈𝑩. A B 𝒇 3/17/2016

11 Exercise If 𝐀 ≤ 𝒎 𝑩 , we can conclude that 𝑨 ≤ 𝒎 𝑩 𝑩 ≤ 𝒎 A 𝐀 ≤ 𝒎 𝑩
𝑨 ≤ 𝒎 𝑩 𝑩 ≤ 𝒎 A 𝐀 ≤ 𝒎 𝑩 𝐁 ≤ 𝒎 𝑨 None of the above. {madam, dad, but, tub, book} 3/17/2016

12 Mapping reductions: decidability
Theorem. If A ≤ 𝒎 B and B is decidable, then A is decidable. Proof: 𝐋𝐞𝐭 𝑴 be a decider for 𝑩 and 𝒇 be a mapping reduction from A to B. Construct a decider for A: ``On input w: Compute f(w). Run M on f(w). If it accepts, accept. O.w. reject.” 3/17/2016

13 Using mapping reductions to prove undecidability
Theorem. If A ≤ 𝒎 B and B is decidable, then A is decidable. Corollary. If A ≤ 𝒎 B and A is undecidable, then B is undecidable. Example: If ATM≤ 𝒎 B, then B is undecidable. 3/17/2016

14 Mapping reductions: recognizability
Theorem. If A ≤ 𝒎 B and B is Turing-recognizable, then A is Turing-recognizable. Proof: 𝐋𝐞𝐭 𝑴 be a TM that recognizes 𝑩 and 𝒇 be a mapping reduction from A to B. Construct a TM that recognizes A: ``On input w: Compute f(w). Run M on f(w). If it accepts, accept. O.w. reject.” 3/17/2016

15 Using mapping reductions to prove unrecognizability
Theorem. If A ≤ 𝒎 B and B is Turing-recognizable, then A is Turing-recognizable. Corollary. If A ≤ 𝒎 B and A is unrecognizable, then B is unrecognizable. Example: If ATM≤ 𝒎 B, then B is unrecognizable. 3/17/2016

16 Old proof that EQTM is undecidable
EQTM = { 𝑴 𝟏 , 𝑴 𝟐 ∣ 𝑴 𝟏 , 𝑴 𝟐 are TMs, 𝑳 𝑴 𝟏 =𝑳( 𝑴 𝟐 )} Proof: Suppose to the contrary that EQTM 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 TMs 𝑴 ′ ,𝑴′′. 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.’’ 𝑀′′ = ``Accept.’’ it accepts 3/17/2016

17 ATM ≤ 𝒎 EQTM Proof: The following TM computes the reduction:
F = `` On input 〈𝑴,𝒘〉, where 𝑴 is a TM and w is a string: Construct TMs 𝑴 ′ ,𝑴′′. Output < 𝑴 ′ ,𝑴′′>.” 𝑀′ = `` On input x, Ignore the input. Run TM M on input w. If it accepts, accept.’’ 𝑀′′ = ``Accept.’’ ATM EQTM 𝒇 3/17/2016

18 Conclusions from ATM ≤ 𝒎 EQTM
Since ATM is undecidable, so is EQTM ATM ≤ 𝒎 EQTM Since ATM is unrecognizable, so is EQTM 3/17/2016

19 Prove that EQTM is unrecognizable
Proof: We give a mapping reduction ATM ≤ 𝒎 EQTM The following TM computes the reduction: F = `` On input 〈𝑴,𝒘〉, where 𝑴 is a TM and w is a string: Construct TMs 𝑴 ′ ,𝑴′′. Output < 𝑴 ′ ,𝑴′′>.” 𝑀′ = `` On input x, Ignore the input. Run TM M on input w. If it accepts, accept.’’ 𝑀′′ = ``Reject.’’ ATM EQTM 𝒇 3/17/2016

20 Problems in language theory
ADFA decidable ACFG decidable EDFA decidable ECFG decidable EQDFA decidable ATM undecidable ETM undecidable EQCFG ? EQTM undecidable 3/17/2016


Download ppt "Intro to Theory of Computation"

Similar presentations


Ads by Google