CSC312 Automata Theory Lecture # 3 Languages-II.

Slides:



Advertisements
Similar presentations
Properties of Regular Languages
Advertisements

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.
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 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
L ECTURE 2 Chapter 3 Recursive Definitions. R ECURSIVE D EFINITION It is method of defining sets.
Theory Of Automata By Dr. MM Alam
Second lecture REGULAR EXPRESSION. Regular Expression.
Theory Of Automata By Dr. MM Alam
Lecture # 1 (Automata Theory)
Theory of Automata.
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.
L ECTURE 1 T HEORY OF A UTOMATA. P RAGMATICS  Pre-Requisites  No Pre-Requisite  Text book  Introduction to Computer Theory by Daniel I.A. Cohen 
Formal Methods in SE Theory of Automata Qasiar Javaid Assistant Professor Lecture # 06.
Lecture Two: Formal Languages Formal Languages, Lecture 2, slide 1 Amjad Ali.
Introduction to Theory of Automata
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.
Lecture # 3 Regular Expressions 1. Introduction In computing, a regular expression provides a concise and flexible means to "match" (specify and recognize)
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
Lecture-2 Recap Lecture-1
L ECTURE 3 Chapter 4 Regular Expressions. I MPORTANT T ERMS Regular Expressions Regular Languages Finite Representations.
Regular Grammars Chapter 7. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Recursive Definitions & Regular Expressions (RE)
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
Lecture 02: Theory of Automata:08 Theory of Automata.
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
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.
Lecture 2 Theory of AUTOMATA
1 Strings and Languages Lecture 2-3 Ref. Handout p12-17.
Lecture 02: Theory of Automata:2014 Asif Nawaz Theory of Automata.
Lecture 03: Theory of Automata:2014 Asif Nawaz Theory of Automata.
CHAPTER TWO LANGUAGES By Dr Zalmiyah Zakaria.
Lecture # 8 (Transition Graphs). Example Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. Consider.
By Dr.Hamed Alrjoub. 1. Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc., 1991, Second Edition 2. Introduction to Languages.
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.
Lecture 17: Theory of Automata:2014 Context Free Grammars.
Chapter 1 INTRODUCTION TO THE THEORY OF COMPUTATION.
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 #
Lecture # 2.
Language Theory Module 03.1 COP4020 – Programming Language Concepts Dr. Manuel E. Bermudez.
Lecture 1 Theory of Automata
Theory of Automata Course: Theory of Automata
Theory of Automata.
Regular Expressions (Examples)
PROGRAMMING LANGUAGES
[Week#03,04] (b) - Finite Automata
COP4620 – Programming Language Translators Dr. Manuel E. Bermudez
CSC312 Automata Theory Lecture # 4 Languages-III.
Chapter 7 Regular Grammars
Pumping Lemma.
MA/CSSE 474 Theory of Computation Minimizing DFSMs.
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
Recap lecture 25 Intersection of two regular languages is regular, examples, non regular languages, example.
CSC312 Automata Theory Lecture # 5 Chapter # 4 Cont…
Chapter # 5 by Cohen (Cont…)
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
CSC312 Automata Theory Lecture # 2 Languages.
Recap Lecture 4 Regular expression of EVEN-EVEN language, Difference between a* + b* and (a+b)*, Equivalent regular expressions; sum, product and closure.
Welcome to ! Theory Of Automata Irum Feroz
LECTURE # 07.
Presentation transcript:

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. The word "formal” refers to the fact that all the rules for the language are explicitly stated in terms of what strings of symbols can occur. Language will be considered solely as symbols on paper and not as expressions of ideas in the minds of humans. The term "formal" used here emphasizes that it is the form of the string of symbols we are interested in, not the meaning.

Descriptive definition of Languages The language is defined, describing the conditions imposed on its words. Example: The language L of strings of odd length, defined over Σ={a}, can be written as L={a, aaa, aaaaa,…..} Example: The language L of strings that does not start with a, defined over Σ ={a,b,c}, can be written as L ={Λ, b, c, ba, bb, bc, ca, cb, cc, …}

Descriptive definition of Languages Example:The language L of strings of length 2, defined over Σ ={0,1,2}, can be written as L={00, 01, 02,10, 11,12,20,21,22} Example: The language L of strings ending in 0, defined over Σ ={0,1}, can be written as L={0,00,10,000,010,100,110,…} Example:The language EQUAL, of strings with number of a’s equal to the number of b’s, defined over Σ={a,b}, can be written as {Λ , ab, aabb, abab, baba, abba,…}

Example: The language EVEN-EVEN, of strings with even number of a’s and even number of b’s, defined over Σ={a,b}, can be written as {Λ, aa, bb, aaaa, aabb, abab, abba, baab, baba, bbaa, bbbb,…} Example: The language INTEGER, of strings defined over Σ={-,0,1,2,3,4,5,6,7,8,9}, can be written as INTEGER = {…,-2,-1,0,1,2,…}

Example: The language {anbn }, of strings defined over Σ={a,b}, as {an bn : n=1,2,3,…}, can be written as {ab, aabb, aaabbb,aaaabbbb,…} Example: The language {anbnan }, of strings defined over Σ={a,b}, as {an bn an: n=1,2,3,…}, can be written as {aba, aabbaa, aaabbbaaa,aaaabbbbaaaa,…}

Example: The language factorial, of strings defined over Σ={0,1,2,3,4,5,6,7,8,9} i.e. {1,2,6,24,120,…} Example: The language FACTORIAL, of strings defined over Σ={a}, as {an! : n=1,2,3,…}, can be written as {a,aa,aaaaaa,…}. It is to be noted that the language FACTORIAL can be defined over any single letter alphabet.

Example: The language DOUBLEFACTORIAL, of strings defined over Σ={a, b}, as {an!bn! : n=1,2,3,…}, can be written as {ab, aabb, aaaaaabbbbbb,…} The language SQUARE, of strings defined over Σ={a}, as { : n=1,2,3,…}, can be written as {a, aaaa, aaaaaaaaa,…}

PALINDROME The language consisting of Λ and the strings s defined over Σ such that Rev(s)=s. It is to be noted that the words of PALINDROME are called palindromes. Example: For Σ={a,b}, PALINDROME={Λ , a, b, aa, bb, aaa, aba, bab, bbb, ...} Remark: There are as many palindromes of length 2n as there are of length 2n-1.

Practice Questions See examples on page- 14, 15, 17 Exercise Ch # 2, p-19. Questions: 1, 2, 3, 4, 5