CS 5315, Test 1, Tuesday, March 7, 2006

Name


(Please do not forget to put your name on all extra sheets of paper)

1. Primitive recursive functions
(a) Prove, from scratch, that the functions a!, a - b (funny minus that never goes below 0), "a and b", and "a or b" are primitive recursive.

(b) Start by giving a definition of a primitive recursive function, and explain how your procedure for "a and b" fits this general definition.

(c) The notion of a primitive recursive function is a formalization of the for-loop. Translate your description of "a and b" into a program that uses for-loop(s) to compute the product.

2. Mu-recursive functions
(a) Prove that the functions a!, "a and b", and "a or b" are mu-recursive.

(b) Start by giving a definition of a mu-recursive function, and explain how your procedure for computing "a and b" fits this general definition.

(c) Since subtraction is an inverse operation to addition, it may seem reasonable to define a-b as the following expression: mu m.(b+m=a). Describe this expression in English and as a while loop, and show, step by step, what happens when we try to compute this expression for a=2 and b=3.

3. Turing machines (TM)
(a) Describe a TM that computes n-1 (funny minus).

(b) Trace your TM for n=2.

(c) Use your TM to design a new TM for computing composition (n-1)-1.

4. Computability in general
(a) Is every computable function primitive recursive? Explain your answer (no need to produce a detailed proof).

(b) Is every computable function mu-recursive? explain your answer. Formulate Church-Turing thesis. Is it a mathematical theorem? a statement about the physical world? can it turn out to be false?

5. Decidable and r.e. sets
(a) Prove that the union and intersection of two decidable sets and a complement to a decidable set are decidable.

(b) Prove that the union and intersection of two r.e. sets are r.e.

(c) Is the complement to a r.e. set always r.e.? Explain your answer.

6. What is Kolmogorov complexity? Estimate the Kolmogorov complexity of a string 10101...010 (2,000 times). For extra credit: prove that Kolmogorov complexity is not computable.

7. Briefly describe the research project on which you are working for this class.