Lecture 8 From NFA to Regular Language. Induction on k= # of states other than initial and final states K=0 a a* b a c d c*a(d+bc*a)*

Slides:



Advertisements
Similar presentations
DFA vs NFA Deterministic Finite Automata
Advertisements

Lecture 6 Nondeterministic Finite Automata (NFA)
Transparency No. 2-1 Formal Language and Automata Theory Homework 3.
Regular expressions Regular languages Sipser 1.3 (pages 63-76)
Regular expressions Regular languages Sipser 1.3 (pages 63-76)
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Fall 2006Costas Busch - RPI1 Regular Expressions.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
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.
1 NFAs accept the Regular Languages. 2 Equivalence of Machines Definition: Machine is equivalent to machine if.
Fall 2006Costas Busch - RPI1 Properties of Regular Languages.
Courtesy Costas Busch - RPI1 Non-regular languages.
Lecture 8 Sept 29, 2011 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
NFA- to NFA conversion. Purpose This presentation presents an example execution of the algorithm which takes as input an NFA with -transitions and produces.
1 Non-Deterministic Automata Regular Expressions.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Lecture 4UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 4.
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.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Properties of Exponents
1 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
Transition Diagrams Lecture 3 Wed, Jan 21, Building Transition Diagrams from Regular Expressions A regular expression consists of symbols a, b,
Chapter 4 Pumping Lemma Properties of Regular Languages Decidable questions on Regular Languages.
Chapter 6 Properties of Regular Languages. 2 Regular Sets and Languages  Claim(1). The family of languages accepted by FSAs consists of precisely the.
The Distributive Property 1-5 Objective: Students will use the Distributive Property to evaluate expressions and to simplify expressions. S. Calahan 2008.
Regular Expressions Costas Busch - LSU.
CSCI 3130: Formal languages and automata theory Tutorial 3 Chin.
Finite Automata Chapter 1. Automatic Door Example Top View.
Jianguo Lu : Lab 3 Jan 30, Winter 2004.
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
1 Some Properties of Regular Languages. 2 Properties Concatenation:Star: Union: Are regular Languages For regular languages and.
Example 4 Using Multiplication Properties SOLUTION Identity property of multiplication () 16 a. 6 = Find the product. () 16 a.b. 15– () 0 Multiplication.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
Lecture #5 Advanced Computation Theory Finite Automata.
Page 1. 1)Let B n = { a k | where k is a multiple of n}. I.e. B 1 = { a k | where k is a multiple of 1} = { a k | k Є {0,1,2,3,…}} = {‘’, a, aa, aaa, aaaa,
Animated Conversion of Regular Expressions to C Code On the regular expression: ((a ⋅ b)|c) *
Objective The student will be able to:
Formal Language & Automata Theory
Standard Representations of Regular Languages
The Distributive Property
Properties of Regular Languages
Formal Language & Automata Theory
Formal Language & Automata Theory
Single Final State for NFA
Intro to Theory of Computation
Regular Expressions Prof. Busch - LSU.
CSE322 PROPERTIES OF REGULAR LANGUAGES
Properties of Regular Languages
COSC 3340: Introduction to Theory of Computation
CSE322 CONSTRUCTION OF FINITE AUTOMATA EQUIVALENT TO REGULAR EXPRESSION Lecture #9.
4. Properties of Regular Languages
The Distributive Property
CSE 311: Foundations of Computing
Animated Conversion of Regular Expressions to C Code
Elementary Questions about Regular Languages
CSCI 2670 Introduction to Theory of Computing
Properties of Context-Free languages
Closure Properties of Regular Languages
Multiplying binomial with polynomial
Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
The Distributive Property
Exercise Find the following products mentally. 5(20) 100 5(7) 35 5(27)
NFAs accept the Regular Languages
COSC 3340: Introduction to Theory of Computation
Intro to Theory of Computation
Presentation transcript:

Lecture 8 From NFA to Regular Language

Induction on k= # of states other than initial and final states K=0 a a* b a c d c*a(d+bc*a)*

k > 1 c a b d e ac*e bc*d bc*e ac*d

Example (0+10)*0(1+10(0+10)*0)* (0+10)* (1+10)*0 1 How to get in the final state? Cycles at the final state. Why?

Example ε ε (0+10)*0(1+10(0+10)*0)* + 0*(1+01*1)(00*(1+01*1))* Solution 1

ε ε 0 0 ε 01* 1+01*1 01*+(1+01*1) 0+(1+01*1)0 (0+(1+01*1)0)*(01*+1+01*1) Solution 2

ε ε 0+10 ( *10)*(1+01*(ε+1)) Solution 3 1 ε * *(ε+1) Different ways may give different regular expressions for the same language.

Theorem A language is regular if and only if it can be accepted by an NFA if and only if it can be accepted by a DFA.

Closure Properties If A is regular, so is its complement A. If A and B are regular, then A∩B, A\B, A U B, AB are regular.

Quotient L 1 /L 2 = {x | there exists y in L 2 s.t. xy in L 1 } If L 1 is regular, so is L 1 /L 2. L 1 =L(M), M=(Q,Σ,δ,s,F) L 1 /L 2 = L(M’), M’ = (Q,Σ,δ,s, F’) where F’={q in Q | there exists y in L 2 s.t. δ(q,y) in F}

Example L 1 = L(M) L 2 = 0*1+0*11