COT 6410
Fall 2010
Sample Midterm#1
Name:
KEY
1
. Choosing from among
(REC)
recursive
,
(RE)
re non-recursive, (coRE) co-re non-recursive
,
(NR)
non-re/non-co-re
, categorize each of the sets in a) through d). Justify your answer by showing
some minimal quantification of some known recursive predicate.
a.) { f |
domain(f) is finite }
NR
Justification:
x
y
x
t ~STP(y, f, t)
b.) { f
| domain(f) is empty }
CO
Justification:
x
t ~STP(x, f, t)
c.) { <f,x> | f(x) converges in at most 20 steps }
REC
Justification: STP(x, f, 20)
d.) { f | domain(f) converges in at most 20 steps for some input x }
RE
Justification:
x
t STP(x, f, t)
2
. Let set
A
be recursive,
B
be re non-recursive and
C
be non-re. Choosing from among
(REC)
recursive
,
(RE)
re non-recursive
,
(NR)
non-re
, categorize the set
D
in each of a) through d) by
listing
all
possible categories. No justification is required.
a.) D = ~C
RE, NR
b.) D
A
C
REC, RE, NR
c.) D = ~B
NR
d.) D = B
A
REC, RE
3.
Prove that the
Halting Problem
(the set
HALT
=
K
0
= L
u
) is not recursive (decidable) within any
formal model of computation. (Hint: A diagonalization proof is required here.)
Look at notes.
4.
Using reduction from the known undecidable
HasZero, HZ = { f |
x f(x) = 0 }
, show the non-
recursiveness (undecidability) of the problem to decide if an arbitrary primitive recursive function
g
has the property
IsZero, Z = { f |
x f(x) = 0 }
,. Hint: there is a very simple construction that uses
STP
to do this.
Just giving that construction is not sufficient; you must also explain why it