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

Presentation on theme: "Fall 2006Costas Busch - RPI1 Reductions. Fall 2006Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem."— Presentation transcript:

Fall 2006Costas Busch - RPI1 Reductions

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

Fall 2006Costas Busch - RPI3 Language is reduced to language There is a computable function (reduction) such that: Definition:

Fall 2006Costas Busch - RPI4 Computable function : which for any string computes There is a deterministic Turing machine Recall:

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

Fall 2006Costas Busch - RPI6 Decider for Decider for compute accept reject accept reject (halt) Input string END OF PROOF Reduction YES NO

Fall 2006Costas Busch - RPI7 Example: is reduced to:

Fall 2006Costas Busch - RPI8 Turing Machine for reduction DFA We only need to construct:

Fall 2006Costas Busch - RPI9 Let be the language of DFA construct DFA by combining and so that: DFA Turing Machine for reduction

Fall 2006Costas Busch - RPI10

Fall 2006Costas Busch - RPI11 Decider Decider for compute Input string YES NO Reduction

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!

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

Fall 2006Costas Busch - RPI14 Observation: In order to prove that some language is undecidable we only need to reduce a known undecidable language to

Fall 2006Costas Busch - RPI15 State-entry problem Input: Turing Machine State Question:Does String enter state while processing input string ? Corresponding language:

Fall 2006Costas Busch - RPI16 Theorem: (state-entry problem is unsolvable) Proof: Reduce (halting problem) to (state-entry problem) is undecidable

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

Fall 2006Costas Busch - RPI18 Compute Reduction We only need to build the reduction: So that:

Fall 2006Costas Busch - RPI19 halting states special halt state Construct from : A transition for every unused tape symbol of

Fall 2006Costas Busch - RPI20 halts on statehalts halting states special halt state

Fall 2006Costas Busch - RPI21 halts on state on input halts on inputTherefore: Equivalently: END OF PROOF

Fall 2006Costas Busch - RPI22 Blank-tape halting problem Input:Turing Machine Question:Doeshalt when started with a blank tape? Corresponding language:

Fall 2006Costas Busch - RPI23 Theorem: (blank-tape halting problem is unsolvable) Proof: Reduce (halting problem) to (blank-tape problem) is undecidable

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

Fall 2006Costas Busch - RPI25 Compute Reduction We only need to build the reduction: So that:

Fall 2006Costas Busch - RPI26 no yes Write on tape Tape is blank? Run with input Construct from : If halts then halt

Fall 2006Costas Busch - RPI27 halts when started on blank tape halts on input no yes Write on tape Tape is blank? Run with input

Fall 2006Costas Busch - RPI28 END OF PROOF halts when started on blank tape halts on input Equivalently:

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

Fall 2006Costas Busch - RPI30 Suppose is decidable Decider for accept reject (halt)

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

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

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

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)

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

Fall 2006Costas Busch - RPI36 is empty? is regular? has size 2? Let be a Turing-acceptable language

Fall 2006Costas Busch - RPI37 Empty language problem Input: Turing Machine Question:Isempty? Corresponding language:

Fall 2006Costas Busch - RPI38 Theorem: (empty-language problem is unsolvable) is undecidable Proof: Reduce (membership problem) to (empty language problem)

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

Fall 2006Costas Busch - RPI40 Compute Reduction We only need to build the reduction: So that:

Fall 2006Costas Busch - RPI41 skip input string write on tape run on input yes then accept If Tape of input string accepts ? Construct from :

Fall 2006Costas Busch - RPI42 skip input string write on tape run on input yes then accept If accepts ? Tape of

Fall 2006Costas Busch - RPI43 skip input string write on tape run on input yes then accept If accepts ? Tape of

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

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

Fall 2006Costas Busch - RPI46 skip input string write on tape run on input yes then accept If accepts ? Now check input string

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

Fall 2006Costas Busch - RPI48 skip input string write on tape run on input yes then accept If accepts ? accepts does not accept

Fall 2006Costas Busch - RPI49 Therefore: accepts Equivalently: END OF PROOF

Fall 2006Costas Busch - RPI50 is empty? is regular? has size 2? Let be a Turing-acceptable language

Fall 2006Costas Busch - RPI51 Regular language problem Input: Turing Machine Question:Isa regular language? Corresponding language:

Fall 2006Costas Busch - RPI52 Theorem: (regular language problem is unsolvable) is undecidable Proof: Reduce (membership problem) to (regular language problem)

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

