Solved Problems for Midterm Exam - Computability and Complexity | CS 590, Exams of Computer Science

Material Type: Exam; Class: Computability and Complexity; Subject: Computer Science; University: University of Idaho; Term: Spring 1993;

Typology: Exams

Pre 2010

Uploaded on 09/17/2009

koofers-user-dvu
koofers-user-dvu 🇺🇸

4

(1)

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CS 590 Midterm Practice Name:
This is a collection of practice problems for the midterm. The midterm
will be very likely to contain questions very similar to these,
or to those in
the homework
.
On the test you will be allowed to refer to a single 8.5x11 inch (or A4)
sheet of notes|with anything on it whichyou think might be useful. You
will also be allowed to use as much blank scratch paper as you need.
Note: answers with proofs, or at least arguments for your answer, will
receive more credit than those without.
CS 590 Theory of Computation. Test Practice
12 March 1993
Problem Practice-1:
Let
C
=
f
e
:
e
converges on all of the form
h
x; y
i
when
x
and
y
are relatively prime
g
.
Is
C
recursive?
Answer:
No. It is an index set, so it is non-recursiveness by Rice's theorem.
Problem Practice-2:
Let
A
=
f
x
:
9
y
(
y
(
x
)
#
in
x
steps
g
.Is
A
recursively enumerable?
Answer:
Yes. The predicate \
y
(
x
)
#
in
x
steps" is decidable. So,
A
is recursively
enumerable by the normal form theorem.
Problem Practice-3:
Suppose the function
f
is computible. What can you say about the set
G
f
=
fh
x; y
i
:
f
(
x
)=
y
g
?
Answer:
It is r.e., since
h
x; y
i2
G
f
i
9
y
(
f
(
x
)=
y
)
and the predicate in parentheses
is partially decidable.
Problem Practice-4:
Let
R
(
x; y
) be true i
x
=
y
.Is
R
(
x; y
) decidable? decidable?
pf3
pf4

Partial preview of the text

Download Solved Problems for Midterm Exam - Computability and Complexity | CS 590 and more Exams Computer Science in PDF only on Docsity!

CS 590 Midterm Practice Name: This is a collection of practice problems for the midterm. The midterm will b e very likely to contain questions very similar to these, or to those in the homework. On the test you will b e allowed to refer to a single 8.5x11 inch (or A4) sheet of notes|with anything on it which you think might b e useful. You will also b e allowed to use as much blank scratch pap er as you need. Note: answers with pro ofs, or at least arguments for your answer, will receive more credit than those without.

CS 590 Theory of Computation. Test Practice

12 March 1993

Problem Practice-1: Let C = fe : e converges on all of the form hx; y i when x and y are relatively primeg. Is C recursive?

Answer: No. It is an index set, so it is non-recursiveness by Rice's theorem.

Problem Practice-2: Let A = fx : 9 y (y (x) # in x steps g. Is A recursively enumerable?

Answer: Yes. The predicate \y (x) # in x steps" is decidable. So, A is recursively enumerable by the normal form theorem.

Problem Practice-3: Supp ose the function f is computible. What can you say ab out the set Gf = fhx; y i : f (x) = y g?

Answer: It is r.e., since hx; y i 2 Gf i 9 y (f (x) = y ) and the predicate in parentheses is partially decidable.

Problem Practice-4: Let R(x; y ) b e true i x = y. Is R(x; y ) decidable? decidable?

(Hint: how do es R(x; y ) compare to the problem of recognizing total, constant functions?)

Answer: No. Let c b e such that c is equal to zero everywhere. Supp ose f (x; y ) is the characteristic function for R, and consider the function g (x) = f (x; c). This would b e the caracteristic function for the predicate \x = 0 everywhere", which is undecidable. So, f must b e undecidable as well. Note, this argument shows that the problem of deciding if a function is equal to zero everywhere reduces to the problem of deciding the predicate R.

Problem Practice-5: Is there a total, computible function k such that if e (x) is the charac- teristic function for the predicate R(x) then k (e) (x) is the characteristic for the predicate \x is prime and R(x)"?

Answer: Yes. Let g (e; x) = pr (x)  U (e; x). This is a computible function with parameters e and x, by the universal function theorem. So, by the smn theorem, there is a total, computible function k such that k (e) (x) is the characteristic function in question.

Problem Practice-6: Let K 1 = fe : We 6 = ;g. Prove that K 1 is undecidable.

Answer: K 1 is a non-trivial index set, so the result follows by Rice's theorem. Alternatively, one can show that K m K 1 : Let m b e total and computible such that

m(x) =

1 if x 2 Wx " otherwise

Then

x 2 K i m(x) (y ) = 1 everywhere i Wm(x) 6 = ; i m(x) 2 K 1

Problem Practice-12: Supp ose f is a partial, computible function. Under what conditions is f ^1 computible?

Answer: If f is one to one, then f ^1 = y (f (x) = y ). If it is not, then its inverse isn't even well-de ned.

Problem Practice-13: Prove that dm (K ) 6 = dm (T O T ).

Answer: If T O T m K then T O T would b e r.e., which we know it is not.

Problem Practice-14: Is dm (K ) = dm ( K )?

Answer: No, since K 6 m K (otherwise is would b e r.e., and K would b e recursive).

Problem Practice-15: Prove that m is re exive and transitive.

Answer: See the b o ok.