Decision Properties of Regular Languages

Slides:



Advertisements
Similar presentations
CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
Advertisements

1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Fall 2006Costas Busch - RPI1 Regular Expressions.
CS 310 – Fall 2006 Pacific University CS310 Converting NFA to DFA Sections:1.2 Page 54 September 15, 2006.
1 Positive Properties of Context-Free languages. 2 Context-free languages are closed under: Union is context free is context-free.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Lecture 3: Closure Properties & Regular Expressions Jim Hook Tim Sheard Portland State University.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Definitions Equivalence to Finite Automata
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
Decision Properties of Regular Languages
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.
NFA ε - NFA - DFA equivalence. What is an NFA An NFA is an automaton that its states might have none, one or more outgoing arrows under a specific symbol.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
Lecture 5 Sept 06, 2012 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
1 Decision Properties of Regular Languages General Discussion of “Properties” The Pumping Lemma Minimizing DFA.
Finite Automata Chapter 1. Automatic Door Example Top View.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
CS412/413 Introduction to Compilers Radu Rugina Lecture 3: Finite Automata 25 Jan 02.
General Discussion of “Properties” The Pumping Lemma Membership, Emptiness, Etc.
Standard Representations of Regular Languages
Properties of Context-Free Languages
Closure Properties of Regular Languages
Properties of Regular Languages
PROPERTIES OF REGULAR LANGUAGES
PDAs Accept Context-Free Languages
CSE 105 theory of computation
Two issues in lexical analysis
Recognizer for a Language
Single Final State for NFA
Jaya Krishna, M.Tech, Assistant Professor
CSE 105 theory of computation
Regular Expression We shall build expressions from the symbols using simple operations include concatenation, union and kleen closure. Several intuitive.
CSE322 PROPERTIES OF REGULAR LANGUAGES
Properties of Regular Languages
COSC 3340: Introduction to Theory of Computation
4. Properties of Regular Languages
Non-Deterministic Finite Automata
Decidable Languages Costas Busch - LSU.
Transition Diagrams Lecture 3 Fri, Jan 21, 2005.
Introduction to Finite Automata
Deterministic PDAs - DPDAs
Closure Properties of Context-Free languages
Finite Automata & Language Theory
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
Closure Properties of Regular Languages
Chapter 4 Properties of Regular Languages
Properties of Context-Free languages
Closure Properties of Regular Languages
Instructor: Aaron Roth
Chapter 1 Regular Language
Instructor: Aaron Roth
CSE 105 theory of computation
Automata, Grammars and Languages
Lecture 5 Scanning.
NFAs accept the Regular Languages
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Presentation transcript:

Decision Properties of Regular Languages General Discussion of “Properties” Membership, Emptiness, Etc.

Properties of Language Classes A language class is a set of languages. We have one example: the regular languages. We’ll see many more in this class. Language classes have two important kinds of properties: Decision properties. Closure properties.

Representation of Languages Representations can be formal or informal. Example (formal): represent a language by a RE or DFA defining it. Example: (informal): a logical or prose statement about its strings: {0n1n | n is a nonnegative integer} “The set of strings consisting of some number of 0’s followed by the same number of 1’s.”

Decision Properties A decision property for a class of languages is an algorithm that takes a formal description of a language (e.g., a DFA) and tells whether or not some property holds. Example: Is language L empty?

Subtle Point: Representation Matters You might imagine that the language is described informally, so if my description is “the empty language” then yes, otherwise no. But the representation is a DFA (or a RE that you will convert to a DFA). Can you tell if L(A) =  for DFA A?

Closure Properties A closure property of a language class says that given languages in the class, an operator (e.g., union) produces another language in the same class. Example: the regular languages are obviously closed under union, concatenation, and (Kleene) closure. Use the RE representation of languages.

Why Closure Properties? Helps construct representations. Helps show (informally described) languages not to be in the class.

Example: Use of Closure Property We can easily prove L1 = {0n1n | n > 0} is not a regular language. L2 = the set of strings with an = number of 0’s and 1’s isn’t either, but that fact is trickier to prove. Regular languages are closed under . If L2 were regular, then L2 L(0*1*) = L1 would be, but it isn’t.

The Membership Question Our first decision property is the question: “is string w in regular language L?” Assume L is represented by a DFA A. Simulate the action of A on the sequence of input symbols forming w.

Example: Testing Membership 0 1 0 1 1 Next symbol Start 1 A C B 0,1 Current state

Example: Testing Membership 0 1 0 1 1 Next symbol Start 1 A C B 0,1 Current state

Example: Testing Membership 0 1 0 1 1 Next symbol Start 1 A C B 0,1 Current state

Example: Testing Membership 0 1 0 1 1 Next symbol Start 1 A C B 0,1 Current state

Example: Testing Membership 0 1 0 1 1 Next symbol Start 1 A C B 0,1 Current state

Example: Testing Membership 0 1 0 1 1 Next symbol Start 1 A C B 0,1 Current state

What if the Regular Language Is not Represented by a DFA? There is a circle of conversions from one form to another: RE ε-NFA DFA NFA

The Emptiness Problem: An Algorithm Given a regular language, does the language contain any string at all? Assume representation is DFA. Construct the transition graph. Compute the set of states reachable from the start state. If any final state is reachable, then yes, else no.