View
221
Download
2
Tags:
Embed Size (px)
Citation preview
1
Introduction to Computability Theory
Lecture13: Mapping Reductions
Prof. Amos Israeli
So far, we presented several reductions:
From to , from to , from to , from to , and several other.
Each of these reductions had some special form not shared with the others. Can we generalize?
Mapping Reductions
2
TMHALTTMA
TMREGULARTMA TMEQTME
TMHALT TMA
Mapping reductions constitute the generalization we are looking for. They are always in a specified form which:
1. Preserves the intrinsic difficulty of finding a reduction.
2. Ease the “red tape” requirements.
Mapping Reductions
3
In other words: Assume we want to prove that B is undecidable by reduction from A that is known to be undecidable.
If our reduction has the form of a Mapping reduction then the proof is complete. Nothing else is required.
Mapping Reductions
4
The idea of a mapping reduction is very simple: If the instances (candidate elements) of one language, say A, are mapped to the instances of another language, say B, by a computable mapping M in a way that iff , then a decider for B can be used to devise a decider for A.
Mapping Reductions
5
AI BIM
The sought for decider for A works as follows:
Upon input I do:
1. Compute .
2. Use the decider for B to determine whether .
3. If accept - otherwise - reject.
Mapping Reductions
6
IM
BIM
BIM
This scheme works but there is one delicate point here. Can you see where it is?
The mapping must be computable.
Given the input I, your ordinary Turing machine must be able to compute .
For this we need the notion of Computable Functions.
Mapping Reductions
7
IM
IM
Let be an alphabet: A function is a computable function if there exists a TM, M such that for every , if M computes with input w, it halts with on its tape.
Computable Functions
8
**: f
*w
wf
1. Let m and n be natural numbers, let be a string encoding of m and n, and let be the string representing their sum. The function , is computable.
2. The function is a computable function.
Can you devise TM-s to compute f and g?
Examples of Computable Functions
9
nmnmf ,
rwwg
nm,
nm
3. Let be an encoding of TM M and let be an encoding of another TM M’ satisfying:1. .2. TM M’ never makes four consecutive steps in the same head direction.The function t defined below is computable:
Examples of Computable Functions
10
M
'MLML
TM any of ecodingnot is if
TM of ecoding an is if '
M
MMMMt
'M
In the reduction from to - TM M from the input to was modified by TM S, the decider to TM s.t. all ending computations on M would become accepting computations on .
Since was carried out by TM S, it is obviously a computable function.
Use of Comp. Func. for Reductions
11
1M
wM ,
TMHALT TMA
TMHALT
1M
1MMf
Another example is the reduction from to - TM M from the input to , was modified by TM S, to TM s.t. is regular iff . Once again, this is a computable function.
Now we turn to define mapping reductions:
Use of Comp. Func. for Reductions
12
2M
TMAwM ,
TMA
TMREGULAR
TMA
2ML
wM ,
Let A and B be two languages over . A computable function is a mapping reduction from A to B if the following holds: For each , iff . The function f is called reduction of A to B. The arguments of the reduction are often called instances.
Mapping Reductions
13
**: f
*
AI *I BIf
If there exists a mapping reduction from A to B, We say that A is mapping reducible to B and denote it by .
A pictorial illustration of a mapping reduction appears in the next slide.
Mapping Reductions
14
BA m
.
A Pictorial Illustration of_______
15
BA f
A
A Af
Af
f
Assume that .
Can we say something about the relationship between and ?
Answer: Yes
An Observation about__and_____
16
A
A Af
Af
f
A B
A B
BA m
BA m
If language A is mapping reducible to language B, then a solution for B, can be used to derive a solution for A. This fact is made formal in the following theorem:
Using Mapping Reductions
17
If and B is decidable, then A is decidable.
Theorem
18
BA m
Let M be a decider for B and let f be the reduction from A to B. Consider TM N:
N=“On input w :
1. Compute .
2. Run M on and output whatever M outputs. “
Clearly N accepts iff . QED
Proof
19
wf
wf
Bw
If and A is undecidable, then B is undecidable.
Corollary
20
BA m
The previous corollary is our main tool for proving undecidability.
Notice that in order to prove B undecidable we reduce from A which is known to be undecidable to B. The reduction direction is often a source of errors.
A similar tool is used in Complexity theory.
Discussion
21
On the previous lecture we proved that
is undecidable.
Now, we prove this theorem once more by demonstrating a mapping reduction from to .
Revisited
22
wMwMHALTTM on haltsTM that a is ,
TMHALTTMA
TMHALT
Theorem
The language
Is undecidable.
Revisited
23
TMHALT
wMwMHALTTM on haltsTM that a is ,
Proof
The proof is by reduction from . In the next slide we show that . By the previous corollary it follows that is undecidable.
Revisited
24
TMmTM HALTA TMA
TMHALT
TMHALT
The mapping reduction is presented by TM F :
F=“On input :
1. Construct TM M’ .
M’=“On input x:
1. Run M on x.
2. if M accepts accept.
3. If M rejects, enter a loop.”
2. Output .”
Mapping Reduction from to__
25
wM ,
wM ,'
TMHALTTMA
It is not hard to see that iff . In other words: . Since is undecidable, the previous corollary implies that is undecidable too.
Proof (cont.)
26
TMAwM ,
TMHALTwM ,'
TMmTM HALTA TMA
TMHALT
What happens if the input does not contain a valid description of a TM?
By the specification of we know that in this case . Therefore in this case TM F should output any string s satisfying .
The Halting Problem Revisited
27
wM ,
TMA
TMAwM ,
TMHALTs
Theorem
The language
Is undecidable.
Revisited
28
TMEQ
NLMLNMNMEQTM and s-TM are and ,
Proof
The proof is by reduction from which is known to be undecidable. In the next slide we show that . By the previous corollary it follows that is undecidable.
Revisited
29
TMmTM EQE
TME
TMEQ
TMHALT
Let be an encoding of a TM that rejects all its inputs. The mapping f is defined as follows:
For each instance of , , .
It is not hard to verify that
Meaning: . QED
Mapping Reduction from to__
30
M
rMLMLML
TMEQTME
rM
TME rMMMf ,
TMrTM EQMMEM ,
If and B is Turing recognizable, then A is Turing recognizable.
Theorem
31
BA m
Let M be a decider for B and let f be the reduction from A to B. Consider TM N:
N=“On input w :
1. Compute .
2. Run M on and output whatever M outputs.”
Clearly N accepts iff . QED
Proof
32
wf
wf
Bw
Turing Recognizer
N recognizes B.
- if M halts,
If and A is not Turing recognizable, then B is not Turing recognizable.
Corollary
33
BA m
Theorem
is neither Turing recognizable nor co-Turing recognizable.
Reminder
A language L is co-Turing recognizable if its complement, , is Turing recognizable.
The Status of______
34
TMEQ
TMEQ
L
If by a mapping f, then by the same mapping it holds that . Since we know that is not Turing recognizable, we can prove that language A is not Turing recognizable by reducing to .
Proof
35
TMA A
BA m
BA m
TMA
Now we use the previous remark and prove that is not Turing recognizable, by showing that .
Since , we conclude that and since we know that is not Turing recognizable we conclude that so is .
Proof
36
TMEQ
TMMTM EQA
TMMTM EQA
TMMTM EQA TMA
TMEQ
F=“ on input , where M is a TM:
1. Construct that accepts on any input and
that accepts if M accepts w.
2. Output .
It is not hard to see that F computes a reduction from to .
Proof
37
1M
TMA TMEQ
wM ,
2M
21, MM
G=“ on input , where M is a TM:
1. Construct that rejects on any input and that accepts if M accepts w.
2. Output .
It is not hard to see that G computes a reduction from to .
Proof
38
1M
TMA TMEQ
wM ,
2M
21, MM
Since we conclude that is not Turing recognizable.
Since we conclude that is not co-Turing recognizable, hence is not Turing recognizable.
QED
Proof
39
TMEQTMMTM EQA
TMMTM EQA TMEQ
TMTM EQEQ