Computer Science 500 Theory of Computation Spring, 2000 Feb' 28 - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

Computer Science 500 Theory of Computation Spring, 2000 Feb' 28

Description:

If L1 is un... and then L2 is un... Do not try to prove L1 m L2 ... Assume L is recursively enumerable by E. Then to construct a Turing Machine T that recognizes L: ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 41
Provided by: williamd54
Category:

less

Transcript and Presenter's Notes

Title: Computer Science 500 Theory of Computation Spring, 2000 Feb' 28


1
Computer Science 500Theory of ComputationSpring,
2000Feb. 28 1. Reductions! 2. Homework 5 -
1st two problems
2
The Universal Turing Machine
Universal Turing Machine MUniversal Input
(M,I) where M is a Turing Machine
Description I is the input to the machine
M Results L(MUniversal) ATM (M,I) M
accepts I) If M accepts I, then MUniversal
accepts (M,I) If M rejects I, then MUniversal
rejects (M,I) If M does not halt on I,
MUniversal does not halt on (M,I)
3
Universal Turing Machine(visualization)
Muniversals initial configuration
M (Q, ???????? q0, qaccept, qreject), Input to
M
U U U U ...
M is described in binary
4
Universal Turing Machine(visualization)
Muniversals general configuration
q
0 1 0 0 1 0 U U
M (Q, ???????? q0, qaccept, qreject),
Ms state
Ms tape configuration
M is described in binary
5
Definition Computable function
A function f is computable iff there is a Turing
machine that, on input x, halts with f(x) on the
tape.
6
6 Theorems
  • 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

7
Proof idea -- construct a T.M. For L1 based on
one for L2
M1
w
f(w)
accept
Mf
M2
8
Proof
  • Let Mf be a Turing Machine that reduces L1 to
    L2
  • Let M2 decide/recognize L2
  • Define M1. On input w,
  • First, run Mf
  • Second, run M2 on f(w)
  • Accept iff M2 accepts

9
Contrapositive
Assume that L1 reduces to L2. If L1 is un...
and then L2 is un...
10
Do not try to prove L1 ltm L2if L2 is
recognizable and L1 is not recognizable !!
11
Second ExampleProving L is not recognizable by
reducing an unrecognizable problem to L
Let L M M is a T.M. such that M accepts
no inputs Claim L is not recognizable
12
Proof (by mapping reduction)
We will show that
Lu ltm L
13
Must demonstrate function f 1. f Z? TMs 2.
f is computable 3. f reduces LU to L
j ? LU f(j) ? L
j ? LU ? Mj dna j ? ... ? f(j) ? L j ? LU
? Mj acc j ? ... ? f(j) ? L
14
Reduction Idea
OLU
j
accept/reject
f(j) M
Mf
OL
L(M) f if M does not accept j L(M)
0,1?if M does accept j
15
  • Define reduction f Z TMs
  • f(j) M, a machine that
  • on input x, M simulates Mj on j.
  • M accepts x iff Mj accepts j.
  • Note Mf takes input j and outputs M f(j)

16
Prove correctness of function f 1. f Z? TMs
(obvious) 2. f is computable (obvious) 3.
f reduces LU to L
j ? LU f(j) ? L
j ? LU ? Mj dna j ? L(M) f ? f(j) ? L j ? LU
? Mj acc j ? L(M) 0,1 ? f(j) ? L
17
Example 3 ATM is undecidable Lu ltm ATM
18
The Halting Problemexample 4
Theorem Let LH (M,x) where M does not
halt on input x Then LH is not decidable
19
Proof (by mapping reduction)
We will show that
Lu ltm LH
20
  • Define reduction f Z TMs ? inputs
  • f(i) a machine/input pair (M,x) such that
  • M on any input w,
  • M simulates Mi on i.
  • If Mi accepts i, then M accepts w
  • If Mi rejects i, then M moves to the right
  • forever after finishing the simulation
  • else, M does not halt its simulation
  • x 0

