Lecture 9 Theory of AUTOMATA

Slides:



Advertisements
Similar presentations
Theory Of Automata By Dr. MM Alam
Advertisements

Lecture # 11 Theory Of Automata By Dr. MM Alam 1.
Lecture # 10 Theory Of Automata By Dr. MM Alam 1.
Lecture 9,10 Theory of AUTOMATA
Theory Of Automata By Dr. MM Alam
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Regular.
Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
Lecture 03: Theory of Automata:08 Finite Automata.
THEORY OF COMPUTATION 08 KLEENE’S THEOREM.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Lecture 07: Formal Methods in SE Finite Automata Lecture # 07 Qaisar Javaid Assistant Professor.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No Roll No Roll No Roll No Group No. 3 Presented To Mam.
CHAPTER 1 Regular Languages
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
CSC312 Automata Theory Nonregular Languages Chapter # 10 by Cohen
Conversions Regular Expression to FA FA to Regular Expression.
1 Recap lecture 28 Examples of Myhill Nerode theorem, Quotient of a language, examples, Pseudo theorem: Quotient of a language is regular, prefixes of.
L ECTURE 3 T HEORY OF AUTOMATA. E QUIVALENT R EGULAR E XPRESSIONS Definition Two regular expressions are said to be equivalent if they generate the same.
Lecture # 8 (Transition Graphs). Example Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. Consider.
Recap Lecture 3 RE, Recursive definition of RE, defining languages by RE, { x}*, { x}+, {a+b}*, Language of strings having exactly one aa, Language of.
Lecture #5 Advanced Computation Theory Finite Automata.
Lecture # 16. Applications of Incrementing and Complementing machines 1’s complementing and incrementing machines which are basically Mealy machines are.
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
Recap lecture 5 Different notations of transition diagrams, languages of strings of even length, Odd length, starting with b, ending in a (with different.
Language Recognition MSU CSE 260.
Kleene’s Theorem and NFA
Generalized Transition Graphs
FORMAL LANGUAGES AND AUTOMATA THEORY
Recap lecture 38 Example of PDA with table for running a string, Equivalent PDA, PDA for EVEN EVEN Language. Non-Derterministic PDA, Example of Non-Derterministic.
CSC312 Automata Theory Lecture # 4 Languages-III.
REGULAR LANGUAGES AND REGULAR GRAMMARS
Non-deterministic Finite Automata (NFA)
Recap lecture 29 Example of prefixes of a language, Theorem: pref(Q in R) is regular, proof, example, Decidablity, deciding whether two languages are equivalent.
Kleene’s Theorem Muhammad Arif 12/6/2018.
CSCI 2670 Introduction to Theory of Computing
Closure Properties of Regular Languages
Recap lecture 6 Language of strings, beginning with and ending in different letters, Accepting all strings, accepting non-empty strings, accepting no string,
Recap Lecture 16 Examples of Kleene’s theorem part III (method 3), NFA, examples, avoiding loop using NFA, example, converting FA to NFA, examples, applying.
Lecture 5 Theory of AUTOMATA
Compiler Construction
Recap lecture 10 Definition of GTG, examples of GTG accepting the languages of strings:containing aa or bb, beginning with and ending in same letters,
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
Recap lecture 18 NFA corresponding to union of FAs,example, NFA corresponding to concatenation of FAs,examples, NFA corresponding to closure of an FA,examples.
Recap lecture 37 New format for FAs, input TAPE, START, ACCEPT , REJECT, READ states Examples of New Format of FAs, PUSHDOWN STACK , PUSH and POP states,
Lecture # 13.
Recap Lecture 17 converting NFA to FA (method 3), example, NFA and Kleene’s theorem method 1, examples, NFA and Kleene’s theorem method 2 , NFA corresponding.
Recap lecture 11 Proof of Kleene’s theorem part II (method with different steps), particular examples of TGs to determine corresponding REs.
Recap lecture 25 Intersection of two regular languages is regular, examples, non regular languages, example.
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
RECAP Lecture 7 FA of EVEN EVEN, FA corresponding to finite languages(using both methods), Transition graphs.
Recap lecture 23 Mealy machines in terms of sequential circuit.
Recap Lecture 15 Examples of Kleene’s theorem part III (method 3), NFA, examples, avoiding loop using NFA, example, converting FA to NFA, examples, applying.
Finite-State Machines with No Output
Recap lecture 20 Recap Theorem, Example, Finite Automaton with output, Moore machine, Examples.
Recap lecture 40 Recap of example of PDA corresponding to CFG, CFG corresponding to PDA. Theorem, HERE state, Definition of Conversion form, different.
Kleene’s Theorem (Part-3)
Finite Automaton with output
PDA corresponding to CFG
CSC312 Automata Theory Kleene’s Theorem Lecture # 12
Kleene’s Theorem (Part-3)
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
Recap Lecture 4 Regular expression of EVEN-EVEN language, Difference between a* + b* and (a+b)*, Equivalent regular expressions; sum, product and closure.
Recap Lecture 3 RE, Recursive definition of RE, defining languages by RE, { x}*, { x}+, {a+b}*, Language of strings having exactly one aa, Language of.
LECTURE # 07.
NFAs accept the Regular Languages
CSC312 Automata Theory Lecture # 24 Chapter # 11 by Cohen Decidability.
Presentation transcript:

Lecture 9 Theory of AUTOMATA

Kleene’s Theorem (part iii) Statement; If the language can be expressed by a RE then there exists an FA accepting the language. As the regular expression is obtained applying addition, concatenation and closure on the letters of an alphabet and the Null string, so while building the RE, sometimes, the corresponding FA may be built easily, as shown in the following examples

Kleene’s Theorem (part iii) Example: Consider the language, defined over Σ = {a,b}, consisting of only b, then this language may be accepted by the following FA which shows that this FA helps in building an FA accepting only one letter

Kleene’s Theorem (part iii) Example: Consider the language, defined over Σ = {a,b}, consisting of only ∧, then this language may be accepted by the following FA

As, if r1 and r2 are regular expressions then their sum, concatenation and closure are also regular expressions So an FA can be built for any regular expression if the methods can be developed for building the FAs corresponding to the sum, concatenation and closure of the regular expressions along with their FAs. These three methods are explained in the following discussion

Method1 (Union of two FAs) Let FA3 be an FA corresponding to r1+ r2, then the initial state of FA3 must correspond to the initial state of FA1 and the initial state of FA2. Since the language corresponding to r1+ r2 is the union of corresponding languages L1 and L2, consists of the strings belonging to L1or L2 or both, therefore a final state of FA3 must correspond to a final state of FA1 or FA2 or both. Since, in general, FA3 will be different from both FA1 and FA2, so the labels of the states of FA3 may be supposed to be z1,z2, z3, …, where z1 is supposed to be the initial state. Since z1 corresponds to the states x1 or y1, So there will be two transitions separately for each letter read at z1. It will give two possibilities of states either z1 or different from z1. This process may be expressed in the following transition table for all possible states of FA3.

Method1 (Union of two FAs)

Method1 (Union of two FAs)

Method1 (Union of two FAs) RE corresponding to the above FA may be r1+r2 = (a+b)*b + (a+b )*aa(a+b )*

Method2 (Concatenation of two FAs): Using the FAs corresponding to r1 and r2, an FA can be built, corresponding to r1r2. This method can be developed considering the following examples Example: Let r1 = (a+b)*b defines L1 and FA1 be and r2 = (a+b )*aa (a+b )* defines L2 and FA2 be

Method2 (Concatenation of two FAs): Let FA3 be an FA corresponding to r1r2, then the initial state of FA3 must correspond to the initial state of FA1 and the final state of FA3 must correspond to the final state of FA2. Since the language corresponding to r1r2 is the concatenation of corresponding languages L1 and L2, consists of the strings obtained, concatenating the strings of L1 to those of L2, therefore the moment a final state of first FA is entered, the possibility of the initial state of second FA will be included as well. Since, in general, FA3 will be different from both FA1 and FA2, so the labels of the states of FA3 may be supposed to be z1,z2, z3, …, where z1 stands for the initial state.

Method2 (Concatenation of two FAs):

Method2 (Concatenation of two FAs):

Method2 (Concatenation of two FAs):

Method3: (Closure of an FA) Closure of an FA, is same as concatenation of an FA with itself, except that the initial state of the required FA is a final state as well. Here the initial state of given FA, corresponds to the initial state of required FA and a non final state of the required FA as well. Example: Let r = (a+b)*b and the corresponding FA be

Method3: (Closure of an FA) then the FA corresponding to r* may be determined as under

Method3: (Closure of an FA) The corresponding transition diagram may be as under: