CS21 Decidability and Tractability Outline Definition of Reduction

CS21 Decidability and Tractability Outline Definition of Reduction

Outline • many-one reductions CS21 • undecidable problems Decidability and Tractability – computation histories – surprising contrasts between Lecture 13 decidable/undecidable • Rice’s Theorem February 3, 2021 February 3, 2021 CS21 Lecture 13 1 February 3, 2021 CS21 Lecture 13 2 Definition of reduction Definition of reduction • Can you reduce co-HALT to HALT? • More refined notion of reduction: – “many-one” reduction (commonly) • We know that HALT is RE – “mapping” reduction (book) • Does this show that co-HALT is RE? A f B yes yes – recall, we showed co-HALT is not RE reduction from f language A to no no • our current notion of reduction cannot language B distinguish complements February 3, 2021 CS21 Lecture 13 3 February 3, 2021 CS21 Lecture 13 4 Definition of reduction Definition of reduction A f B yes yes • Notation: “A many-one reduces to B” is written f no no A ≤m B – “yes maps to yes and no maps to no” means: • function f should be computable w ∈ A maps to f(w) ∈ B & w ∉ A maps to f(w) ∉ B Definition: f : Σ*→ Σ* is computable if there exists a TM Mf such that on every w ∈ Σ* • B is at least as “hard” as A Mf halts on w with f(w) written on its tape. – more accurate: B at least as “expressive” as A February 3, 2021 CS21 Lecture 13 5 February 3, 2021 CS21 Lecture 13 6 1 Using reductions Using reductions Definition: A ≤m B if there is a computable • Main use: given language NEW, prove it is function f such that for all w undecidable by showing OLD ≤m NEW, w ∈ A ⇔ f(w) ∈ B where OLD known to be undecidable – proof by contradiction Theorem: if A ≤m B and B is decidable then A is decidable – if NEW decidable, then OLD decidable Proof: – OLD undecidable. Contradiction. – decider for A: on input w, compute f(w), run • common to reduce in wrong direction. decider for B, do whatever it does. • review this argument to check yourself. February 3, 2021 CS21 Lecture 13 7 February 3, 2021 CS21 Lecture 13 8 Using reductions Many-one reduction example Theorem: if A ≤m B and B is RE then A is • Showed ETM undecidable. Consider: RE co-ETM = {<M> : L(M) ≠ Ø} Proof: – TM for recognizing A: on input w, compute f • f(<M, w>) = <M’> f(w), run TM that recognizes B, do whatever it yes yes where M’ is TM that does. • on input x, if x ≠ w, f then reject no no • Main use: given language NEW, prove it is • else simulate M on x, not RE by showing OLD ≤m NEW, where and accept if M does OLD known to be not RE. ATM co-ETM • f clearly computable February 3, 2021 CS21 Lecture 13 9 February 3, 2021 CS21 Lecture 13 10 Many-one reduction example Undecidable problems f • f(<M, w>) = <M’> yes yes where M’ is TM that Theorem: The language • on input x, if x ≠ w, REGULAR = {<M>: M is a TM and L(M) is f then reject no no • else simulate M on x, regular} and accept if M does is undecidable. ATM co-ETM • yes maps to yes? • f clearly computable Proof: – if <M, w> ∈ ATM then f(M, w) ∈ co-ETM • no maps to no? – reduce from ATM (i.e. show ATM ≤m REGULAR) – what should f(<M, w>) produce? – if <M, w> ∉ ATM then f(M, w) ∉ co-ETM February 3, 2021 CS21 Lecture 13 11 February 3, 2021 CS21 Lecture 13 12 2 Undecidable problems Dec. and undec. problems Proof: • the boundary between decidability and – f(<M, w>) = <M’> described below undecidability is often quite delicate – seemingly related problems on input x: • is f computable? – one decidable • if x has form 0n1n, accept • YES maps to YES? – other undecidable • else simulate M on w <M, w> ∈ ATM ⇒ and accept x if M accepts f(M, w) ∈ REGULAR • NO maps to NO? • We will see two examples of this phenomenon next. <M, w> ∉ ATM ⇒ f(M, w) ∉ REGULAR February 3, 2021 CS21 Lecture 13 13 February 3, 2021 CS21 Lecture 13 14 Computation histories Linear Bounded Automata • Recall configuration of a TM: string uqv LBA definition: TM that is prohibited from with u,v ∈ Γ*, q ∈ Q moving head off right side of input. • The sequence of configurations M goes – machine prevents such a move, just like a TM through on input w is a computation prevents a move off left of tape history of M on input w • How many possible configurations for a – may be accepting, or rejecting LBA M on input w with |w| = n, m states, – reserve the term for halting computations and p = |Γ| ? – nondeterministic machines may have several n computation histories for a given input. – counting gives: mnp February 3, 2021 CS21 Lecture 13 15 February 3, 2021 CS21 Lecture 13 16 Dec. and undec. problems Dec. and undec. problems • two problems we have seen with respect Theorem: ALBA is decidable. to TMs, now regarding LBAs: Proof: – LBA acceptance: – input <M, w> where M is a LBA – key: only mnpn configurations ALBA = {<M, w> : LBA M accepts input w} – LBA emptiness: – if M hasn’t halted after this many steps, it must be looping forever. E = {<M> : LBA M has L(M) = Ø} LBA – simulate M for mnpn steps • Both decidable? both undecidable? one – if it halts, accept or reject accordingly, decidable? – else reject since it must be looping February 3, 2021 CS21 Lecture 13 17 February 3, 2021 CS21 Lecture 13 18 3 Dec. and undec. problems Dec. and undec. problems Proof: Theorem: E is undecidable. LBA – f(<M, w>) = <B> described below on input x, check if x has form • is B an LBA? Proof: • is f computable? #C1#C2#C3#...#Ck# – reduce from co-ATM (i.e. show co-ATM ≤m ELBA) • check that C is the start • YES maps to YES? – what should f(<M, w>) produce? 1 configuration for M on input w <M, w> ∈ co-ATM ⇒ – Idea: * f(M, w) ∈ ELBA • check that Ci ⇒ Ci+1 • produce LBA B that accepts exactly the accepting • NO maps to NO? computation histories of M on input w • check that Ck is an accepting configuration for M <M, w> ∉ co-ATM ⇒ f(M, w) ∉ ELBA February 3, 2021 CS21 Lecture 13 19 February 3, 2021 CS21 Lecture 13 20 Dec. and undec. problems • two problems regarding Context-Free Grammars: – does a CFG generate all strings: ALLCFG = {<G> : G is a CFG and L(G) = Σ*} – CFG emptiness: ECFG = {<G> : G is a CFG and L(G) = Ø} • Both decidable? both undecidable? one decidable? February 3, 2021 CS21 Lecture 13 21 4.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us