290 likes | 593 Views
Mapping Reducibility. Lecture 34 Section 5.3 Mon, Nov 12, 2007. Reducibility. We have been “reducing” one problem to another. Then we claimed that if the reduced problem was decidable, then so was the original problem. Reducibility.
E N D
Mapping Reducibility Lecture 34 Section 5.3 Mon, Nov 12, 2007
Reducibility • We have been “reducing” one problem to another. • Then we claimed that if the reduced problem was decidable, then so was the original problem.
Reducibility • But how do we know that a Turing machine can carry out the reduction? • If a Turing machine cannot perform the reduction, then the original problem may not really be decidable.
Computable Functions • A function f : ** is a computable function if there exists a Turing machine M such that on every input w, M halts with f(w), and only f(w), on its tape.
Examples of Computable Functions • The function INCR(n) = n + 1. • The function DECR(n) = n – 1 if n > 0 and 0 if n = 0. • The function ADD(m, n) = m + n. • The function SUB(m, n) = m – n if mn and 0 if m < n. • The function MULT(m, n) = mn.
Mapping Reducibility • A language A is mapping reducible (or just reducible) to a language B if there exists a computable function f : ** such that for every w in *, wAf(w) B.
Mapping Reducibility • f is called a reduction of A to B. • Use the notation AmB to mean that A is mapping reducible to B. • This notation is a bit counter-intuitive since the symbol “points” the other way.
Example of a Reduction • Let = {0, 1}. • Let EVEN be the language of binary representations of even integers. • Let ODD be the language of binary representations of odd integers.
Example of a Reduction • The function incr() is a reduction of EVEN to ODD. • Thus, EVENmODD. • Why is the function decr() not a reduction of ODD to EVEN? • What Turing machine would give us a reduction of ODD to EVEN?
Decidability and Reducibility • Theorem: If B is decidable and AmB, then A is decidable. • Proof: • Let DB be a decider for B. • Let f be a reduction of A to B. • Then build a decider DA for A as follows.
Decidability and Reducibility DA acc acc w f(w) f DB rej rej A m B
Mw acc acc x = w M, w U x COMP rej rej xw The Emptiness Problem • We showed that ATMmETMc by building the following Turing machine.
DA acc rej M, w Mw CONVERT DE acc rej The Emptiness Problem
The Emptiness Problem • Notice that we needed to reverse the “accept” and “reject” outputs. • That is, M, w ATM Mw ETM. • In other words, we reduced ATM to ETMc, not ETM.
Mapping Reducible • It is ok to build this reversal into the design of a decider. • However, we cannot assume that wAf(w) B. when convenient. • In designing a recognizer, the difference may matter.
Reducibility, Decidability, and Recognizability • Theorem: If B is decidable and AmB, then A is decidable. • Theorem: If B is recognizable and AmB, then A is recognizable. • Theorem: If A is unrecognizable and AmB, then B is unrecognizable.
Reducibility and Unrecognizability • What about the following? • Theorem: If B is recognizable and AmBc, then Ac is recognizable. • Conjecture: If B is unrecognizable and AmBc, then A is recognizable.
The Unrecognizability of EQTM and EQTMc • Theorem: EQTM and EQTMc are both unrecognizable. • Proof: • Suppose that EQTM is recognizable. • Let REQ be a recognizer of EQTM . • We will build a recognizer for ATMc. • Given M and w, build the following two machines M and MM,w.
M x rej MM, w x M, w acc acc U The Unrecognizability of EQTM and EQTMc
The Unrecognizability of EQTM and EQTMc • What is the language of M? • What is the language of MM, w?
M M, w M, MM,w acc acc CON REQ The Unrecognizability of EQTM and EQTMc • Now build this Turing machine.
The Unrecognizability of EQTM and EQTMc • If M rejects w, then M and MM,w are equivalent. • If M and MM,w are equivalent, then REQ will accept M, MM,w. • If REQ accepts M, MM,w, then M accepts M, w, and conversely. • Thus, Mrecognizes ATMc, a contradiction.
M* x acc The Unrecognizability of EQTM and EQTMc • To show that EQTMc is also unrecognizable, replace M with the machine and repeat the argument.
Irreducibility of ATM to ETM • Theorem: ATM is not mapping reducible to ETM. • Lemma: If AmB, then AcmBc.
Irreducibility of ATM to ETM • Proof: • The statement wAf(w) B is equivalent to the statement wAf(w) B which is equivalent to wAcf(w) Bc.
Irreducibility of ATM to ETM • Theorem: ATM is not mapping reducible to ETM. • Proof: • Suppose it is. • Then ATMcmETMc. • But we know that ETMc is recognizable and that ATMc is not recognizable. (How?)
Irreducibility of ATM to ETM • This is a contradiction. (Why?) • Therefore, ATM is not mapping reducible to ETM.