Automata, Grammars and Languages

Slides:



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

Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
Turing -Recognizable vs. -Decidable
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Linear Bounded Automata LBAs
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
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.
Turing -Recognizable vs. -Decidable
C SC 573 Theory of Computation Theory of Computation Lecture 05 Reduction.
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.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
The Acceptance Problem for TMs
Automata, Grammars and Languages
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
MCC 2093 Advanced Theoretical Computer Science
LIMITS OF ALGORITHMIC COMPUTATION
CSE 2001: Introduction to Theory of Computation Fall 2013
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidable Languages Costas Busch - LSU.
Undecidable problems:
MA/CSSE 474 Theory of Computation
Proposed in Turing’s 1936 paper
NP-completeness The Chinese University of Hong Kong Fall 2008
Formal Languages, Automata and Models of Computation
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Theory of Computability
Instructor: Aaron Roth
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
More undecidable languages
Theory of Computability
Instructor: Aaron Roth
Instructor: Aaron Roth
Automata, Grammars and Languages
More Undecidable Problems
MA/CSSE 474 Theory of Computation
Intro to Theory of Computation
Presentation transcript:

Automata, Grammars and Languages CSC 473 Automata, Grammars and Languages 7/23/2018 Automata, Grammars and Languages Discourse 07 Reduction x C SC 473 Automata, Grammars and Languages

Reduction of One Problem to Another CSC 473 Automata, Grammars and Languages Reduction of One Problem to Another 7/23/2018 Often want to solve a new problem P similar to a problem Q that has already been solved. One way of solving P is to transform each instance of P into an instance of the known problem Q, then solve the Q instance, and then use it to obtain a solution to the P instance. The solution to P uses the solution to Q as a “subroutine”. We often write P  Q for “P is reducible to Q” Ex: Squaring  Multiplication: Ex: Multiplication  Squaring: Ex: DFA Equivalence  DFA Emptiness C SC 473 Automata, Grammars and Languages

Using Reduction to Prove “Difficulty” CSC 473 Automata, Grammars and Languages Using Reduction to Prove “Difficulty” 7/23/2018 If P  Q and P is known to be “hard to solve”, then Q must be hard to solve too. For example¶, if P  Q and P is undecidable, then Q must also be undecidable. For if Q is decidable, we can use the reduction P  Q to construct a decider for P; contradiction. Ex: We will show by reduction that the problem is reducible to the problem The undecidability of will imply the undecidability of _______________________________ ¶Here  stands for many-one or mapping reduction denoted m . It will be defined precisely later. C SC 473 Automata, Grammars and Languages

Undecidability via Reductions: Halting CSC 473 Automata, Grammars and Languages Undecidability via Reductions: Halting 7/23/2018 HALTING PROBLEM ACCEPTANCE (MEMBERSHIP) PROBLEM Thm 5.1: is undecidable. Pf: We show that so that if we had a decider for we could build a decider for This contradicts the undecidability of , and so must be undecidable. Assume, contrary to what is to be proved, that has a decider R. Following is a visual proof that is reducible to : C SC 473 Automata, Grammars and Languages

Undecidability via Reductions (cont.) CSC 473 Automata, Grammars and Languages Undecidability via Reductions (cont.) 7/23/2018 Consider a “compiler” (algorithm) C that given  M  constructs a new TM C( M ) as follows: Reduction: use this and R to build a decider for acc acc rej loop acc rej So S is a decider for Contradiction  theorem.  C SC 473 Automata, Grammars and Languages

Undecidability: Empty Tape Acceptance CSC 473 Automata, Grammars and Languages Undecidability: Empty Tape Acceptance 7/23/2018 Thm: The EMPTY-TAPE-ACCEPTANCE problem is undecidable: Pf: We will show that . Consider a “compiler” C that given M,w constructs TM C(M,w ): acc acc rej rej Summarze here 3/2/04. Compare this reduction to next slide. In fact: C SC 473 Automata, Grammars and Languages

