cot6410F10FinalSampleQuestionsKey - COT 6410 Fall 2010...

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

View Full Document Right Arrow Icon
Fall 2010 Final Exam Sample Questions 1 . 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 2. Prove that the Halting Problem (the set K 0 ) is not recursive (decidable) within any formal model of computation. (Hint: A diagonalization proof is required here.) Assume we can decide the halting problem. Then there exists some total function Halt such that 1 if [x] (y) is defined Halt(x,y) = 0 if [x] (y) is not defined Here, we have numbered all programs and [x] refers to the x-th program in this ordering. We can view Halt as a mapping from into by treating its input as a single number representing the pairing of two numbers via the one-one onto function pair(x,y) = <x,y> = 2 x (2y + 1) – 1 with inverses <z> 1 = exp(z+1,1) <z> 2 = ((( z + 1 ) // 2 <z>1 ) – 1 ) // 2 Now if Halt exist, then so does Disagree, where 0 if Halt(x,x) = 0, i.e, if [x] (x) is not defined Disagree(x) = μ y (y == y+1) if Halt(x,x) = 1, i.e, if [x] (x) is defined Since Disagree is a program from into , Disagree can be reasoned about by Halt. Let d be such that Disagree = [d], then Disagree(d) is defined Halt(d,d) = 0 [d](d) is undefined Disagree(d) is undefined But this means that Disagree contradicts its own existence. Since every step we took was constructive, except for the original assumption, we must presume that the original assumption was in error. Thus, the Halting Problem is not solvable. 3. Using reduction from the known undecidable HasZero, HZ = { f | 5 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 | 2200 x f(x) = 0 } . HZ = { f | 5 x 5 Let f be the index of an arbitrary effective procedure. Define g f (y) = 1 - 5 x 5 If 5 x f(x) = 0, we will find the x and the run-time t, and so we will return 0 (1 – 1) If 2200 x f(x) 0, then we will diverge in the search process and never return a value. Thus, f
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/14/2011 for the course COT 4610 taught by Professor Dutton during the Fall '10 term at University of Central Florida.

Page1 / 5

cot6410F10FinalSampleQuestionsKey - COT 6410 Fall 2010...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online