Proof LU ltm LH
21
Need to Prove 3 things 1. f Z? TMs x inputs
(obvious) 2. f is computable (obvious, I
hope) 3. f reduces LU to LH
j ? LU f(j) ? LH
Pf j ? LU ? Mj dna j ? M DNH on x ? f(j) ?
LH j ? LU ? Mj acc j ? M halts on x ? f(j) ?
LH
22
Enumerator E like a Turing Machine except that
it takes no input and has an output. That output
sequence is the language L(E)
Scratch Work
Printer
A
w1, w2, w3 ...
R
L(E)
23
Definition A language L is recursively
enumerable iff L is the output of an enumerator
Theorem
A language L is recursively enumerable iff L is
recognizable
24
Proof
( )
Assume L is recursively enumerable by E. Then to
construct a Turing Machine T that recognizes
L On input w, T runs E and accepts if E ever
outputs w
( )
Assume L is recognizable by T. Then to construct
an enumerator E 1) I 1 2) Run T on the
first I inputs for I steps, output those that are
accepted on the Ith step 3) I I1 goto (1)
25
5th Example Proving L is not recognizable by
reducing an unrecognizable problem to L
Let L (A,B) T.M.s A and Bare s.t. L(A)
L(B) Then L is unrecognizable
26
Must demonstrate function f 1. f Z? TMs x
TMs 2. f is computable 3. f reduces LU to L
j ? LU f(j) ? L
j ? LU ? Mj dna j ? ... ? f(j) ? L j ? LU
? Mj acc j ? ... ? f(j) ? L
27
Reduction Idea
OLU
f(j) (A,B)
j
accept/reject
Mf
OL
L(A) f if M does not accept j L(B)
0,1?if M does accept j
28
  • Define reduction f Z TMs x TMs
  • f(j) (A,B), two machines such that
  • A on input x, A simulates Mj on j.
  • A accepts x iff Mj accepts j.
  • B on input y, B rejects
  • Note Mf takes input j and outputs (A,B) f(j)

29
Prove correctness of function f 1. f Z? TMs
(obvious) 2. f is computable (obvious) 3.
f reduces LU to L
j ? LU f(j) ? L
j ? LU ? Mj dna j ? L(A) f L(B) f ?
f(j) ? L j ? LU ? Mj acc j ? L(A) 0,1 ?
L(B) f ? f(j) ? L
30
Example 6 Proof by reduction
Rices theorem. Let P any subset of Turing
Machines such that a) ? TMs A and B s.t. L(A)
L(B), A ? P ? B ? P b) ? machines C and D such
that C ?P and D ?P. Theorem the language P is
undecidable.
31
Proof (by mapping reduction) Case 1 ? T.M. Mf ?
P s.t. L(Mf) ? Note this implies that M
L(M) ??? P. Let MnotinP ? P. Then Claim Lu
ltm P
32
Must demonstrate function f 1. f Z? TMs 2. f
is computable 3. f reduces LU to L
j ? LU f(j) ? L
j ? LU ? Mj dna j ? ... ? f(j) ? L j ? LU
? Mj acc j ? ... ? f(j) ? L
33
  • Define reduction f Z TMs
  • f(j) M such that
  • M on input x, A simulates Mj on j.
  • If Mj accepts j, then M simulates MnotinP
    on x.
  • If both Mj accepts j and MnotinP accepts x,
    then M accepts x
  • If either Mj DNA j or MnotinP DNA x, then M
    DNA x
  • Note Mf takes input j and outputs M f(j)

34
  • Note that
  • if Mj does not accept j, then f(j) accepts
    nothing
  • if Mj does accept j, then f(j) accepts
    L(MnotinP)

35
Prove correctness of function f 1. f Z? TMs
(obvious) 2. f is computable (obvious) 3.
f reduces LU to L
j ? LU f(j) ? L
j ? LU ? Mj dna j ? L(M) f ? M f(j) ? L j
? LU ? Mj acc j ? L(M) L(MnotinP) ? M f(j)
? L
36
Proof (by mapping reduction) Case 2 ? T.M. Mf ?
P s.t. L(Mf) ? Note this implies that M
L(M) ??? P. Let MnotinPB ? P. Then Claim
Lu ltm P Proof is very similar to the previous
proof
37
Observation
L is a recognizable language There is a
decidable language L2 such that L x ? w such
that (w, x) ? L2
S1
38
Observation
L is a co-recognizable language There is a
decidable language L3 such that L y ? z such
that (y,z) ?L3
P1
39
(Problems 1 and 2 of) Homework 5Due Wednesday,
March 8
1. Let B be an undecidable language where B ltm
B. A) Prove that B ?S1 ? P1 B) Give an example
of such a language B
40
2. Prove
For all A,B,C, Language A ltm B Language B lt m
C Language A lt m C
Write a Comment
User Comments (0)
About PowerShow.com