1 / 112

Jeff Edmonds York University

4111 Computability. Reductions to the Halting Problem. Different Models Reductions Simple Reductions Rice's Theorem Acceptable Acceptability Complete. The Post Correspondence Prob Tiling CFG G Generates I CFG G Generates Every String CFG G Generates Some String CFG L(G)=L(G')

Download Presentation

Jeff Edmonds York University

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 4111 Computability Reductions to the Halting Problem • Different Models • Reductions • Simple Reductions • Rice's Theorem • Acceptable • Acceptability Complete • The Post Correspondence Prob • Tiling • CFG G Generates I • CFG G Generates Every String • CFG G Generates Some String • CFG L(G)=L(G') • Game of Life • Hilbert's 10th Problem Jeff Edmonds York University Lecture4 COSC 4111

  2. Reductions for Undecidability • Undecidable problems: Halting Problem • = {<M,I> | TM M halts on input I} • = {<J,I> | Java program J halts on input I} • = {<P,I> | Primitive Recursive Program P halts on input I} • = {<P,I> | Recursive Program P halts on input I} • = {<P,I> | Register Machine halts on input I} • = {<C,I> | Uniform circuit C halts on input I} • = {<M,I> | Quantum Machine M Java halts on input I} • = {<G,I> | Context Sensitive Grammar G generates string input I} • = {<H,I> | Human H halts on input I} ? Every primitive recursive program halts. n, circuit computed in time size(n) Every human dies.

  3. Reductions for Undecidability Now that we have established that the Halting Problem is undecidable, we can use it for a jumping off point for more “natural” undecidability results.

  4. Reductions Palg ≤compPoracle • Reduction: Design an algorithm for one computational problem, using a supposed algorithm for another problem as a subroutine.

  5. Reductions Palg ≤compPoracle • Reduction: Design an algorithm for one computational problem, using a supposed algorithm for another problem as a subroutine. • Used to create a new algorithm from a known algorithm. • Learn that a new problem is likely hard, from knowing a known problem is likely hard. • Learn that two problems have a similar “structure.”

  6. Reductions Sam Mary s t Bob Beth Who loves who Max matching John Sue Fred Ann A network s t Max Flow BUILD:MatchingOracle GIVEN:NetworkFlow Oracle Matching ≤compNetwork Flows

  7. Reductions Computable Exp Poly Halting • Learn that a new problem is likely hard, from knowing a known problem is likely hard.

  8. Reductions We give an algorithm for Palg using a supposed algorithm for Poracle as a subroutine. Is there an algorithm for Palg? Is there an algorithm for Poracle? ?

  9. Reductions We give an algorithm for Palg using a supposed algorithm for Poracle as a subroutine. If there is not an algorithm for Palg If there is an algorithm for Palg ? ?? then there is not fast algorithm for Poracle ? If there is an algorithm for Poracle If there is not an algorithm for Poracle then there is an algorithm for Palg ?? ? ?

  10. Reductions We give an algorithm for Palg using a supposed algorithm for Poracle as a subroutine. Conclusions: Palgis “at least as easy as”Poracle (Modulo polynomial terms.) Poracleis “at least as hard as”Palg (Modulo polynomial terms.) Notation: Palg≤compPoracle

  11. Reductions for Undecidability Halting Problem = {<M,I> | M halts on I} is undecidable Will prove: • {<M,I> | M prints “Hi” at some point in computation on I} • {<M> | M halts empty string} • {<M> | M halts on every input} • {<M> | M halts on some input} • {<M> | L(M) is regular} • {<M,M'> | I M(I)=M'(I)} • There is a fixed TM M* {<I> | M* halts on I} • {<M> | based on what M does, not on how it does it} ≥comp {<M,I> | M halts on I} Hence, all are undecidable! • {<M,I> | M prints “Hi” at some point in computation on I} comp {<M,I> | M halts on I} Hence, equivalent. • {<M,I> | M halts on I} comp {<M,I> | M does not halt on I} ?

  12. M(I) halts Yes, prints “Hi” BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M,I> | M prints “Hi” on I at some point in computation } {<M,I> | M halts on I} ≤ <M,I> <M',I> M'(I) = { M is built in Run M(I), Print(“Hi”) } suppressing any output {<M,I> | M prints “Hi” on I} {<M,I> | M halts on I}

  13. M(I) does not halt No “Hi” BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M,I> | M prints “Hi” on I at some point in computation } {<M,I> | M halts on I} ≤ <M,I> <M',I> M'(I) = { M is built in Run M(I), Print(“Hi”) } suppressing any output {<M,I> | M prints “Hi” on I} {<M,I> | M halts on I}

  14. M(I) halts or not Yes or No BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | M halts empty string} {<M,I> | M halts on I} ≤ <M,I> <M'I> M'I(I’) = { Ignore input I' M & I are built in Run M(I) } {<M> | M halts empty string} {<M,I> | M halts on I}

  15. M(I) halts or not Yes or No BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | M halts on every input} {<M,I> | M halts on I} ≤ <M,I> <MI> MI(I') = { Ignore input I' M & I are built in Run M(I) } {<M> | M halts on every input} {<M,I> | M halts on I}

  16. M(I) halts or not Yes or No BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | M halts on some input} {<M,I> | M halts on I} ≤ <M,I> <MI> MI(I') = { Ignore input I' M & I are built in Run M(I) } {<M> | M halts on some input} {<M,I> | M halts on I}

  17. Reductions for Undecidability Wait until we do Rice’s Theorem Wait until we do Rice’s Theorem

  18. M(I) halts or not Yes or No BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | L(M) is regular} {<M,I> | M halts on I} ≤ <M,I> <MI> MI(I') = { Ignore input I' M & I are built in Run M(I) suppressing any output } Halt and accept } {<M> | L(M) is regular} {<M,I> | M halts on I} But now we care about what M(I) outputs when it halts.

  19. M(I) halts L(MI) = {everything} Yes , L(MI) is regular BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | L(M) is regular} {<M,I> | M halts on I} ≤ <M,I> <MI> MI(I') = { Ignore input I' M & I are built in Run M(I) suppressing any output Halt and accept } {<M> | L(M) is regular} {<M,I> | M halts on I}

  20. M(I) does not halt L(MI) = {nothing} Yes, L(MI) is regular BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | L(M) is regular} {<M,I> | M halts on I} ≤ <M,I> <MI> MI(I') = { Ignore input I' M & I are built in Run M(I) Halt and accept } suppressing any output {<M> | L(M) is regular} {<M,I> | M halts on I}

  21. M(I) does not halt L(MI) = No, L(MI) is not regular BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | L(M) is regular} {<M,I> | M halts on I} ≤ <MI> MI(I') = { If I’ has the form 0n1n halt and accept else run M(I) halt and accept } <M,I> suppressing any output 0n1n {<M> | L(M) is regular} {<M,I> | M halts on I} MI accepts 0n1n, but “computes” no language

  22. M(I) halts L(MI) = Yes, L(MI) is regular BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M> | L(M) is regular} {<M,I> | M halts on I} ≤ <MI> <MI> MI(I') = { If I’ has the form 0n1n halt and accept else run M(I) halt and accept } <M,I> suppressing any output {everything} {<M> | L(M) is regular} {<M,I> | M halts on I}

  23. M(I) halts or not Same or different BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M,M'> | I M(I)=M'(I)} {<M,I> | M halts on I} ≤ <M,I> <MI,M'> MI(I') = M' = ? { Ignore input I' M & I are built in Run M(I) Halt and accept } suppressing any output {<M,M'> | I M(I)=M'(I)} {<M,I> | M halts on I}

  24. Reductions for Undecidability {<M,M'> | I M(I)=M'(I)} {<M,I> | M halts on I} ≤ <MI,M'> MI(I') = M' = ? { Ignore input I' M & I are built in Run M(I) Halt and accept } M'(I') halts and accepts suppressing any output If M halts on I MI halts on and accepts every input MI and M' have the same results on every input Oracle says yes We say yes

  25. Reductions for Undecidability {<M,M'> | I M(I)=M'(I)} {<M,I> | M halts on I} ≤ <MI,M'> MI(I') = M' = ? { Ignore input I' M & I are built in Run M(I) Halt and accept } M'(I') halts and accepts suppressing any output If M does not halt on I MI does not halt on every input MI and M' have different results on some input Oracle says no We say no

  26. M(I) halts or not Yes or No BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M,M'> | I M(I)=M'(I)} {<M,I> | M halts on I} ≤ <M,I> <MI,M'> M'(I') halts and accepts MI(I') = M' = ? { Ignore input I' M & I are built in Run M(I) Halt and accept } suppressing any output {<M,M'> | I M(I) = M'(I)} {<M,I> | M halts on I}

  27. M(I) halts or not Yes or No BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<I> | M* halts on I} where M* is a special TM {<M,I> | M halts on I} ≤ <M,I> <I'> Need to tell oracle about M and I I' = <M,I> M* is the universal TMsimulates M on I. {<I> | M* halts on I} {<M,I> | M halts on I}

  28. P is undecidable. Reductions for Undecidability {<M,I> | M halts on I} ≤ P = {<M> | based on what M does, not on how it does it} Rice’s Theorem If L(M) =L(M'), then MϵP iff MϵP' P ≠ {everything} P ≠ {nothing} Let Mempty = just say no. L(Mempty) = {nothing} Assume Mempty P, (Else switch to P) Assume Myesϵ P Eg P = {<M> | L(M) is regular}

  29. M(I) halts Yes BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M,I> | M halts on I} ≤ P = {<M> | based on what M does, not on how it does it} <M,I> <M'> M'(I') = { Run M(I) Run Myes(I') respond as Myes(I') does } L(M') = L(Myes) Myesϵ P  M'ϵ P P {<M,I> | M halts on I}

  30. M(I) does not halt No BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M,I> | M halts on I} ≤ P = {<M> | based on what M does, not on how it does it} <M,I> <M'> M'(I') = { Run M(I) Run Myes(I') respond as Myes(I') does } L(M') = {nothing} = L(Mempty) Memptyϵ P  M'ϵ P P {<M,I> | M halts on I}

  31. M(I) prints “Hi” on I Yes halts BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability Other direction {<M,I> | M prints “Hi” on I at some point in computation } ≤ {<M,I> | M halts on I} <M,I> <M',I> M'(I) = { Run M(I) if “Hi” is printed halt Loop forever } {<M,I> | M halts on I} {<M,I> | M prints “Hi” on I}

  32. M(I) does not print “Hi” No, does not halt BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability {<M,I> | M prints “Hi” on I at some point in computation } ≤ {<M,I> | M halts on I} <M,I> <M',I> M'(I) = { Run M(I) if “Hi” is printed halt Loop forever } {<M,I> | M halts on I} {<M,I> | M prints “Hi” on I}

  33. Reductions for Acceptability Halting Problem = {<M,I> | M halts on I} is undecidable Will prove: • {<M,I> | M prints “Hi” at some point in computation on I} • {<M> | M halts empty string} • {<M> | M halts on every input} • {<M> | M halts on some input} • {<M> | L(M) is regular} • {<M,M'> | I M(I)=M'(I)} • There is a fixed TM M* {<I> | M* halts on I} • {<M> | based on what M does, not on how it does it} ≥comp {<M,I> | M halts on I} Hence, all are undecidable! • {<M,I> | M prints “Hi” at some point in computation on I} comp {<M,I> | M halts on I} Hence, equivalent. • {<M,I> | M halts on I} comp {<M,I> | M does not halt on I} ?

  34. No: Does not halt Yes: Does not halt. BUILD:Oracle for GIVEN:Oracle for Reductions for Acceptability {<M,I> | M halts on I} ≤ {<M,I> | M does not halt on I} <M,I> <M,I> {<M,I> | M does not halt on I} {<M,I> | M halts on I}

  35. Yes: Does halt No: Does halt. BUILD:Oracle for GIVEN:Oracle for Reductions for Acceptability {<M,I> | M halts on I} ≤ {<M,I> | M does not halt on I} <M,I> <M,I> {<M,I> | M halts on I} {<M,I> | M prints “Hi” on I} Wait! Is this allowed?

  36. Reductions for Acceptability Palg ≤compPoracle • Karp Reduction: • Yes  Yes & No  No • Cook Reduction: • Design any algorithm • for Palg using a supposed algorithm for Poracleas a subroutine. Wait! Is this allowed?

  37. Reductions for Acceptability Acceptable Co-Acceptable • Yes instance  Run forever or answer “yes” • No instance  Halt and answer “no” • Yes instance  Halt and answer “yes” • No instance  Run forever or answer “no” Computable • Yes instance  Halt and answer “yes” • No instance  Halt and answer “no” Halting Halting

  38. Reductions for Acceptability Palg ≤compPoracle • Karp Reduction: • Yes  Yes & No  No • Cook Reduction: • Design any algorithm • for Palg using a supposed algorithm for Poracleas a subroutine. We will only consider reductions of this simple form. Because they preserve acceptable/co-acceptable

  39. Reductions for Acceptability Acceptable Co-Acceptable • Yes instance  Run forever or answer “yes” • No instance  Halt and answer “no” • Yes instance  Halt and answer “yes” • No instance  Run forever or answer “no” Halting Halting Halting • {<M,I> | M prints “Hi” on I} • {<M> | M halts empty string} • {<M> | M halts on every input} • {<M> | M halts on some input} •  TM M* {<I> | M* halts on I}

  40. Reductions for Acceptability Acceptable Co-Acceptable • Yes instance  Run forever or answer “yes” • No instance  Halt and answer “no” • Yes instance  Halt and answer “yes” • No instance  Run forever or answer “no” Halting Halting Halting ≤ {<M,M'> | I M(I)=M'(I)} Halting ≤

  41. Acceptability Complete Acceptable • Yes instance  Halt and answer “yes” • No instance  Run forever or answer “no” Halting Defn: Problem Pcomplete is Acceptability Complete iff • PcompleteAcceptability • P Acceptability, P ≤compPcomplete I.e.Pcompleteis one of the hardest problems in Acceptability. If we had an algorithm forPcomplete, then we would have one for every problem in Acceptability. Claim: Halting is Acceptability Complete. Pcomplete

  42. Acceptability Complete Acceptable • Yes instance  Halt and answer “yes” • No instance  Run forever or answer “no” Halting Claim: Halting is Acceptability Complete. • HaltingAcceptability • P Acceptability, There is a TM MP such that We must now prove P ≤compHalting

  43. I  P Halts BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability ≤ {<M,I> | M halts on I} P <MI> I MI(I’) = { Run MP(I) If halt and accept halt and accept else run forever } {<M,I> | M halts on I} P

  44. I  P Runs forever BUILD:Oracle for GIVEN:Oracle for Reductions for Undecidability ≤ {<M,I> | M halts on I} P <MI> I MI(I’) = { Run MP(I) If halt and accept halt and accept else run forever } {<M,I> | M halts on I} P

  45. Acceptability Complete Acceptable Halting Claim: Halting is Acceptability Complete. • HaltingAcceptability • P Acceptability, There is a TM MP such that • Yes instance  Halt and answer “yes” • No instance  Run forever or answer “no” We proved P ≤compPcomplete

  46. Acceptability Complete Acceptable Halting Claim: They all are Acceptability Complete. • They Acceptability • P Acceptability, • {<M,I> | M prints “Hi” on I} • {<M> | M halts empty string} • {<M> | M halts on every input} • {<M> | M halts on some input} •  TM M* {<I> | M* halts on I} We proved P ≤compHalting≤comp These problems

  47. Acceptability Complete Acceptable Halting Claim: This is Acceptability Hard,but not Complete. • This Acceptability • P Acceptability, We proved P ≤compHalting≤comp This problem {<M,M'> | I M(I)=M'(I)}

  48. Reductions for Undecidability Now that we have established that the Halting Problem and its friends are undecidable, we can use it for a jumping off point for more “natural” undecidability results.

  49. The Post Correspondence Problem • The input is a finite collection of dominoes P = , , , • A solution is a finite sequence of the dominoes (with repeats) abc c abc c a ab a ab a ab ca a ca a b ca b ca • So that the combined string on the top is the same as that on the bottom a b c a a a b c a b c a a a b c • PCP = {<P> | P is a collection of dominoes with a solution} • PCP is undecidable

  50. The Post Correspondence Problem Yes M(I) halts BUILD:Oracle for GIVEN:Oracle for {<P> | Dominos P has a solution} {<M,I> | M halts on I} ≤ <M,I> <P> Dominos in P mimic the rules of the TM M on input I Yes, there is a solution {<P> | Dominos P has a solution} {<M,I> | M halts on I}

More Related