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 = {
February 3, 2021 CS21 Lecture 13 9 February 3, 2021 CS21 Lecture 13 10
Many-one reduction example Undecidable problems
f • f(
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(
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
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(
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(
Dec. and undec. problems
• two problems regarding Context-Free Grammars: – does a CFG generate all strings:
ALLCFG = {
• Both decidable? both undecidable? one decidable?
February 3, 2021 CS21 Lecture 13 21
4