CSC312 Automata Theory Lecture # 5 Chapter # 4 Cont…

Slides:



Advertisements
Similar presentations
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.
Advertisements

1 Lecture 22 Myhill-Nerode Theorem –distinguishability –equivalence classes of strings –designing FSA’s –proving a language L is not regular.
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.
Transparency No. 7-1 Formal Language and Automata Theory Chapter 7 Limitations of Finite Automata (lecture 11 and 12)
1 Module 24 Myhill-Nerode Theorem –distinguishability –equivalence classes of strings –designing FSA’s –proving a language L is not regular.
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
Second lecture REGULAR EXPRESSION. Regular Expression.
Theory Of Automata By Dr. MM Alam
Lecture # 1 (Automata Theory)
1 Welcome to ! Theory Of Automata. 2 Text and Reference Material 1.Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc., 1991,
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 7 1.
CSC312 Automata Theory Lecture # 2 Languages.
Formal Methods in SE Theory of Automata Qasiar Javaid Assistant Professor Lecture # 06.
1 Language Definitions Lecture # 2. Defining Languages The languages can be defined in different ways, such as Descriptive definition, Recursive definition,
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided by author Slides edited for.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
L ECTURE 3 Chapter 4 Regular Expressions. I MPORTANT T ERMS Regular Expressions Regular Languages Finite Representations.
Recursive Definitions & Regular Expressions (RE)
Lecture 02: Theory of Automata:08 Theory of Automata.
Fundamentals of Informatics
CSC312 Automata Theory Lecture # 3 Languages-II. Formal Language A formal language is a set of words—that is, strings of symbols drawn from a common alphabet.
Recursive Definations Regular Expressions Ch # 4 by Cohen
CSC312 Automata Theory Nonregular Languages Chapter # 10 by Cohen
Finite Automata Chapter 1. Automatic Door Example Top View.
Lecture # Book Introduction to Theory of Computation by Anil Maheshwari Michiel Smid, 2014 “Introduction to computer theory” by Daniel I.A. Cohen.
Lecture # 4.
Mathematical Foundations of Computer Science Chapter 3: Regular Languages and Regular Grammars.
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
Lecture 2 Theory of AUTOMATA
CSC312 Automata Theory Lecture # 8 Chapter # 5 (Cont…) Finite Automata.
Lecture 03: Theory of Automata:2014 Asif Nawaz Theory of Automata.
Lecture 01: Theory of Automata:2013 Asif Nawaz Theory of Automata.
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.
Recap lecture 5 Different notations of transition diagrams, languages of strings of even length, Odd length, starting with b, ending in a (with different.
Pumping Lemma.
Theory of Computation Lecture #
PROGRAMMING LANGUAGES
Generalized Transition Graphs
Lecture 1 Theory of Automata
Recap lecture 33 Example of trees, Polish Notation, examples, Ambiguous CFG, example,
PROGRAMMING LANGUAGES
Theory of Automata.
Regular Expressions (Examples)
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
LANGUAGES Prepared by: Paridah Samsuri Dept. of Software Engineering
Lecture 9 Theory of AUTOMATA
CSC312 Automata Theory Lecture # 4 Languages-III.
Chapter 7 Regular Grammars
NFAs and Transition Graphs
Pumping Lemma.
Instructor: Aaron Roth
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Instructor: Aaron Roth
CSC312 Automata Theory Transition Graphs Lecture # 9
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,
Recap lecture 11 Proof of Kleene’s theorem part II (method with different steps), particular examples of TGs to determine corresponding REs.
RECAP Lecture 7 FA of EVEN EVEN, FA corresponding to finite languages(using both methods), Transition graphs.
NFAs and Transition Graphs
Chapter # 5 by Cohen (Cont…)
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.
CSC312 Automata Theory Lecture # 3 Languages-II.
Welcome to ! Theory Of Automata Irum Feroz
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.
CSC312 Automata Theory Lecture # 24 Chapter # 11 by Cohen Decidability.
Presentation transcript:

CSC312 Automata Theory Lecture # 5 Chapter # 4 Cont…

Definition For regular expressions and

Example Regular expression:

Example Regular expression

Example = { all strings with at least two consecutive 0 } = { all strings without two consecutive 0 }

Regular Languages Definition: The language generated by any regular expression is called a regular language. Note: If r1, r2 are regular expressions, corresponding to the languages L1 and L2 then the languages generated by r1+ r2, r1r2 (or r2r1) and r1*( or r2*) are also regular languages.

Languages Generated by Regular Expressions Regular Languages

Note: All finite languages are regular whereas some infinite languages are regular & some are non-regular. In order to write RE for finite languages just include +’s between the words of finite languages. Consider the alphabet Σ={a,b}. The words of length 1 are two. Its RE will be a+b. Similarly the words of length 2 will be aa,ab,ba,bb. Its RE will be aa+ab+ba+bb or (a+b)(b+a). Similary the languages of all words whose length is 3 will be aaa,aab,aba,abb,bbb,bba,bab,baa. Thus we can conclude that all words of a’s and b’s of any length can be defined by (a+b)*.

EVEN-EVEN Language EVEN-EVEN = { aa bb aaaa aabb abab abba baab baba bbaa bbbb aaaaaa …} In this language we have following three types of strings type1 = aa type2 = bb type3 = (ab+ba)(aa+bb)*(ab+ba) Thus the RE = (type1 +type2 +type3)* = (aa + bb + (ab+ba)(aa+bb)*(ab+ba))*

Equivalent Regular Expressions Definition: Regular expressions and are equivalent if

Check Equality (a+)* = (a*)+ = a* (a*+b)* = (a+b)* (a+b)*ab(a+b)* = (a+b)*a(a+b)*b(a+b)* (a+b)*= (a*+b*)* (a+b)*= (a*b*+b*a*)* (a+b)*= a(a+b)*+b(a+b)*+ (a+b)*= a(a+b)*ab(a+b)*+b*a* (aa+ab*)* = (aa+ab)* a*a* = (aa)* (a+b)*= (a*b*)*

Check Equality (a+)* = (a*)+ = a* (a*+b)* = (a+b)* Yes (a+b)*ab(a+b)* = (a+b)*a(a+b)*b(a+b)* (a+b)*= (a*+b*)* (a+b)*= (a*b*+b*a*)* (aa+ab*)* = (aa+ab)* (a+b)*= a(a+b)*+b(a+b)*+ (a+b)*= a(a+b)*ab(a+b)*+b*a* a*a* = (aa)* (a+b)*= (a*b*)* Yes Yes Yes Yes Yes No – what is missing Yes No No Yes

Practice Questions See examples at p-37, 38, 39, 40, 46, 47 Ch # 4 Exercise p-49. Questions: 2, 3, 4, 5, 6, 7, 8, 9, 10