11/19/08
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!
CS 311!
Fall 2008!
2!
1
11/19/08
Incrementing!
• inc++:{1}* → {1}* !
Infinite tape!
1
1
1
⨆
1
⨆
⨆
⨆
Finite
control
CS 311!
Fall 2008!
3!
Transforming machines!
F = "On input <M>: !
1. Construct the machine !
" M∞ = "On input x: !
1. Run M on x. !
2. If M accepts, accept. !
3. If M rejects, loop." !
2. Output <M∞>."!
CS 311!
Fall 2008!
4!
2
11/19/08
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
f
B
f
CS 311!
Fall 2008!
5!
Problem reduction!
• Theorem 5.22:!
"If A ≤m B and B is decidable, !
"then A is decidable. !
A
f
B
f
CS 311!
Fall 2008!
6!
3
11/19/08
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. !
CS 311!
Fall 2008!
7!
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>
CS 311!
Fall 2008!
8!
4
11/19/08
ATM ≤m HALTTM!
F = "On input <M>: !
1.
Construct the machine !
" M∞ = "On input x: !
1.
2.
3.
2.
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>
CS 311!
Fall 2008!
9!
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. !
CS 311!
Fall 2008!
10!
5
11/19/08
Solvable, half-solvable, hopeless!
ATM
ADFA
ETM
Turing‐decidable
Turing‐
recognizable
co‐Turing‐
recognizable
CS 311!
Fall 2008!
11!
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
f
<M,w>
ATM
EQTM
<M1,M2>
f
<M,w>
CS 311!
Fall 2008!
EQTM
<M1,M2>
12!
6
11/19/08
ATM ≤m EQTM!
• G = "On input <M,w>: !
1. Construction the following two machines: !
"M1 = "On any input: !
A
EQ
f
1. Accept.”!
<M,w>
<M ,M >
M2 = "On any input: !
f
EQ
A
<M,w>
<M ,M >
1. Run M on w.!
2. If it accepts, accept." !
2. Output <M1,M2>.” !
TM
TM
1
2
TM
1
CS 311!
Fall 2008!
TM
2
13!
EQTM is not Turing-recognizable!
• Theorem 5.30: !
EQTM is neither Turing-recognizable nor !
"co-Turing-recognizable!
• Proof:!
"Show ATM ≤m EQTM
ATM
f
<M,w>
ATM
EQTM
<M1,M2>
f
<M,w>
CS 311!
Fall 2008!
EQTM
<M1,M2>
14!
7
11/19/08
ATM ≤m EQTM!
• G = "On input <M,w>: !
1. Construction the following two machines: !
"M1 = "On any input: !
A
EQ
f
1. Reject.”!
<M,w>
<M ,M >
M2 = "On any input: !
f
EQ
A
<M,w>
<M ,M >
1. Run M on w.!
2. If it accepts, accept." !
2. Output <M1,M2>.” !
TM
TM
1
2
TM
1
CS 311!
Fall 2008!
TM
2
15!
Solvable, half-solvable, hopeless!
EQTM
ATM
Turing‐
recognizable
ADFA
Turing‐decidable
CS 311!
Fall 2008!
ETM
co‐Turing‐
recognizable
16!
8
© Copyright 2026 Paperzz