SmithLogo

CSC 250

Theory of Computation

Smith Computer Science



Lecture Notes 26: Mapping Reducibility and Intro to Rice's Theorem


Outline

This class we'll discuss:




A Reduction Issuue



The Emptiness Problem

  • Theorem: \(\overline{EMPTY-TM}\) is recognizable
  • Theorem: \(EMPTY-TM\) is undecidable
  • Corollary: \(EMPTY-TM\)is unrecognizable
  • Proof: If \(\overline{EMPTY-TM}\) and \(EMPTY-TM\) recognizable,
  • that would imply \(EMPTY-TM\) is decidable




  • This means our Turing Reduction Can't catch if the fact that we're reducing outside the same class of languages

    Issue with EMPTY ≤ ¬EMPTY is that the “Domain” of one is complement of the “Domain” of the other!




    However, we've actually seen a STRONGER type of reduction





    Here, The “Domain” of EMPTY corresponds to the “Domain” of EQ!







    We could rewrite this as a simple conversion:
    from any word in EmptyTM to a word in EQ_TM (and similarly a word not in EmptyTM to a word not in EQ_TM).

    We call this a mapping reduction, and denote it \( \leq_m\)




    Mapping Reductions

























    They’re a way for us to relate problems to one another

    If A reduces to B and B is easy => A is easy too
    More common: if A reduces to be and A is hard => B is hard too

    We started with ATM (which we proved was undecidable using a big ugly contradiction )
    Reduced ATM to HALT (ATM ≤ HALT): we showed that if we had a decider HALT, we could use that to decide ATM
    (so that means HALT must also be undecidable)

    We did the same thing with ATM-01
    And EmptyTM

    Later, we also showed that if we had a decider for HALT, we could use that to decide EmptyTM
    And that if we had a decider for EQ_TM, we could yet again decide EmptyTM (mapping)












    Activity 1 [2 minutes] How would you do this reduction?:
    (Wait; then Click)

    HALT <=m SOMETIMES-HALTS

    We want to show that we can take any input and transform it such that:
    if the input was a word in HALT \((< M,w>)\), the output is a word \((< M>)\) in SOMETIMES-HALTS

    if the input was NOT a word in HALT, the output is NOT a word in SOMETIMES-HALTS

    This suggests that we want to build a helper machine that “amplifies” the behavior of M on w:

    \[ \begin{align*} &D_{HALT}:\\ & \text{ On input $ < M,w > $ }:\\ & \text{ Create (but don't run) $HELPER_{M,w}$ such that}\\ & \quad \text{ On input $ < X > $ }:\\ & \quad \quad \text{ Ignore $ < X > $ }\\ & \quad \quad \text{ Run M on w ADWID}\\ & \text{ Now Run $D_{S-H}$ on input $ < HELPER_{M,w} > $ ADWID}\\ \end{align*} \]

    The only way the helper halts is if M halts on w (if this is the case, it halts on EVERY input). Otherwise, it loops.
    In other words, if \(< M,w>\) was in HALT, then the helper will be in SOMETIMES-HALTS,
    and if \(< M,w>\) is NOT in HALT, then the helper won’t be in SOMETIMES-HALT.

    Thus, we’ve defined a mapping that from problems in HALT to problems in SOMETIMES-HALTS, proving that SOMETIMES-HALTS is at least as difficult as HAL, and so must be undecidable.




    Recap: Mapping Reductions

















    Our previous example:



































    Rice's Theorem









    Remember, we have to be able to deal with any input, but we don’t necessarily have to map them all to unique outputs.
    This is why a mapping reduction is sometimes called a “many-one” reduction.










    Let’s start by assuming that ∅ ∉ P (that is, it doesn’t exhibit the non-trivial property we care about).
    Because we’re trying to prove undecidability, I claim that we can assume this WLOG.
    Why? (otherwise, just work with the complement of P).

    Let M1 be any TM such that L(M1) = ∅, so < M1 > ∉ MP.
    Cool, so now we’ve got something we could map not-in-ATM words to.







    Next let M2 be any TM such that L(M2) ∈ P, so < M1 > ∈ MP.
    How do we know M2 exists?
    Because P is nontrivial.










    We have M1 not in P, M2 in P

    Goal:
    on any input x:
    if \(x = < M,w >\) ∈ ATM, map to something in MP
    otherwise, map to something not in MP (like M1)

    Easy part: If x isn’t of the form \(< M,w >\) return something ∉ MP, like \(< M1>\).

    Harder part: If x IS of the form \(< M,w >\) , we have two cases: if it’s in ATM, we want to map it to a machine in MP and if it’s NOT in ATM, we want to map it to something not in MP.







    Time to get tricksy: if x is of the form \(< M,w >\) , then return the following machine: \(< M^{\prime}_{M,w} >\)

    \(< M^{\prime}_{M,w} >\) :
    On any input y:
    Run M on w. #(If stuck on a loop, this is M1!)
    If M accepts w then run M2 on y ADWID
    If M rejects w, REJECT.


    If M accepts w, what is \(< M^{\prime}_{M,w} >\)’s language?
    exactly the same as M2’s, which means this machine is in MP
    (If M accepts w, then \(< M^{\prime}_{M,w} >\) is just the result of M2)

    If M doesn’t accept w, what is its language?
    the empty language, exactly like M1, which means NOT in MP
    (If M doesn't accept w,\(< M^{\prime}_{M,w} >\) is just M1)

    Therefore, ATM \( \leq_m\) MP using this process.
    This implies that MP is undecidable


















    Before next class (Wednesday)


    [Due for everyone]
    TODO

    [Optional]
    TODO