Reductions.

Slides:



Advertisements
Similar presentations
Formal Models of Computation Part III Computability & Complexity
Advertisements

Fall 2006Costas Busch - RPI1 Reductions. Fall 2006Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
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.
Reducibility Sipser 5.1 (pages ).
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
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 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 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.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
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.
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.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
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.
The Acceptance Problem for TMs
Deterministic Finite Automata And Regular Languages.
Context-Free Languages
Models of Computation.
More NP-complete Problems
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
PDAs Accept Context-Free Languages
LIMITS OF ALGORITHMIC COMPUTATION
CSE 105 theory of computation
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Jaya Krishna, M.Tech, Assistant Professor
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Non Deterministic Automata
Decidability and Undecidability
Turing acceptable languages and Enumerators
Undecidable problems:
Computability and Complexity
Theory of Computability
CSE 105 theory of computation
Instructor: Aaron Roth
Decidability continued….
Instructor: Aaron Roth
Automata, Grammars and Languages
More Undecidable Problems
CSE 105 theory of computation
Presentation transcript:

Reductions

Problem is reduced to problem If we can solve problem then we can solve problem

Definition: Language is reduced to language There is a computable function (reduction) such that:

Recall: Computable function : There is a deterministic Turing machine which for any string computes

Theorem: If: a: Language is reduced to b: Language is decidable Then: is decidable Proof: Basic idea: Build the decider for using the decider for

Decider for Reduction compute Decider for END OF PROOF Input string YES Input string YES accept accept compute Decider for (halt) (halt) NO NO reject reject (halt) (halt) END OF PROOF

Example: is reduced to:

We only need to construct: Turing Machine for reduction DFA

Let be the language of DFA Turing Machine for reduction DFA construct DFA by combining and so that:

Decider for Reduction Input string YES compute YES Decider NO NO

If: a: Language is reduced to b: Language is undecidable Theorem (version 1): If: a: Language is reduced to b: Language is undecidable Then: is undecidable (this is the negation of the previous theorem) Proof: Suppose is decidable Using the decider for build the decider for Contradiction!

If is decidable then we can build: Decider for Reduction YES Input string YES accept accept compute Decider for (halt) (halt) NO NO reject reject (halt) (halt) CONTRADICTION! END OF PROOF

Observation: In order to prove that some language is undecidable we only need to reduce a known undecidable language to

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

Theorem: is undecidable (state-entry problem is unsolvable) Proof: Reduce (halting problem) to (state-entry problem)

Decider for Reduction Compute Decider Given the reduction, Halting Problem Decider Decider for state-entry problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

We only need to build the reduction: Compute So that:

Construct from : special halt state halting states A transition for every unused tape symbol of

special halt state halting states halts halts on state

Therefore: halts on input halts on state on input Equivalently: END OF PROOF

Blank-tape halting problem Input: Turing Machine Question: Does halt when started with a blank tape? Corresponding language:

Theorem: is undecidable Proof: Reduce (halting problem) to (blank-tape halting problem is unsolvable) Proof: Reduce (halting problem) to (blank-tape problem)

Decider for Reduction Compute Decider Given the reduction, Halting Problem Decider Decider for blank-tape problem decider Reduction YES YES Compute Decider NO NO Given the reduction, If is decidable, then is decidable A contradiction! since is undecidable

We only need to build the reduction: Compute So that:

Construct from : no yes Run with input If halts then halt Tape is blank? yes Run Write on tape with input If halts then halt

halts when started on blank tape no Tape is blank? yes Run Write on tape with input halts on input halts when started on blank tape

halts when started on blank tape halts on input halts when started on blank tape Equivalently: END OF PROOF

Theorem (version 2): If: a: Language is reduced to b: Language is undecidable Then: is undecidable Proof: Suppose is decidable Then is decidable Using the decider for build the decider for Contradiction!

Suppose is decidable reject Decider for (halt) accept (halt)

Suppose is decidable Then is decidable Decider for Decider for (we have proven this in previous class) Decider for NO YES reject accept Decider for (halt) (halt) YES NO accept reject (halt) (halt)

If is decidable then we can build: Decider for Reduction YES Input string YES accept accept compute Decider for (halt) (halt) NO NO reject reject (halt) (halt) CONTRADICTION!

Alternatively: Decider for Reduction compute Decider for NO Input string YES reject accept compute Decider for (halt) (halt) YES NO accept reject (halt) (halt) CONTRADICTION! END OF PROOF

that some language is undecidable we only need to reduce some 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)

Undecidable Problems for Turing Recognizable languages Let be a Turing-acceptable language is empty? is regular? has size 2? All these are undecidable problems

