1 Module 25 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.

Slides:



Advertisements
Similar presentations
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Advertisements

1 Module 20 NFA’s with -transitions –NFA- ’s Formal definition Simplifies construction –LNFA- –Showing LNFA  is a subset of LNFA (extra credit) and therefore.
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
Formal Language, chapter 9, slide 1Copyright © 2007 by Adam Webber Chapter Nine: Advanced Topics in Regular Languages.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
1 Lecture 4 Topics –Problem solving Subroutine Theme –REC language class The class of solvable problems Closure properties.
1 Module 15 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
Lecture 9 Recursive and r.e. language classes
1 Lecture 14 Language class LFSA –Study limits of what can be done with FSA’s –Closure Properties –Comparing to other language classes.
1 Module 19 LNFA subset of LFSA –Theorem 4.1 on page 131 of Martin textbook –Compare with set closure proofs Main idea –A state in FSA represents a set.
1 Module 9 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
Lecture 8 Recursively enumerable (r.e.) languages
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
1 Lecture 21 Regular languages review –Several ways to define regular languages –Two main types of proofs/algorithms Relative power of two computational.
1 Module 21 Closure Properties for LFSA using NFA’s –From now on, when I say NFA, I mean any NFA including an NFA- unless I add a specific restriction.
Why the algorithm works! Converting an NFA into an FSA.
1 Lecture 20 Regular languages are a subset of LFSA –algorithm for converting any regular expression into an equivalent NFA –Builds on existing algorithms.
1 Lecture 26 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
1 Lecture 10 Proving more specific problems are not recursive Reduction technique –Use subroutine theme to show that if one problem is unsolvable, so is.
Why the algorithm works! Simulating 2 FSA’s with 1 FSA.
1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
1 Module 18 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.
Lecture 18 NFA’s with -transitions –NFA- ’s Formal definition Simplifies construction –LNFA- –Showing LNFA  is a subset of LNFA and therefore a subset.
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
1 Lecture 5 Topics –Closure Properties for REC Proofs –2 examples Applications.
1 Lecture 18 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
1 Lecture 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
1 Lecture 15 Distinguishability –Definition –Help in designing/debugging FSA’s NFA’s –nondeterministic transition functions computations are trees, not.
1 Lecture 16 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.
1 Lecture 23 Decision problems about regular languages –Programs can be inputs to other programs FSA’s, NFA’s, regular expressions –Basic problems are.
1 Lecture 19 Closure Properties for LFSA using NFA’s –union second proof –concatenation –Kleene closure.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Lecture 20 LNFA subset of LFSA –Theorem 4.1 on page 105 of Martin textbook –Compare with set closure proofs Main idea –A state in FSA represents a set.
1 Module 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
Converting an NFA into an FSA Proving LNFA is a subset of LFSA.
1 Module 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
MA/CSSE 474 Theory of Computation
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Lecture 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
1 Module 10 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
1 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
Regular Expressions Fundamental Data Structures and Algorithms Peter Lee March 13, 2003.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
1 Module 12 Computation and Configurations –Formal Definition –Examples.
CS 154 Formal Languages and Computability February 9 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
LECTURE 5 Scanning. SYNTAX ANALYSIS We know from our previous lectures that the process of verifying the syntax of the program is performed in two stages:
1 Module 12 Computation and Configurations –Formal Definition –Examples.
Algorithms and Decision Procedures for Regular Languages Chapter 9.
 2005 SDU Lecture11 Decidability.  2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved.
Decidability.
Chapters 11 and 12 Decision Problems and Undecidability.
CSE 2001: Introduction to Theory of Computation Fall 2013
CSE 105 theory of computation
Decision Properties of Regular Languages
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Instructor: Aaron Roth
Nondeterministic Finite State Automata (Dr. Torng)
CSE 105 theory of computation
More Undecidable Problems
CSE 105 theory of computation
Presentation transcript:

1 Module 25 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems answer-preserving input transformations to basic problems

2 Programs In this unit, our programs are the following three types of objects –FSA’s –NFA’s –regular expressions Previously, they were C ++ programs –Review those topics after mastering today’s examples

3 Basic Decision Problems (and algorithms for solving them)

4 Halting Problem * Input –FSA M –Input string x to M Question –Does M halt on x? Give an algorithm for solving the FSA halting problem.

5 Accepting Problem * Input –FSA M –Input string x to M Question –Is x in L(M)? Give an algorithm ACCEPT for solving the accepting problem.

6 Empty Language Problem * Input –FSA M Question –Is L(M)={}? Give an algorithm for solving the empty language problem. –Don’t look ahead to the next slide.

7 Algorithms for solving empty language problem * Algorithm 1 –View FSA M as a directed graph (nodes, arcs) –See if any accepting node is reachable from the start node Algorithm 2 –Let n be the number of states in FSA M –Run ACCEPT(M,x) for all input strings of length < n –If any are accepted THEN no ELSE yes Why is algorithm 2 correct?

8 Solving Other Problems (using answer-preserving input transformations)

9 Complement Empty Problem * Input –FSA M Question –Is (L(M)) c = {}? Show how to use an answer-preserving input transformation to help solve this problem –Show that the Complement Empty problem transforms to the Empty Language problem –Don’t look at next two slides

10 Algorithm Description Convert input FSA M into an FSA M’ such that L(M’) = (L(M)) c –We do this by applying the algorithm which we used to show that LFSA is closed under complement Feed FSA M’ into algorithm which solves the empty language problem If that algorithm returns yes THEN yes ELSE no

11 Input Transformation Illustrated Algorithm for solving empty language problem FSA M Complement Construction FSA M’ Yes/No Algorithm for complement empty problem The complement construction algorithm is the answer-pres. input transformation. If M is a yes input instance of CE, then M’ is a yes input instance of EL. If M is a no input instance of CE, then M’ is a no input instance of EL.

12 NFA Empty Problem * Input –NFA M Question –Is L(M)={}? Show how to use answer-preserving input transformations to help solve this problem –Show that the NFA Empty problem transforms to the Empty Language problem

13 Input Transformation * Yes/No Algorithm for NFA empty problem

14 Equal Problem * Input –FSA’s M 1 and M 2 Question –Is L(M 1 ) = L(M 2 )? Show how to use answer-preserving input transformations to solve this problem –Try and transform this problem to the empty language problem –If L(M 1 ) = L(M 2 ), then what combination of L(M 1 ) and L(M 2 ) must be empty?

15 Input Transformation Illustrated Yes/No Algorithm for Equal problem

16 Summary Decision problems with programs as inputs Basic problems –You need to develop algorithms from scratch based on properties of FSA’s Solving new problems –You need to figure out how to combine the various algorithms we have seen in this unit to solve the given problem