lecture 34 - rice's theorem

Upload: anirudh-krishana

Post on 07-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Lecture 34 - Rice's Theorem

    1/18

  • 8/6/2019 Lecture 34 - Rice's Theorem

    2/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    Review

    FunctionalProperties

    RicesTheorem

    Assignment

    Outline

    1 Collected Problems

    2 Homework Review

    3 Functional Properties

    4 Rices Theorem

    5 Assignment

    http://goforward/http://find/http://goback/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    3/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    Review

    FunctionalProperties

    RicesTheorem

    Assignment

    Collected Problems

    Due Mon, Nov 17, 2008

    Exercises 4.3, 4.5.

    Problems 4.12, 4.16.

    Exercise 5.1.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    4/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    Review

    FunctionalProperties

    RicesTheorem

    Assignment

    Homework Review

    Problem 5.9, page 211.

    Let

    T = {M | M is a TM that accepts wR whenever it

    accepts w}.

    Show that T is undecidable.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    5/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    Review

    FunctionalProperties

    RicesTheorem

    Assignment

    Homework Review

    Solution

    We will show that T is reducible to ATM.

    Suppose that T is decidable.

    Let DT be a decider for T.

    Let M be a Turing machine and w a string.

    Given M,w, construct the Turing machine Mwdescribed in the following diagram.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    6/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    Review

    FunctionalProperties

    RicesTheorem

    Assignment

    Homework Review

    Solution

    COMPx M, w

    Mw

    Ux= w

    x= wR

    xwor wR

    yes

    no

    acc

    rej

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    7/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    Review

    FunctionalProperties

    RicesTheorem

    Assignment

    Homework Review

    Solution

    The language of Mw is

    L(Mw) =

    {w,wR}, w L(M);{wR}, w / L(M).

    Then, as shown in the following diagram, we can use

    Mw to build a decider for ATM, which is a contradiction.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    8/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    Review

    FunctionalProperties

    RicesTheorem

    Assignment

    Homework Review

    Solution

    M, w

    DA yes

    no

    MwDT

    yes

    no

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    9/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    ReviewFunctionalProperties

    RicesTheorem

    Assignment

    Functional Properties

    Definition (Functional properties)

    A functional property P is a set of Turing-machine

    descriptions M with the property that if L(M1) = L(M2),then either M1, M2 P or M1, M2 / P

    Definition (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}.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    10/18

    Rices

    Theorem

    Robb T.Koether

    CollectedProblems

    Homework

    ReviewFunctionalProperties

    RicesTheorem

    Assignment

    Rices Theorem

    Theorem (Rices Theorem)LetP be a nontrivial functional property. ThenP is

    undecidable.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    11/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    Homework

    ReviewFunctionalProperties

    RicesTheorem

    Assignment

    Proof.

    Let P be a nontrivial functional property.

    LetM

    1 be a Turing machine that rejects all inputs.That is, L(M1) = .

    Without loss of generality, assume that M1 / P.

    (Otherwise, we reverse the roles of P and P.)

    Let M2 P for some Turing machine M2.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    12/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    Homework

    ReviewFunctionalProperties

    RicesTheorem

    Assignment

    Proof.

    Suppose that P is decidable.

    Let DP be a decider for P.

    MP yes

    no

    DP

    M

    MP

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    13/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    HomeworkReview

    FunctionalProperties

    RicesTheorem

    Assignment

    Proof.

    To build DA, we first describe how to build another

    Turing machine Mw to use as a module.

    Given M,w, build a Turing machine Mw that does thefollowing:

    Given input x, simulate M on w.If Mhalts and rejects w, then Mw rejects x.If Mhalts and accepts w, then Mw simulates M2 on x.

    If M loops, then (obviously) Mw loops.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    14/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    HomeworkReview

    FunctionalProperties

    RicesTheorem

    Assignment

    x

    M rejects w

    Maccepts w

    Mw

    M, wU

    no

    M2

    M2 rejects x

    yesM2 accepts x

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    15/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    HomeworkReview

    FunctionalProperties

    RicesTheorem

    Assignment

    Proof.

    Therefore,

    L(Mw) = , if M rejects w (or loops);L(M2), if M accepts w.

    That is, Mw P if and only if M accepts w.

    Now let DA use DP to decide whether Mw P:

    If Mw P, then DA accepts M,w.If Mw / P, then DA rejects M,w.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    16/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    HomeworkReview

    FunctionalProperties

    RicesTheorem

    Assignment

    DA

    DP

    yes

    no

    MwP

    MwM, w

    MwP

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    17/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    HomeworkReview

    FunctionalProperties

    RicesTheorem

    Assignment

    Proof.

    That is, DA decides ATM, which is a contradiction.

    Therefore, P is undecidable.

    http://find/
  • 8/6/2019 Lecture 34 - Rice's Theorem

    18/18

    Rices

    TheoremRobb T.Koether

    CollectedProblems

    HomeworkReview

    FunctionalProperties

    RicesTheorem

    Assignment

    Assignment

    Homework

    Read Problem 5.28, page 213.

    Apply Rices Theorem to Problem 9.

    Determine whether the properties described in

    Problems 10 - 15 are functional properties. If they are,

    then apply Rices Theorem.

    Problems 30, 31, page 213.

    http://find/