Test 2 - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Test 2

Description:

Please make sure that you understand what the questions ask for. Do not hesitate to ask ... L = {(M1,M2): M1, M2 are T.M.'s such that (L(M1) - L(M2)) = (110) ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 12
Provided by: petersg
Category:
Tags: aret | test

less

Transcript and Presenter's Notes

Title: Test 2


1
Test 2 Computer Science 500 Spring 2000 March
20 This test is closed-book, 75 minutes Please
make sure that you understand what the questions
ask for. Do not hesitate to ask Pete for
clarification Please check your work and be as
precise as reasonably possible.
2
Problem 1 For each language, state 1) Does
Rice Theorem apply (directly) to the
language?2) If your answer to (1) is yes, what
fact does Rices Theorem imply?
A) La M L(M) ATM yes, R.T. Case 2
implies La is not co-recognizable B) Lb M M
does not halt on any of its inputs no (R.T.
Condition (A) fails) C) Lc ATM (i,j) Mi
accepts input j no (Lc is not a set of
T.M.s) D) Ld M L(M) ? Lu or L(M) ?
Lu yes, R.T. Case 1 implies Ld is not
recognizable E) Le M L(M) ATM no. Le is
empty, R.T. Condition (B) fails
4pts each
3
Problem 2 A) Write a Kleene hierarchy
description for L M M a T.M. such that LU?
L(M) Recall LU j T.M. Mj accepts input j
7pts L M ?j, Mj accepts input j ? M accepts
j L M ?j, Mj DNA j V M accepts j L M
?j,m , ? n, Mj DNA j within m steps V M accepts
j within n steps B) What Kleene class
corresponds to your description of L in part (A)?
2pts P2
4
C) Prove L ? ?1 i.e. L is not recognizable
8pts
We prove L ? S1 by showing Lu ltm L. We will
define f that 1. f Z? T.M.s 2. f is
computable 3. f reduces LU to L k ? LU ? Mk
dna k ? L(M) 0,1 ? LU ? L(M) ? f(k) ? L k
? LU ? Mk acc k ? L(M) x x lt number of steps
in which Mk accepts k ? LU ? L(M) ? f(k) ? L ?
k, f(k) M s.t. On input w, M does M
simulates Mk on k for w steps if Mk
acc k within w steps, then M rejects w
else if Mk dna k within w steps, then M accepts
w
5
D) Prove L ? P1 i.e. L is not
co-recognizable 8pts Rices Theorem, case 2
applies
6
Problem 3 L (M1,M2) M1, M2 are T.M.s such
that (L(M1) - L(M2)) (110) a) Describe L in
Kleene hierarchy form (using quantifiers and a
decidable predicate) L (M1,M2) ?w, (w ?
L(M1) ? w ? L(M2)) ? w ? (110) ? ?? L
(M1,M2) ?w, (w ? L(M1) ? w ? L(M2)) V w
?(110) ? (w ? L(M1) V ? L(M2)) V w ? (110)
L (M1,M2) ?w,m , ? n, (M1 acc w w/in n
steps ? M2 dna w w/in m steps) V w ?(110)
? (M1 dna w w/in m steps V M1 acc w w/in n
steps )) V w ? (110) b) What Kleene
class corresponds to your description of L in
part (A)? 2pts P2
7pts 2pts
7
We prove L ? S1 by showing Lu ltm L. We will
define f that 1. f Z? T.M.s x T.M.s 2. f
is computable 3. f reduces LU to L k ? LU ?
Mk dna k ? L(M1) (110) and L(M2) f ? (L(M1)
- L(M2)) (110) ? f(k) ? L k ? LU ? Mk acc k
? L(M1) (110) and L(M2) (110) ? (L(M1) -
L(M2)) f ? f(k) ? L ? k, f(k) M1,M2 s.t. On
input w, M1 does if w ?(110) , then M1 acc
w else M1 rejects w
On input w, M2 does if w ? (110) , then M2
acc w else M2 simulates Mk on k
if Mk acc k, then M2 accepts w else if
Mk dna k, then M2 dna w
8
D) Prove L ? P1 i.e. L is not co-recognizable
8pts
We prove L ? P1 by showing Lu ltm L. We will
define f that 1. f Z? T.M.s x T.M.s 2. f
is computable 3. f reduces LU to L k ? LU ?
Mk acc k ? L(M1) 0,1 and L(M2) (110) ?
(L(M1) - L(M2)) (110) ? f(k) ? L k ? LU ?
Mk dna k ? L(M1) (110) and L(M2) (110) ?
(L(M1) - L(M2)) f ? f(k) ? L ? k, f(k) M1,M2
s.t. On input w, M1 does if w ?(110) , M1
acc w else M1 simulates Mk on k
if Mk acc k, then M1 accepts w else if
Mk dna k, then M1 dna w
On input w, M2 does if w ?(110) , M2 acc
w else M2 rejects w
9
Problem 4 (True or False) 3pts each a) ??L1,L2
if L1 ltm L2 and L2 is co-recognizable, then L1 is
co-recognizable True b) ??L1,L2 if L1 ltm L2 and
L2 is ?1 -complete, then L1 ? ?1 True c) There
are languages L that are not in ?i for any value
of i True. Each ?i has a countable number of
languages so their union is countable. There are
an uncountable number of languages d) ??L1,L2 if
L1 is a subset of L2 and L2 is recognizable,
then L1 is recognizable False (e.g. L1 LU , L2
0,1 )
10
e) ??L, if L satisfies the 2 requirements for
Rices Theorem, then L ? ?1 U ?1 False (e.g. L
M L(M) f ) f) If L M L(M) 0,1
S then L ? ?1 False (R.T. Implies not in ?1
) g) ??L, if there is an enumerator E that
outputs L, then L is decidable False, (L is
recognizable) h) ??L, if L ? ?1 then L ltm L
False (e.g. ATM) i) L M L(M) ATM is
decidable where ATM (i,j) T.M. Mi accepts
input j False RT j) L L L(M) LU is
decidable where LU j T.M. Mj does not
accept input j True, L is empty
11
Extra credit 3 pts(no partial credit on this
question)
1. Describe L is Kleene form where L M L(M)
is regular L M ? D, L(M) L(D) L M ?
D, ?w, M acc w ? D acc w L M ? D, ?w, (M dna
w V D acc w) ? (M acc w V D dna w) L M ? D,
?w, m, ? n, (M dna w w/in m steps V D acc w) ? (M
acc w w/in n steps V D dna w)
Write a Comment
User Comments (0)
About PowerShow.com