fall 2006costas busch - rpi1 reductions. fall 2006costas busch - rpi2 problem is reduced to problem...

Download Fall 2006Costas Busch - RPI1 Reductions. Fall 2006Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem

Post on 01-Apr-2015

213 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Slide 1

Fall 2006Costas Busch - RPI1 Reductions Slide 2 Fall 2006Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem Slide 3 Fall 2006Costas Busch - RPI3 Language is reduced to language There is a computable function (reduction) such that: Definition: Slide 4 Fall 2006Costas Busch - RPI4 Computable function : which for any string computes There is a deterministic Turing machine Recall: Slide 5 Fall 2006Costas Busch - RPI5 If: a: Language is reduced to b: Language is decidable Then: is decidable Theorem: Proof: Basic idea: Build the decider for using the decider for Slide 6 Fall 2006Costas Busch - RPI6 Decider for Decider for compute accept reject accept reject (halt) Input string END OF PROOF Reduction YES NO Slide 7 Fall 2006Costas Busch - RPI7 Example: is reduced to: Slide 8 Fall 2006Costas Busch - RPI8 Turing Machine for reduction DFA We only need to construct: Slide 9 Fall 2006Costas Busch - RPI9 Let be the language of DFA construct DFA by combining and so that: DFA Turing Machine for reduction Slide 10 Fall 2006Costas Busch - RPI10 Slide 11 Fall 2006Costas Busch - RPI11 Decider Decider for compute Input string YES NO Reduction Slide 12 Fall 2006Costas Busch - RPI12 If: a: Language is reduced to b: Language is undecidable Then: is undecidable Theorem (version 1): (this is the negation of the previous theorem) Proof: Using the decider for build the decider for Suppose is decidable Contradiction! Slide 13 Fall 2006Costas Busch - RPI13 Decider for Decider for compute accept reject accept reject (halt) Input string Reduction END OF PROOF If is decidable then we can build: CONTRADICTION! YES NO Slide 14 Fall 2006Costas Busch - RPI14 Observation: In order to prove that some language is undecidable we only need to reduce a known undecidable language to Slide 15 Fall 2006Costas Busch - RPI15 State-entry problem Input: Turing Machine State Question:Does String enter state while processing input string ? Corresponding language: Slide 16 Fall 2006Costas Busch - RPI16 Theorem: (state-entry problem is unsolvable) Proof: Reduce (halting problem) to (state-entry problem) is undecidable Slide 17 Fall 2006Costas Busch - RPI17 Decider for YES NO state-entry problem decider DeciderCompute Reduction YES NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable Halting Problem Decider Slide 18 Fall 2006Costas Busch - RPI18 Compute Reduction We only need to build the reduction: So that: Slide 19 Fall 2006Costas Busch - RPI19 halting states special halt state Construct from : A transition for every unused tape symbol of Slide 20 Fall 2006Costas Busch - RPI20 halts on statehalts halting states special halt state Slide 21 Fall 2006Costas Busch - RPI21 halts on state on input halts on inputTherefore: Equivalently: END OF PROOF Slide 22 Fall 2006Costas Busch - RPI22 Blank-tape halting problem Input:Turing Machine Question:Doeshalt when started with a blank tape? Corresponding language: Slide 23 Fall 2006Costas Busch - RPI23 Theorem: (blank-tape halting problem is unsolvable) Proof: Reduce (halting problem) to (blank-tape problem) is undecidable Slide 24 Fall 2006Costas Busch - RPI24 Decider for YES NO blank-tape problem decider DeciderCompute Reduction YES NO Given the reduction, If is decidable, then is decidable A contradiction! since is undecidable Halting Problem Decider Slide 25 Fall 2006Costas Busch - RPI25 Compute Reduction We only need to build the reduction: So that: Slide 26 Fall 2006Costas Busch - RPI26 no yes Write on tape Tape is blank? Run with input Construct from : If halts then halt Slide 27 Fall 2006Costas Busch - RPI27 halts when started on blank tape halts on input no yes Write on tape Tape is blank? Run with input Slide 28 Fall 2006Costas Busch - RPI28 END OF PROOF halts when started on blank tape halts on input Equivalently: Slide 29 Fall 2006Costas Busch - RPI29 If: a: Language is reduced to b: Language is undecidable Then: is undecidable Theorem (version 2): Proof: Using the decider for build the decider for Suppose is decidable Contradiction! Then is decidable Slide 30 Fall 2006Costas Busch - RPI30 Suppose is decidable Decider for accept reject (halt) Slide 31 Fall 2006Costas Busch - RPI31 Suppose is decidable Decider for accept reject (halt) Then is decidable (we have proven this in previous class) reject accept (halt) Decider for NO YES NO Slide 32 Fall 2006Costas Busch - RPI32 Decider for Decider for compute accept reject accept reject (halt) Input string Reduction If is decidable then we can build: CONTRADICTION! YES NO Slide 33 Fall 2006Costas Busch - RPI33 Decider for Decider for compute accept reject accept reject (halt) Input string Reduction END OF PROOF CONTRADICTION! Alternatively: NO YES NO Slide 34 Fall 2006Costas Busch - RPI34 Observation: In order to prove that some language is undecidable we only need to reduce some known undecidable language to or to (theorem version 1) (theorem version 2) Slide 35 Fall 2006Costas Busch - RPI35 Undecidable Problems for Turing Recognizable languages is empty? is regular? has size 2? Let be a Turing-acceptable language All these are undecidable problems Slide 36 Fall 2006Costas Busch - RPI36 is empty? is regular? has size 2? Let be a Turing-acceptable language Slide 37 Fall 2006Costas Busch - RPI37 Empty language problem Input: Turing Machine Question:Isempty? Corresponding language: Slide 38 Fall 2006Costas Busch - RPI38 Theorem: (empty-language problem is unsolvable) is undecidable Proof: Reduce (membership problem) to (empty language problem) Slide 39 Fall 2006Costas Busch - RPI39 Decider for YES NO empty problem decider DeciderCompute Reduction YES NO Given the reduction, if is decidable, then is decidable membership problem decider A contradiction! since is undecidable Slide 40 Fall 2006Costas Busch - RPI40 Compute Reduction We only need to build the reduction: So that: Slide 41 Fall 2006Costas Busch - RPI41 skip input string write on tape run on input yes then accept If Tape of input string accepts ? Construct from : Slide 42 Fall 2006Costas Busch - RPI42 skip input string write on tape run on input yes then accept If accepts ? Tape of Slide 43 Fall 2006Costas Busch - RPI43 skip input string write on tape run on input yes then accept If accepts ? Tape of Slide 44 Fall 2006Costas Busch - RPI44 skip input string write on tape run on input yes then accept If accepts ? During this phase this area is not touched working area of Slide 45 Fall 2006Costas Busch - RPI45 skip input string write on tape run on input yes then accept If accepts ? altered Simply check if entered an accept state Slide 46 Fall 2006Costas Busch - RPI46 skip input string write on tape run on input yes then accept If accepts ? Now check input string Slide 47 Fall 2006Costas Busch - RPI47 skip input string write on tape run on input yes then accept If accepts ? The only possible accepted string t r o y Slide 48 Fall 2006Costas Busch - RPI48 skip input string write on tape run on input yes then accept If accepts ? accepts does not accept Slide 49 Fall 2006Costas Busch - RPI49 Therefore: accepts Equivalently: END OF PROOF Slide 50 Fall 2006Costas Busch - RPI50 is empty? is regular? has size 2? Let be a Turing-acceptable language Slide 51 Fall 2006Costas Busch - RPI51 Regular language problem Input: Turing Machine Question:Isa regular language? Corresponding language: Slide 52 Fall 2006Costas Busch - RPI52 Theorem: (regular language problem is unsolvable) is undecidable Proof: Reduce (membership problem) to (regular language problem) Slide 53 Fall 2006Costas Busch - RPI53 Decider for YES NO regular problem decider DeciderCompute Reduction YES NO Given the reduction, If is decidable, then is decidable membership problem decider A contradiction! since is undecidable Slide 54 Fall 2006Costas Busch - RPI54 Compute Reduction We only need to build the reduction: So that: Slide 55 Fall 2006Costas Busch - RPI55 skip input string write on tape run on input yes then accept If has the form Tape of input string accepts ? Construct from : Slide 56 Fall 2006Costas Busch - RPI56 skip input string write on tape run on input yes accepts ? accepts does not accept then accept If has the form not regular regular Slide 57 Fall 2006Costas Busch - RPI57 Therefore: accepts Equivalently: END OF PROOF is not regular Slide 58 Fall 2006Costas Busch - RPI58 is empty? is regular? has size 2? Let be a Turing-acceptable language Slide 59 Fall 2006Costas Busch - RPI59 Does have size 2? Size2 language problem Input: Turing Machine Question: Corresponding language: (accepts exactly two strings?) Slide 60 Fall 2006Costas Busch - RPI60 Theorem: (regular language problem is unsolvable) is undecidable Proof: Reduce (membership problem) to (size 2 language problem) Slide 61 Fall 2006Costas Busch - RPI61 Decider for YES NO size2 problem decider DeciderCompute Reduction YES NO Given the reduction, If is decidable, then is decidable membership problem decider A contradiction! since is undecidable Slide 62 Fall 2006Costas Busch - RPI62 Compute Reduction We only need to build the reduction: So that: Slide 63 Fall 2006Costas Busch - RPI63 skip input string write on tape run on input yes then accept If Tape of input string accepts ? Construct from : Slide 64 Fall 2006Costas Busch - RPI64 skip input string write on tape run on input yes accepts ? accepts does not accept 2 strings 0 strings then accept If Slide 65 Fall 2006Costas Busch - RPI65 Therefore: accepts Equivalently: END OF PROOF has size 2 Slide 66 Fall 2006Costas Busch - RPI66 RICEs Theorem is empty? is regular? has size 2? Undecidable problems: This can be generalized to all non-trivial properties of Turing-acceptable languages Slide 67 Fall 2006Costas Busch - RPI67 Non-trivial property: A property possessed by some Turing-acceptable languages but not all : is empty? Example: YES NO Slide 68 Fall 2006Costa