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.

Slides:



Advertisements
Similar presentations
Lecture # 11 Theory Of Automata By Dr. MM Alam 1.
Advertisements

Theory Of Automata By Dr. MM Alam
Lecture 9,10 Theory of AUTOMATA
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Regular.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Regular Expressions and Languages A regular expression is a notation to represent languages, i.e. a set of strings, where the set is either finite or contains.
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.
1 Recap lecture 22 Applications of complementing and incrementing machines, Equivalent machines, Moore equivalent to Mealy, proof, example, Mealy equivalent.
1 Recap lecture 27 Pumping lemma version II, proof, examples, Myhill Nerode theorem, examples.
1 Recap lecture 21 Example of Moore machine, Mealy machine, Examples, complementing machine, Incrementing machine.
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.
Lecture 4 Theory of AUTOMATA
CSC312 Automata Theory Nonregular Languages Chapter # 10 by Cohen
Conversions Regular Expression to FA FA to Regular Expression.
1 Section 11.2 Finite Automata Can a machine(i.e., algorithm) recognize a regular language? Yes! Deterministic Finite Automata A deterministic finite automaton.
1 Recap lecture 28 Examples of Myhill Nerode theorem, Quotient of a language, examples, Pseudo theorem: Quotient of a language is regular, prefixes of.
Lecture 09: Theory of Automata:2014 Asif NawazUIIT, PMAS-Arid Agriclture University Rawalpindi. Kleene’s Theorem and NFA.
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 # 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
Pumping Lemma.
Generalized Transition Graphs
Standard Representations of Regular Languages
Theory of Computation Lecture # 9-10.
Pushdown Automata.
Pushdown Automata.
Lecture 9 Theory of AUTOMATA
[Week#03,04] (b) - Finite Automata
Chapter 2 FINITE AUTOMATA.
Non-deterministic Finite Automata (NFA)
Principles of Computing – UFCFA3-30-1
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.
NFAs and Transition Graphs
Pumping Lemma.
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
ReCap Chomsky Normal Form, Theorem regarding CNF, examples of converting CFG to be in CNF, Example of an FA corresponding to Regular CFG, Left most and.
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,
CSC312 Automata Theory Transition Graphs Lecture # 9
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.
Finite-State Machines with No Output
Recap lecture 40 Recap of example of PDA corresponding to CFG, CFG corresponding to PDA. Theorem, HERE state, Definition of Conversion form, different.
Finite Automaton with output
NFAs and Transition Graphs
CSC312 Automata Theory Kleene’s Theorem Lecture # 12
Kleene’s Theorem (Part-3)
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.
Mealy and Moore Machines
CSC312 Automata Theory Lecture # 24 Chapter # 11 by Cohen Decidability.
Presentation transcript:

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 an NFA on an example of maze

Task Build an FA corresponding to the closure of the following FA y2

New States after reading Task solution b b a y2 y1± a Old States New States after reading a b Final z1±y1 y2z3 y1z2 z2+y1 z3y2 y2 z3

Solution of the Task b a z3 z1 ± a b a z2+ b

Task Build an NFA equivalent to the following FA 2 a 1– 3 6+ 4 5 a,b b

Solution of the Task 2 a 4 a a a,b a,b 1– 6+ b b 3 b 5

Application of an NFA - + There is an important application of an NFA in artificial intelligence, which is discussed in the following example of a maze - 1 2 3 4 L 5 O 6 M 7 P 8 N 9 +

Example Continued ... - and + indicate the initial and final states respectively. One can move only from a box labeled by other then L, M, N, O, P to such another box. To determine the number of ways in which one can start from the initial state and end in the final state, the following NFA using only single letter a, can help in this regard

Example continued ... a - 2 1 3 4 5 6 7 8 9 +

Example continued ... It can be observed that the shortest path which leads from the initial state and ends in the final state, consists of six steps i.e. the shortest string accepted by this machine is aaaaaa. The next larger accepted string aaaaaaaa.Thus if this NFA is considered to be a TG then the corresponding regular expression may be written as aaaaaa(aa)* Which shows that there are infinite many required ways

Note It is to be noted that every FA can be considered to be an NFA as well , but the converse may not true. It may also be noted that every NFA can be considered to be a TG as well, but the converse may not true. It may be observed that if the transition of null string is also allowed at any state of an NFA then what will be the behavior in the new structure. This structure is defined in the following

NFA with Null String Definition: If in an NFA,  is allowed to be a label of an edge then the NFA is called NFA with  (NFA-). An NFA- is a collection of three things (1) Finite many states with one initial and some final states. (2) Finite set of input letters, say, ={a, b, c}. (3) Finite set of transitions, showing where to move if a letter is input at certain state. There may be more than one transitions for certain letter and there may not be any transition for a certain letter. The transition of  is also allowed at any state.

Example Consider the following NFA with Null string The above NFA with Null string accepts the language of strings, defined over Σ = {a, b}, ending in b. a, b  b - + 1

Example Consider the following NFA with Null string The above NFA with Null string accepts the language of strings, defined over Σ = {a, b}, ending in a. a, b , a a - + 1

Task Determine the regular expression of the following NFA- 4+ 5 2 a 1- 4+ b 5 , b 2 3-

Note It is to be noted that every FA may be considered to be an NFA- as well, but the converse may not true. Similarly every NFA- may be considered to be a TG as well, but the converse may not true.

NFA to FA Two methods are discussed in this regard. Method 1: Since an NFA can be considered to be a TG as well, so a RE corresponding to the given NFA can be determined (using Kleene’s theorem). Again using the methods discussed in the proof of Kleene’s theorem, an FA can be built corresponding to that RE. Hence for a given NFA, an FA can be built equivalent to the NFA. Examples have, indirectly, been discussed earlier.

NFA to FA continued … Method 2: Since in an NFA, there more than one transition for a certain letter and there may not be any transition for certain letter, so starting from the initial state corresponding to the initial state of given NFA, the transition diagram of the corresponding FA, can be built introducing an empty state for a letter having no transition at certain state and a state corresponding to the combination of states, for a letter having more than one transitions. Following are the examples

Example 2 4+ 3 Consider the following NFA Using the method discussed earlier, the above NFA may be equivalent to the following FA 2 b a 4+ 1- b a 3

Example Continued ... 2 1- 3 1- 2 3 4+ 4+  a b a a b b a a a, b b

Example A simple NFA that accepts the language of strings defined over ={a,b}, consists of bb and bbb The above NFA can be converted to the following FA b 1- b 2 b b 3 4+

Example Continued ... 1- 2 3 2 1- (3,4)+  4+ 4+ b b a a a a,b a, b b

Task Build an FA corresponding to the following NFA which accepts the language of strings containing bb a, b a, b 1- b b 2 3+

Solution of the Task 1- 2 (1,2,3) + (1,3)+ 1- (1,2) b 3+ 1- 2 a, b It may be noted that the above method seems to be complicated, hence an easier method discussed by Martin, follows as a b a b a (1,2,3) + 1- (1,2) b (1,3)+ a b

NFA to FA continued … Method 3: As discussed earlier that in an NFA, there may be more than one transition for a certain letter and there may not be any transition for certain letter, so starting from the initial state corresponding to the initial state of given NFA, the transition table along with new labels of states, of the corresponding FA, can be built introducing an empty state for a letter having no transition at certain state and a state corresponding to the combination of states, for a letter having more than one transitions. Following are the examples

Summing Up Applying an NFA on an example of maze, NFA with null string, examples, RE corresponding to NFA with null string (task), converting NFA to FA (method 1,2,3) examples