{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

complexity_ans

# complexity_ans - CS 535 Fall 2008 MIDTERM with Answers...

This preview shows pages 1–2. Sign up to view the full content.

CS 535 - Fall 2008 - MIDTERM with Answers DIRECTIONS: Do any 4 of the following 5 problems. Each problem is worth 10 points. Write all of your answers in your blue book. The test is open book and you can use one page of notes. 1. a. Let f be a total computable function, f: N N . For any integer y , f 1 ( y ) is defined to be the (possibly infinite) set of all x s such that f ( x ) = y . Show that for any fixed integer m , f 1 ( m ) is a c.e. set. Answer. If f 1 ( y ) is finite then it is c.e by definition. If f 1 ( y ) is infinite we define a computable function h which enumerates f 1 ( y ) by, h(0) = smallest number z 0 with f( z 0 ) = m For j > 0, h(j) = smallest number z larger than h(j-1) with f( z ) =m. h is a total computable function which enumerates f 1 ( m ). b. Given two disjoint computably enumerable sets, A and B , prove that if A is undecidable then A B is also undecidable. Ans. Assume A B is decidable. , We will get a contradiction to this as- sumption by showing that in this case that A is decidable. Given any input x, to decide if x A , first check if x A B , If no, then x / A. If yes, then enumerate A and B until x appears in one (and only one) of these sets. Then x A if and only if x appears in A’s enumeration.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

complexity_ans - CS 535 Fall 2008 MIDTERM with Answers...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online