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,

Slides:



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

Lecture # 11 Theory Of Automata By Dr. MM Alam 1.
Theory Of Automata By Dr. MM Alam
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 9,10 Theory of AUTOMATA
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
THEORY OF COMPUTATION 08 KLEENE’S THEOREM.
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.
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
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
Lecture 04: Theory of Automata:08 Transition Graphs.
Lecture # 4.
1 Chapter 3 Regular Languages.  2 3.1: Regular Expressions (1)   Regular Expression (RE):   E is a regular expression over  if E is one of:
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.
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
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.
Kleene’s Theorem and NFA
Pumping Lemma.
Lecture # 2.
Transition Graphs.
Recap lecture 33 Example of trees, Polish Notation, examples, Ambiguous CFG, example,
Recap Lecture 34 Example of Ambiguous Grammar, Example of Unambiguous Grammer (PALINDROME), Total Language tree with examples (Finite and infinite trees),
Pushdown Automata.
Pushdown Automata.
Lecture 9 Theory of AUTOMATA
Language Recognition (12.4)
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.
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,
CSE322 Regular Expressions and their Identities
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 lecture 44 Decidability, whether a CFG generates certain string (emptiness), examples, whether a nonterminal is used in the derivation of some word.
Language Recognition (12.4)
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.
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.
Finite Automaton with output
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
Presentation transcript:

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, beginning with and ending in different letters, containing aaa or bbb, Nondeterminism, Kleene’s theorem (part I, part II, part III), proof of Kleene’s theorem part I

Kleene’s Theorem continued … Proof(Kleene’s Theorem Part II) To prove part II of the theorem, an algorithm consisting of different steps, is explained showing how a RE can be obtained corresponding to the given TG. For this purpose the notion of TG is changed to that of GTG i.e. the labels of transitions are corresponding REs.

Kleene’s Theorem part II continued … Basically this algorithm converts the given TG to GTG with one initial state along with a single loop, or one initial state connected with one final state by a single transition edge. The label of the loop or the transition edge will be the required RE. Step 1 If a TG has more than one start states, then introduce a new start state connecting the new state to the old start states by the transitions labeled by Λ and make the old start states the non-start states. This step can be shown by the following example

Example b b 3+ 1- aa a a 2- 4+ bb

Example Continued ... b b 3+ 1 Λ aa - a Λ a 2 4+ bb

Kleene’s Theorem part II continued … Step 2: If a TG has more than one final states, then introduce a new final state, connecting the old final states to the new final state by the transitions labeled by Λ. This step can be shown by the previous example of TG, where the step 1 has already been processed

Example b b 1 3+ Λ aa - a Λ a 2 4+ bb

Example continued … b b 1 3 Λ Λ aa - a + Λ a Λ 2 4 bb

Kleene’s Theorem part II continued … Step 3: If a state has two (more than one) incoming transition edges labeled by the corresponding REs, from the same state (including the possibility of loops at a state), then replace all these transition edges with a single transition edge labeled by the sum of corresponding REs. This step can be shown by a part of TG in the following example

Example The above TG can be reduced to 5 4 5 4 r3 r1 …. …. r2 r4 r3+r4

Note The step 3 can be generalized to any finite number of transitions as shown below The above TG can be reduced to r1 r2 …. 5 …. …. rn 5 r1+r2 + +rn …. …

Kleene’s Theorem part II continued … Step 4 (bypass and state elimination) If three states in a TG, are connected in sequence then eliminate the middle state and connect the first state with the third by a single transition (include the possibility of circuit as well) labeled by the RE which is the concatenation of corresponding two REs in the existing sequence. This step can be shown by a part of TG in the following example

Example To eliminate state 5 the above can be reduced to …. 4 5 6 …. To eliminate state 5 the above can be reduced to r2r3*r4 …. …. 4 6 Consider the following example containing a circuit

Example Consider the part of a TG, containing a circuit at a state, as shown below To eliminate state 3 the above TG can be reduced to r2 r3 r1 3 4 …. …. 2 r4 r4r2*r3 r1r2*r3 …. 2 4 ….

Example Consider a part of the following TG To eliminate state 3 the above TG can be reduced to r2 r9 r1 r3 r7 r5 3 4 2 …. …. r4 r8 r6

Example continued ... To eliminate state 4 the above TG can be reduced to r1 +r3 r5* r4 r9 + r8r5*r7 r2 +r3 r5* r7 …. 2 4 …. r6 + r8r5*r4 (r1 +r3 r5* r4 )+(r2 +r3 r5* r7 )(r9 +r8 r5* r7 )*(r6 +r8 r5* r4 ) …. 2 ….

Note It is to be noted that to determine the RE corresponding to a certain TG, four steps have been discussed. This process can be explained by the following particular examples of TGs

Example - Consider the following TG To have single final state, the above TG can be reduced to the following aa,b 2+ aaa ab,ba - 1 bba 3+

Example continued … - - The above TG can be reduced to the following Λ To eliminate states 2 and 3, the above TG can be reduced to the following The above TG can be reduced to the following aa+b 2 aaa Λ ab+ba - 1 4+ bba Λ 3 aa+b ab+ba aaa Λ+bbaΛ - 1 4+

Hence the required RE is (ab+ba)(aa+b)*(aaa+bba) Example continued … To eliminate state 1 the above TG can be reduced to the following Hence the required RE is (ab+ba)(aa+b)*(aaa+bba) (ab+ba)(aa+b)*(aaa+bba) - +

Summing Up proof of Kleene’s theorem part II (method with different steps), particular examples of TGs to determine corresponding Res.