Fall 2006Costas Busch - RPI54 Compute Reduction We only need to build the reduction: So that:

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 :

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

Fall 2006Costas Busch - RPI57 Therefore: accepts Equivalently: END OF PROOF is not regular

Fall 2006Costas Busch - RPI58 is empty? is regular? has size 2? Let be a Turing-acceptable language

Fall 2006Costas Busch - RPI59 Does have size 2? Size2 language problem Input: Turing Machine Question: Corresponding language: (accepts exactly two strings?)

Fall 2006Costas Busch - RPI60 Theorem: (regular language problem is unsolvable) is undecidable Proof: Reduce (membership problem) to (size 2 language problem)

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

Fall 2006Costas Busch - RPI62 Compute Reduction We only need to build the reduction: So that:

Fall 2006Costas Busch - RPI63 skip input string write on tape run on input yes then accept If Tape of input string accepts ? Construct from :

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

Fall 2006Costas Busch - RPI65 Therefore: accepts Equivalently: END OF PROOF has size 2

Fall 2006Costas Busch - RPI66 RICE’s Theorem is empty? is regular? has size 2? Undecidable problems: This can be generalized to all non-trivial properties of Turing-acceptable languages

Fall 2006Costas Busch - RPI67 Non-trivial property: A property possessed by some Turing-acceptable languages but not all : is empty? Example: YES NO

Fall 2006Costas Busch - RPI68 : is regular? More examples of non-trivial properties: YES NO YES : has size 2? NO YES NO

Fall 2006Costas Busch - RPI69 Trivial property: A property possessed by ALL Turing-acceptable languages : has size at least 0?Examples: True for all languages : is accepted by some Turing machine? True for all Turing-acceptable languages

Fall 2006Costas Busch - RPI70 We can describe a property as the set of languages that possess the property : is empty? Example: YES NO If language has property then

Fall 2006Costas Busch - RPI71 : has size 1? NO YES Example:Suppose alphabet is NO

Fall 2006Costas Busch - RPI72 Non-trivial property problem Does have the non-trivial property ? Input: Turing Machine Question: Corresponding language:

Fall 2006Costas Busch - RPI73 Rice’s Theorem: is undecidable (the non-trivial property problem is unsolvable) Proof: Reduce (membership problem) to or

Fall 2006Costas Busch - RPI74 We examine two cases: Case 1: Case 2: Examples: : is empty? : is regular? : has size 2? Example:

Fall 2006Costas Busch - RPI75 Let be the Turing machine that accepts Case 1: Since is non-trivial, there is a Turing-acceptable language such that:

Fall 2006Costas Busch - RPI76 Reduce (membership problem) to

Fall 2006Costas Busch - RPI77 Decider for YES NO Non-trivial property problem decider DeciderCompute Reduction YES NO Given the reduction, if is decidable, then is decidable membership problem decider A contradiction! since is undecidable

Fall 2006Costas Busch - RPI78 Compute Reduction We only need to build the reduction: So that:

Fall 2006Costas Busch - RPI79 skip input string write on tape run on input yes then accept If Tape of input string accepts ? Construct from :

Fall 2006Costas Busch - RPI80 skip input string write on tape run on input yes then accept If accepts ? For this phase we can run machine that accepts, with input string

Fall 2006Costas Busch - RPI81 skip input string write on tape run on input yes accepts ? accepts does not accept then accept If

Fall 2006Costas Busch - RPI82 Therefore: accepts Equivalently:

Fall 2006Costas Busch - RPI83 Let be the Turing machine that accepts Case 2: Since is non-trivial, there is a Turing-acceptable language such that:

Fall 2006Costas Busch - RPI84 Reduce (membership problem) to

Fall 2006Costas Busch - RPI85 Decider for YES NO Non-trivial property problem decider DeciderCompute Reduction YES NO Given the reduction, if is decidable, then is decidable membership problem decider A contradiction! since is undecidable

Fall 2006Costas Busch - RPI86 Compute Reduction We only need to build the reduction: So that:

Fall 2006Costas Busch - RPI87 skip input string write on tape run on input yes then accept If Tape of input string accepts ? Construct from :

Fall 2006Costas Busch - RPI88 skip input string write on tape run on input yes accepts ? accepts does not accept then accept If

Fall 2006Costas Busch - RPI89 Therefore: accepts Equivalently: END OF PROOF

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

Similar presentations