180 likes | 373 Views
Mapping Reducibility. Sipser 5.3 (pages 206-210). Computable functions. Definition 5.17: A function f:Σ *→ Σ * is a computable function if some Turing machine M , on every input w , halts with just f(w ) on its tape. Example: The increment function inc++:{1}* → {1}*
E N D
Mapping Reducibility Sipser 5.3 (pages 206-210)
Computable functions • Definition 5.17: A function f:Σ*→Σ* is a computable function if some Turing machine M, on every input w, halts with just f(w) on its tape. • Example: The increment function inc++:{1}* → {1}* is Turing-computable
Incrementing • inc++:{1}* → {1}* Infinite tape 1 1 1 ⨆ 1 ⨆ ⨆ ⨆ Finite control
Transforming machines F = "On input <M>: • Construct the machine M∞ = "On input x: • Run M on x. • If M accepts, accept. • If M rejects, loop." • Output <M∞>."
Mapping reducibility • Definition 5.20: Language A is mapping reducible to language B, written A ≤m B, if there is a computable function f:Σ* → Σ*, where for every w, w ∈ A ⇔ f(w) ∈ B A B f f
Problem reduction • Theorem 5.22: If A ≤m B and B is decidable, then A is decidable. A B f f
And… the contrapositive • Theorem 5.22: If A ≤m B and B is decidable, then A is decidable. • Corollary 5.23: If A ≤m B and A is undecidable, then B is undecidable.
A familiar mapping reduction… ATM = {<M,w> | M is a TM and M accepts w} ≤m HALTTM = {<M,w> | M is a TM & M halts on input w} ATM HALTTM f <M,w> <M∞,w> f <M,w> <M∞,w>
ATM≤mHALTTM F = "On input <M>: • Construct the machine M∞ = "On input x: • Run M on x. • If M accepts, accept. • If M rejects, loop." • Output <M∞>." ATM HALTTM f <M,w> <M∞,w> f <M,w> <M∞,w>
Similarly… • Theorem 5.28: If A ≤m B and B is Turing-recognizable, then A is Turing-recognizable. • Theorem 5.29: If A ≤m B and A is not Turing-recognizable, then B is not Turing-recognizable.
Solvable, half-solvable, hopeless ATM ADFA ETM co-Turing- recognizable Turing-decidable Turing- recognizable
EQTM= {<M1,M2>| L(M1)=L(M2)} is hopeless • Theorem 5.30: EQTM is neither Turing-recognizable nor co-Turing-recognizable • Proof: • What if we show ATM ≤m EQTM? ATM EQTM f <M,w> <M1,M2> f EQTM ATM <M,w> <M1,M2>
ATM ≤m EQTM • G = "On input <M,w>: • Construction the following two machines: M1 = "On any input: • Accept.” M2 = "On any input: • Run M on w. • If it accepts, accept." • Output <M1,M2>.” ATM EQTM f <M,w> <M1,M2> f EQTM ATM <M,w> <M1,M2>
EQTM is not Turing-recognizable • Theorem 5.30: EQTM is neither Turing-recognizable nor co-Turing-recognizable • Proof: Show ATM ≤m EQTM ATM EQTM f <M,w> <M1,M2> f EQTM ATM <M,w> <M1,M2>
ATM ≤m EQTM • G = "On input <M,w>: • Construction the following two machines: M1 = "On any input: • Reject.” M2 = "On any input: • Run M on w. • If it accepts, accept." • Output <M1,M2>.” ATM EQTM f <M,w> <M1,M2> f EQTM ATM <M,w> <M1,M2>
Solvable, half-solvable, hopeless EQTM ATM ADFA ETM co-Turing- recognizable Turing-decidable Turing- recognizable