Let be a Turing-acceptable language is empty? is regular? has size 2?

Empty language problem Input: Turing Machine Question: Is empty? Corresponding language:

(empty language problem) Theorem: is undecidable (empty-language problem is unsolvable) Proof: Reduce (membership problem) to (empty language problem)

Decider for Reduction Compute Decider Given the reduction, membership problem decider Decider for empty problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

We only need to build the reduction: Compute So that:

Construct from : Tape of input string yes write skip input run on tape on input yes If accepts ? then accept

Tape of yes write skip input run on tape string on input If accepts ? then accept

Tape of yes write skip input run on tape string on input If accepts ? then accept

During this phase this area is not touched working area of skip input string write on tape run on input yes If accepts ? then accept

Simply check if entered an accept state altered skip input string write on tape run on input yes If accepts ? then accept

Now check input string yes write skip input run on tape string on input yes If accepts ? then accept

The only possible accepted string t r o y skip input string write on tape run on input yes If accepts ? then accept

yes accepts does not accept write skip input run on tape string on input yes If accepts ? then accept

Therefore: accepts Equivalently: END OF PROOF

Let be a Turing-acceptable language is empty? is regular? has size 2?

Regular language problem Input: Turing Machine Question: Is a regular language? Corresponding language:

(regular language problem) Theorem: is undecidable (regular language problem is unsolvable) Proof: Reduce (membership problem) to (regular language problem)

Decider for Reduction Compute Decider Given the reduction, membership problem decider Decider for regular problem decider Reduction YES YES Compute Decider NO NO Given the reduction, If is decidable, then is decidable A contradiction! since is undecidable

We only need to build the reduction: Compute So that:

Construct from : Tape of input string yes write skip input run on tape on input yes If has the form accepts ? then accept

yes not regular accepts does not accept regular write skip input run string write on tape run on input yes If has the form accepts ? then accept

Therefore: accepts is not regular Equivalently: END OF PROOF

Let be a Turing-acceptable language is empty? is regular? has size 2?

Corresponding language: Size2 language problem Input: Turing Machine Question: Does have size 2? (accepts exactly two strings?) Corresponding language:

(size 2 language problem) Theorem: is undecidable (regular language problem is unsolvable) Proof: Reduce (membership problem) to (size 2 language problem)

Decider for Reduction Compute Decider Given the reduction, membership problem decider Decider for size2 problem decider Reduction YES YES Compute Decider NO NO Given the reduction, If is decidable, then is decidable A contradiction! since is undecidable

We only need to build the reduction: Compute So that:

Construct from : Tape of input string yes write skip input run on tape on input yes If accepts ? then accept

yes 2 strings accepts does not accept 0 strings write skip input run on tape run on input yes If accepts ? then accept

Therefore: accepts has size 2 Equivalently: END OF PROOF

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

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

More examples of non-trivial properties: : is regular? YES YES NO : has size 2? NO NO YES

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

We can describe a property as the set of languages that possess the property If language has property then Example: : is empty? YES NO NO

Example: Suppose alphabet is : has size 1? NO YES NO NO

Non-trivial property problem Input: Turing Machine Question: Does have the non-trivial property ? Corresponding language:

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

We examine two cases: Case 1: Examples: : is empty? : is regular? Case 2: Example: : has size 2?

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

Reduce (membership problem) to

Decider for Reduction Compute Decider Given the reduction, membership problem decider Decider for Non-trivial property problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

We only need to build the reduction: Compute So that:

Construct from : Tape of input string yes write skip input run on tape on input If yes accepts ? then accept

For this phase we can run machine that accepts , with input string skip input string write on tape run on input If yes accepts ? then accept

yes accepts does not accept write skip input run on tape string on input If yes accepts ? then accept

Therefore: accepts Equivalently:

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

Reduce (membership problem) to

Decider for Reduction Compute Decider Given the reduction, membership problem decider Decider for Non-trivial property problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

We only need to build the reduction: Compute So that:

Construct from : Tape of input string yes write skip input run on tape on input If yes accepts ? then accept

yes accepts does not accept write skip input run on tape string on input If yes accepts ? then accept

Therefore: accepts Equivalently: END OF PROOF

This Summary is an Online Content from this Book: Michael Sipser, Introduction to the Theory of Computation, 2ndEdition It is edited for Computation Theory Course 6803415-3 by: T.Mariah Sami Khayat Teacher Assistant @ Adam University College For Contacting: mskhayat@uqu.edu.sa Kingdom of Saudi Arabia Ministry of Education Umm AlQura University Adam University College Computer Science Department المملكة العربية السعودية وزارة التعليم جامعة أم القرى الكلية الجامعية أضم قسم الحاسب الآلي