Empty Tape Acceptance (cont’d) CSC 473 Automata, Grammars and Languages Empty Tape Acceptance (cont’d) 7/23/2018 Reduction: assume a decider R for . We construct a decider from it for . E is a decider for . Contradiction.  acc acc rej rej Summarze here 3/2/04. Compare this reduction to next slide. C SC 473 Automata, Grammars and Languages

Undecidability: Empty Set Acceptance CSC 473 Automata, Grammars and Languages Undecidability: Empty Set Acceptance 7/23/2018 Thm: The EMPTY-SET-ACCEPTANCE problem is undecidable: Pf: We will show that . We reduce the complement of to this problem. Consider a “compiler” C that given M,w constructs TM C(M,w ): rej acc Summarze here 3/2/04. Compare this reduction to next slide. C SC 473 Automata, Grammars and Languages

Empty Set Acceptance (cont’d) CSC 473 Automata, Grammars and Languages Empty Set Acceptance (cont’d) 7/23/2018 Reduction: assume a decider R for . We construct a decider from it for . E is a decider for . Contradiction  theorem  acc acc rej rej Summarze here 3/2/04. Compare this reduction to next slide. C SC 473 Automata, Grammars and Languages

Undecidability: Regular Set Acceptance CSC 473 Automata, Grammars and Languages Undecidability: Regular Set Acceptance 7/23/2018 Thm 5.3: The REGULAR-SET-ACCEPTANCE problem is undecidable: Pf: We will show that Consider a “compiler” C that given M,w constructs TM C(M,w ): (2) acc acc (1) Summarze here 3/2/04. Compare this reduction to next slide. rej acc rej C SC 473 Automata, Grammars and Languages

Regular Set Acceptance (cont’d) CSC 473 Automata, Grammars and Languages Regular Set Acceptance (cont’d) 7/23/2018 Reduction: assume a decider R for . We construct a decider from it for . E is a decider for . Contradiction  theorem  acc acc rej rej Summarze here 3/2/04. Compare this reduction to next slide. C SC 473 Automata, Grammars and Languages

Mapping Reduction: Motivation CSC 473 Automata, Grammars and Languages Mapping Reduction: Motivation 7/23/2018 Halting Problem Empty-Tape Acceptance Problem Empty-Set Acceptance Problem Regular-Set Acceptance Problem Y Y x N N C is an algorithm in each case C SC 473 Automata, Grammars and Languages

TMs can Act as Recognizers or Transducers CSC 473 Automata, Grammars and Languages TMs can Act as Recognizers or Transducers 7/23/2018 Defn 5.17: A function is a computable function† if  a TM transducer M such that on every input w, M halts with f(w) on its tape. Such a TM is called an algorithm. Compare & contrast this definition with: Defn 3.6: A language is a decidable language if  a TM recognizer M such that on every input w, if w L it halts with “accept” and if w L it halts with “reject” . Such a TM is called a decider. A recognizer can be viewed as a special case of a transducer that prints only a 1 or 0 A language can be viewed as a special case of a function that returns a boolean value. ____________________________ †Also called total computable function. “Total” means “defined for all arguments w”. C SC 473 Automata, Grammars and Languages

Function:Set :: Transducer:Recognizer CSC 473 Automata, Grammars and Languages Function:Set :: Transducer:Recognizer 7/23/2018 Functions Sets (Languages) Computable† f  TM transducer M  (w) M on w halts & prints M(w) (w) M(w) = f(w) M is called an algorithm Decidable L  TM recognizer M  (w) M on w halts & prints 0,1 (w) M(w) = 1  w L M is called a decider ‡ Partial† Computable f (w) M on w halts  f(w) defined M is called a procedure Recognizable L (w) M on w halts  w L M is called a recognizer Special case of Special case of Special case of †A computable function is historically called a “total computable function” †A partial computable function is sometimes called an “effective function” and a procedure an “effective procedure”. “Partial” signifies that the function f might not be defined for some arguments. ‡A decider is sometimes just called an “algorithm” Special case of C SC 473 Automata, Grammars and Languages

