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

Slides:



Advertisements
Similar presentations
Fall 2006Costas Busch - RPI1 Time Complexity. Fall 2006Costas Busch - RPI2 Consider a deterministic Turing Machine which decides a language.
Advertisements

Fall 2006Costas Busch - RPI1 A Universal Turing Machine.
Fall 2006Costas Busch - RPI1 Turing Machines. Fall 2006Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Linear Bounded Automata LBAs
Fall 2003Costas Busch - RPI1 Properties of Context-Free languages.
Fall 2006Costas Buch - RPI1 Simplifications of Context-Free Grammars.
Context-Free Languages
Fall 2006Costas Busch - RPI1 Decidable Languages.
Variants of Turing machines
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
Recursively Enumerable and Recursive Languages
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2006Costas Busch - RPI1 The Post Correspondence Problem.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Linear Bounded Automata LBAs
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
Recursively Enumerable and Recursive Languages
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
NP-complete Languages
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
Costas Busch - LSU1 The Post Correspondence Problem.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Recursively Enumerable and Recursive Languages
Busch Complexity Lectures: Turing Machines
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
Decidable Languages Costas Busch - LSU.
The Post Correspondence Problem
Elementary Questions about Regular Languages
Turing acceptable languages and Enumerators
Undecidable problems:
Computability and Complexity
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