{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cot6410F10FinalSampleQuestionsKey

# cot6410F10FinalSampleQuestionsKey - COT 6410 Fall 2010...

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

COT 6410 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 | 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 } . HZ = { f | x t [ STP(x, f, t) & VALUE(x, f, t) == 0] } Let f be the index of an arbitrary effective procedure. Define g f (y) = 1 - x t [ STP(x, f, t) & VALUE(x, f, t) == 0] If x f(x) = 0, we will find the x and the run-time t, and so we will return 0 (1 – 1) If x f(x) 0, then we will diverge in the search process and never return a value.

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.
• Fall '10
• Dutton
• Halting problem, decision problem, Sample Final Questions, CONSTANT ≤m TOT, arbitrary effective procedure, Rice’s theorem

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern