Lecture # 8 (Transition Graphs). Example Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. Consider.

Slides:



Advertisements
Similar presentations
Properties of Regular Languages
Advertisements

Theory Of Automata By Dr. MM Alam
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
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.
Cohen, Chapter 61 Introduction to Computational Theory Chapter 6.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
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.
Finite Automata Chapter 5. Formal Language Definitions Why need formal definitions of language –Define a precise, unambiguous and uniform interpretation.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Lecture 03: Theory of Automata:08 Finite Automata.
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
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.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
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 # 22. PDA of language {a n b n : n=0,1,2,3, …}
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.
Lecture 04: Theory of Automata:08 Transition Graphs.
Lecture # 4.
CSC312 Automata Theory Lecture # 8 Chapter # 5 (Cont…) Finite Automata.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
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.
Lecture 03: Theory of Automata:2014 Asif Nawaz Theory of Automata.
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.
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.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
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.
Transition Graphs.
Generalized Transition Graphs
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Pushdown Automata.
Lecture 9 Theory of AUTOMATA
[Week#03,04] (b) - Finite Automata
Chapter 2 FINITE AUTOMATA.
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.
NFAs and Transition Graphs
Finite Automata.
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 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 Chapter # 5 by Cohen Finite Automata
CSC312 Automata Theory Transition Graphs Lecture # 9
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 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.
NFAs and Transition Graphs
Chapter # 5 by Cohen (Cont…)
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.
Presentation transcript:

Lecture # 8 (Transition Graphs)

Example Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. The language L may be expressed by RE The language L may be expressed by RE (a+b)* (aaa + bbb) (a+b)* This language may be accepted by the following TG This language may be accepted by the following TG

Example Continued …

OR

OR

Example Consider the language L of strings, defined over Σ = {a, b}, beginning and ending in different letters. Consider the language L of strings, defined over Σ = {a, b}, beginning and ending in different letters. The language L may be expressed by RE The language L may be expressed by RE a(a + b)*b + b(a + b)*a The language L may be accepted by the following TG The language L may be accepted by the following TG

Example continued …

Example Consider the Language L of strings of length two or more, defined over Σ = {a, b}, beginning with and ending in same letters. Consider the Language L of strings of length two or more, defined over Σ = {a, b}, beginning with and ending in same letters. The language L may be expressed by the following regular expression The language L may be expressed by the following regular expression a(a + b)*a + b(a + b)*b This language may be accepted by the following TG This language may be accepted by the following TG

Example Continued …

Example Consider the EVEN-EVEN language, defined over Σ={a, b}. Consider the EVEN-EVEN language, defined over Σ={a, b}. As discussed earlier that EVEN-EVEN language can be expressed by a regular expression As discussed earlier that EVEN-EVEN language can be expressed by a regular expression ( aa + bb + (ab+ba)(aa+bb)*(ab+ba) )* ( aa + bb + (ab+ba)(aa+bb)*(ab+ba) )* The language EVEN-EVEN may be accepted by the following TG The language EVEN-EVEN may be accepted by the following TG

Example continued …

Example Consider the language L, defined over Σ={a, b}, in which a’s occur only in even clumps (bundles) and that ends in three or more b’s. Consider the language L, defined over Σ={a, b}, in which a’s occur only in even clumps (bundles) and that ends in three or more b’s. The language L can be expressed by its regular expression The language L can be expressed by its regular expression (aa)*b (b*+(aa(aa)*b)*) bb OR OR (aa)*b (b*+( (aa) + b)*) bb The language L may be accepted by the following TG The language L may be accepted by the following TG

Example Continued …

Example Consider the following TG Consider the following TG

Example Continued … Consider the string abbbabbbabba. It may be observed that the above string traces the following three paths, (using the states) Consider the string abbbabbbabba. It may be observed that the above string traces the following three paths, (using the states) (a)(b) (b) (b) (ab) (bb) (a) (bb) (a) (a)(b) (b) (b) (ab) (bb) (a) (bb) (a) (-)(4)(4)(+)(+)(3)(2)(2)(1)(+) (-)(4)(4)(+)(+)(3)(2)(2)(1)(+) (a)(b) ((b)(b)) (ab) (bb) (a) (bb) (a) (a)(b) ((b)(b)) (ab) (bb) (a) (bb) (a) (-)(4)(+)(+)(+)(3)(2)(2)(1)(+) (-)(4)(+)(+)(+)(3)(2)(2)(1)(+) (a) ((b) (b)) (b) (ab) (bb) (a) (bb) (a) (a) ((b) (b)) (b) (ab) (bb) (a) (bb) (a) (-) (4)(4)(4)(+) (3)(2)(2)(1)(+) (-) (4)(4)(4)(+) (3)(2)(2)(1)(+)

Example Continued … Which shows that all these paths are successful, (i.e. the path starting from an initial state and ending in a final state). Which shows that all these paths are successful, (i.e. the path starting from an initial state and ending in a final state). Hence the string abbbabbbabba is accepted by the given TG. Hence the string abbbabbbabba is accepted by the given TG.

Generalized Transition Graphs A generalized transition graph (GTG) is a collection of three things: A generalized transition graph (GTG) is a collection of three things: 1. Finite number of states, at least one of which is start state and some (maybe none) final states. 2. Finite set of input letters (Σ) from which input strings are formed. 3. Directed edges connecting some pair of states labeled with regular expression It may be noted that in GTG, the labels of transition edges are corresponding regular expressions

Example Consider the language L of strings, defined over Σ={a,b}, containing double a or double b. Consider the language L of strings, defined over Σ={a,b}, containing double a or double b. The language L can be expressed by the following regular expression The language L can be expressed by the following regular expression (a+b)* (aa + bb) (a+b)* The language L may be accepted by the following GTG. The language L may be accepted by the following GTG.

Example continued … Or Or

Example Consider the Language L of strings, defined over Σ = {a, b}, beginning with and ending in same letters excluding Λ. Consider the Language L of strings, defined over Σ = {a, b}, beginning with and ending in same letters excluding Λ. The language L may be expressed by the following regular expression The language L may be expressed by the following regular expression (a + b) + a(a + b)*a + b(a + b)*b This language may be accepted by the following GTG This language may be accepted by the following GTG

Example

Example Consider the language L of strings of, defined over Σ = {a, b}, beginning and ending in different letters. Consider the language L of strings of, defined over Σ = {a, b}, beginning and ending in different letters. The language L may be expressed by RE a(a + b)*b + b(a + b)*a The language L may be expressed by RE a(a + b)*b + b(a + b)*a The language L may be accepted by the following GTG The language L may be accepted by the following GTG

Example Continued … Another option of GTG for above language L Another option of GTG for above language L

Example Continued …

Example Consider the language L of strings, defined over Σ={a, b}, having triple a or triple b. Consider the language L of strings, defined over Σ={a, b}, having triple a or triple b. The language L may be expressed by RE (a+b)* (aaa + bbb) (a+b)* The language L may be expressed by RE (a+b)* (aaa + bbb) (a+b)* This language may be accepted by the following GTG This language may be accepted by the following GTG

Example Continued … OR

NonDeterminism TGs and GTGs provide certain relaxations i.e. there may exist more than one path for a certain string or there may not be any path for a certain string, this property creates nondeterminism and it can also help in differentiating TGs or GTGs from FAs. TGs and GTGs provide certain relaxations i.e. there may exist more than one path for a certain string or there may not be any path for a certain string, this property creates nondeterminism and it can also help in differentiating TGs or GTGs from FAs. Hence an FA is also called a Deterministic Finite Automaton (DFA). Hence an FA is also called a Deterministic Finite Automaton (DFA).

Kleene’s Theorem If a language can be expressed by 1. FA or 2. TG or 3. RE then it can also be expressed by other two as well. It may be noted that the theorem is proved, proving the following three parts It may be noted that the theorem is proved, proving the following three parts

Kleene’s Theorem continued … Kleene’s Theorem Part I Kleene’s Theorem Part I If a language can be accepted by an FA then it can be accepted by a TG as well. Kleene’s Theorem Part II Kleene’s Theorem Part II If a language can be accepted by a TG then it can be expressed by an RE as well. Kleene’s Theorem Part III Kleene’s Theorem Part III If a language can be expressed by a RE then it can be accepted by an FA as well

Kleene’s Theorem continued … Proof(Kleene’s Theorem Part I) Proof(Kleene’s Theorem Part I) Since every FA can be considered to be a TG as well, therefore there is nothing to prove.

Thank You…