Mapping Reduction: Definition CSC 473 Automata, Grammars and Languages Mapping Reduction: Definition 7/23/2018 All have the same pattern f must be a computable function The “compiler” must be an algorithm Defn 5.20: Language is mapping reducible to language iff  a computable function such that Function f is called the reduction of to . Y Y x N N C SC 473 Automata, Grammars and Languages

Mapping Reduction: Definition (cont’d) CSC 473 Automata, Grammars and Languages Mapping Reduction: Definition (cont’d) 7/23/2018 Picture: Y Y x N N equivalent to , C SC 473 Automata, Grammars and Languages

CSC 473 Automata, Grammars and Languages Reduction (cont.) 7/23/2018 Thms 5.22, 5.23,5.28, 5.29: Let . Then decidable  decidable undecidable  undecidable recognizable  recognizable non-recognizable  non-recognizable If you want to show a problem P is easier than problem Q then reduce P to Q If you want to show a problem P is harder than problem Q then reduce Q to P easiness hardness P: ? Q Q: ? P C SC 473 Automata, Grammars and Languages

CSC 473 Automata, Grammars and Languages Reductions 7/23/2018 Thm: Ex: Reduction: major method for showing unsolvability or non-recognizability: Goal: to show is not recognizable [not decidable] Known: is not recognizable [not decidable] Strategy: reduce to Method: build computable “translator” f to accept assuming we have a recognizer [decider] for yes w f C SC 473 Automata, Grammars and Languages

Undecidable via Reductions CSC 473 Automata, Grammars and Languages Undecidable via Reductions 7/23/2018 Thm: The NONEMPTY-SET-ACCEPTANCE problem is TM-recognizable but not decidable: Pf: It is easy to see that since So cannot be decidable. An acceptor for is the following nondeterministic TM encode yes yes †what if w is not a syntactically valid TM encoding? Which set is it in? ‡ a good illustration of the power of nondeterminism to describe processes C SC 473 Automata, Grammars and Languages

Non-Recognizable via Reductions CSC 473 Automata, Grammars and Languages Non-Recognizable via Reductions 7/23/2018 Thm: The EQUIVALENCE problem is not recognizable: Pf: We show that is not recognizable by showing that (which means that ). The reducing function generates a pair of TMs with the following behaviors: rej †what if w is not a syntactically valid TM encoding? Which set is it in? ‡ a good illustration of the power of nondeterminism to describe processes acc C SC 473 Automata, Grammars and Languages

Non-recognizable via m (cont’d) CSC 473 Automata, Grammars and Languages Non-recognizable via m (cont’d) 7/23/2018 Reduction: assume a decider for . We construct a decider from it for . S is a decider for . So This implies that and so cannot be recognizable  acc acc rej rej Summarze here 3/2/04. Compare this reduction to next slide. C SC 473 Automata, Grammars and Languages

Non-Recognizable via Reductions (cont’d) CSC 473 Automata, Grammars and Languages Non-Recognizable via Reductions (cont’d) 7/23/2018 Exercise: The FINITE-SET-ACCEPTANCE problem is not TM-recognizable: Proof: Show that Exercise: The INFINITE-SET-ACCEPTANCE problem is not TM-recognizable: C SC 473 Automata, Grammars and Languages

Equivalence and Completeness CSC 473 Automata, Grammars and Languages Equivalence and Completeness 7/23/2018 Definition: Let C be a class of sets. A set A is mapping reduction complete ( -complete ) in C iff Remark: “A is complete” says A is a “hardest problem in C” A is mapping equivalent to B iff Fact: all complete sets in C are mapping equivalent Exercise: Start here 3/3/04 C SC 473 Automata, Grammars and Languages

CSC 473 Automata, Grammars and Languages Completeness 7/23/2018 Theorem: is complete in the class TM of Turing-recognizable sets. Proof: is accepted by U, so is in TM. To show completeness, let B be any Turing-recognizable set in TM. Then  a TM such that . Define the computable function Then Since B was chosen arbitrarily in TM the result follows  Exercise: Show the Halting Prob. is complete in TM C SC 473 Automata, Grammars and Languages