12.07.2015 Views

Rice's Theorem - Hampden-Sydney College

Rice's Theorem - Hampden-Sydney College

Rice's Theorem - Hampden-Sydney College

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentRice’s <strong>Theorem</strong>Lecture 34Problem 5.28Robb T. Koether<strong>Hampden</strong>-<strong>Sydney</strong> <strong>College</strong>Fri, Nov 14, 2008


OutlineRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>Assignment1 Collected Problems2 Homework Review3 Functional Properties4 Rice’s <strong>Theorem</strong>5 Assignment


Collected ProblemsRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentDue Mon, Nov 17, 2008Exercises 4.3, 4.5.Problems 4.12, 4.16.Exercise 5.1.


Homework ReviewRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentProblem 5.9, page 211.LetT = {〈M〉 | M is a TM that accepts w R whenever itaccepts w}.Show that T is undecidable.


Homework ReviewRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentSolutionWe will show that T is reducible to A TM .Suppose that T is decidable.Let D T be a decider for T.Let M be a Turing machine and w a string.Given 〈M, w〉, construct the Turing machine M wdescribed in the following diagram.


Homework ReviewRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>SolutionM wx = w R〈x〉 x = w 〈M, w〉COMPUaccyesAssignmentx ≠ w or w Rrejno


Homework ReviewRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentSolutionThe language of M w is{ {w, wL(M w ) =R }, w ∈ L(M);{w R }, w /∈ L(M).Then, as shown in the following diagram, we can useM w to build a decider for A TM , which is a contradiction.


Homework ReviewRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsSolutionHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>Assignment〈M, w〉D A〈M w 〉D Tyesnoyesno


Functional PropertiesRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentDefinition (Functional properties)A functional property P is a set of Turing-machinedescriptions 〈M〉 with the property that if L(M 1 ) = L(M 2 ),then either 〈M 1 〉, 〈M 2 〉 ∈ P or 〈M 1 〉, 〈M 2 〉 /∈ PDefinition (Trivial functional property)A functional property P is trivial if P = ∅ orP = {〈M〉 | M is a Turing machine}.The following are nontrivial functional properties.M accepts input 0.M computes n + 1 on input n.M recognizes {w | w contains 111}.


Rice’s <strong>Theorem</strong>Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong><strong>Theorem</strong> (Rice’s <strong>Theorem</strong>)Let P be a nontrivial functional property. Then P isundecidable.Assignment


Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentProof.Let P be a nontrivial functional property.Let M 1 be a Turing machine that rejects all inputs.That is, L(M 1 ) = ∅.Without loss of generality, assume that 〈M 1 〉 /∈ P.(Otherwise, we reverse the roles of P and P.)Let 〈M 2 〉 ∈ P for some Turing machine M 2 .


Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewProof.Suppose that P is decidable.Let D P be a decider for P.FunctionalPropertiesRice’s<strong>Theorem</strong>Assignment〈M〉D P〈M〉 ∈ P〈M〉 ∉ Pyesno


Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentProof.To build D A , we first describe how to build anotherTuring machine M w to use as a module.Given 〈M, w〉, build a Turing machine M w that does thefollowing:Given input x, simulate M on w.If M halts and rejects w, then M w rejects x.If M halts and accepts w, then M w simulates M 2 on x.If M loops, then (obviously) M w loops.


Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewM w〈M, w〉UM rejects wnoFunctionalPropertiesM accepts wRice’s<strong>Theorem</strong>AssignmentxM 2M 2 rejects xM 2 accepts xyes


Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentProof.Therefore,L(M w ) ={ ∅, if M rejects w (or loops);L(M 2 ), if M accepts w.That is, 〈M w 〉 ∈ P if and only if M accepts w.Now let D A use D P to decide whether 〈M w 〉 ∈ P:If 〈M w 〉 ∈ P, then D A accepts 〈M, w〉.If 〈M w 〉 /∈ P, then D A rejects 〈M, w〉.


Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalProperties〈M, w〉D 〈M w 〉 ∈ PAyesD P〈M w 〉Rice’s<strong>Theorem</strong>Assignment〈M w 〉 ∉ Pno


Rice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>Proof.That is, D A decides A TM , which is a contradiction.Therefore, P is undecidable.Assignment


AssignmentRice’s<strong>Theorem</strong>Robb T.KoetherCollectedProblemsHomeworkReviewFunctionalPropertiesRice’s<strong>Theorem</strong>AssignmentHomeworkRead Problem 5.28, page 213.Apply Rice’s <strong>Theorem</strong> to Problem 9.Determine whether the properties described inProblems 10 - 15 are functional properties. If they are,then apply Rice’s <strong>Theorem</strong>.Problems 30, 31, page 213.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!