Title: Computer Science 500 Theory of Computation Spring, 1999
1Computer Science 500Theory of ComputationSpring,
1999 March 4 2nd Test Thursday, March 11
2Definition Mapping Reduction
A function f mapping-reduces language L1 to
language L2 iff for all x, x ? L1 f(x) ?
L2 x ? L1 f(x) ? L2
1 2 f is computable
3Theorem
- Assume that L1 mapping reduces to L2.
- If L2 is decidable and then L1 is decidable
- If L1 is undecidable and then L1 is undecidable
- If L2 is recognizable and then L1 is
recognizable - If L1 is unrecognizable and then L2 is
unrecognizable - If L2 is co-recognizable and then L1 is
co-recognizable - If L1 is not co-recognizable and then L2 is not
co-recognizable
4Do not try to prove L1 ltm L2if L2 is
recognizable and L1 is not(note you still
might try using an oracle reduction)
5Boilerplate for Proof of Undecidability using a
mapping reduction
- Pseudo-exam question 1
- Prove (via mapping reduction) that the following
language L is undecidable - L
- Proof
- It is sufficient to reduce ATM to L.
- We demonstrate reduction f T.M.s x 0,1
domain(L) - such that
- f is computable
- forall (M,j), (M,j) in ATM f(M,j) in L
6Sample Proof by reduction
6. Rices theorem. Let P any subset of Turing
Machines such that a) For any TMs M1 and M2
that accept the same language, if M1 is in P,
then M2 is in P b) There are machines M1 and M2
such that M1 is in P and M2 is not. Prove that
the language P is undecidable.
7Proof (by mapping reduction) Assume (W.O.L.O.G.)
that M L(M) ??? P. Let MnotinP ?
P. Then f reduces Lu to P f Z
T.M.s f(i) a Turing machine that on any input
x, runs ltigt on i. If ltigt accepts i, then f(i)
runs MnotinP on x. If MnotinP also accepts,
then f(i) accepts x. Note that if Mi does not
accept i, f(i) accepts nothing if Mi does
accept i, then f(i) accepts L(MnotinP)
8Optional Homework (5.11) Give an example of an
undecidable language B where B ltm B. Note that B
must be neither recognizable nor co-recognizable.
This is so because
Assume that L1 reduces to L2. If L1 is
unrecognizable, then L2 is unrecognizable If L1
is not co-recognizable, then L2 is not
co-recognizable
9Oracle for language L
An oracle O for language L computes the
characteristic function of L, and can be called
like a subroutine that runs in unit time.
10Turing machine with Oracle Access, ML
Informally An algorithm that can call an oracle
for function L as a subroutine
More formally If a 2-tape Turing machine has a
special state, that upon being entered, with x on
the 2nd tape, immediately alters the contents of
the 2nd tape to be fL(x).
11Reducibility via an oracle
L1 is reducible via oracle to L2 iff there is a
Turing machine ML2 (with oracle access to L2 )
such that ML2 computes L1
12Theorem
Assume that L1 can be reduced by oracle reduction
to L2. If L2 is decidable, then L1 is
decidable
13Proof
- Let ML2 be a Turing Machine that computes L1
given an oracle for L2 - Let M2 decide L2
- Construct M1 as follows On input w,
- M1 behaves exactly as does ML2 except that
whenever ML2 makes a call to the oracle for L2,
M1 calls the algorithm (Turing machine) M2
14Contrapositive
Assume that L1 can be reduced by oracle reduction
to L2. If L1 is undecidable and then L2 is
undecidable
15Note about oracle reductions
If L1 can be reduced to L2 using an oracle
reduction, then L1 can be reduced to L2 using
an oracle reduction
(proof left to reader)
16Oracle reductions an example
17 Observation
L is a recognizable language There is a
decidable language L2 such that L x ? w such
that (w, x) ? L2
18 Observation
L is a co-recognizable language There is a
decidable language L3 such that L y ? z such
that (y,z) ?L3
19Lemma
?i L L is in ?i
Proof 1st) ?i L L is in ?i L in ?i
implies exists L2 such that L x w1 w2
w3 such that (w1,w2, , wi, x) is in L2 Let
L L2. Then L x w1 w2 w3
such that (w1,w2, , wi, x) is in L
U
E
A
E
E
A
A
20Proof (continued) 2nd) ?i L L is in ?i L
in ?i implies exists L s.t. So L x w1
w2 w3 such that (w1,w2, , wi, x) is in
L Let L2 L Then L x w1 w2 w3
such that (w1,w2, , wi, x) is in L2 So L is
in ?i
U
E
A
A
E
A
E
21The Kleene Hierarchy
?1 L There is a decidable language L2 such
that L x w such that (w, x) is in
L2
?
?1 L There is a decidable language L3 such
that L y ? z such that (y, z) is in
L3 L L is in ?1
22The Kleene Hierarchy
?2 L There is a decidable language L2 such
that L x ? w1 ? w2 such that (w1,w2, x)
is in L2
?2 L There is a decidable language L2 such
that L x ? w1 ? w2 such that (w1,w2, x)
is in L2 L L is in ?2
23The Kleene Hierarchy
?i L There is a decidable language L2 such
that L x ? w1 ? w2 ? w3 such
that (w1,w2, , wi, x) is in L2
?i L There is a decidable language L2 such
that L x ? w1 ? w2 ? w3 such
that (w1,w2, , wi, x) is in L2 L L
is in ?i
24Kleene hierarchy
?i
?i
?2
?2
?1
?1
25General Definition
A language L is complete for a class C of
languages if every language L in C reduces to L
(under the appropriate type of reduction)
26A complete problem for ?1
- Luniversal (M,j) T.M. M accepts j
- L2 (w,(M,j)) M accepts j within w
steps - Every language ?1 in reduces to Luniversal
27A language in ?1
Lu i T.M. Mi does not accept i L2
(w,i) Mi does not accept i within w
steps Lu i ? w, (w, i) is in L2
28A language in ?2
L M T.M. M accepts 0,1 L2 (w1,
w2, M) M accepts input w1 within w2 steps L
x ? w1 ? w2, (w1,w2, x) is in L2
29Note
Every L in ?1 U ?1 reduces to Luniversal via an
oracle reduction (in other words ?0?1 contains
both ?1 and ?1)