1
Welcome to !
Theory Of Automata
2
What does automata mean?
It is the plural of automaton, and it means
“something that works automatically”
3
Introduction to languages
There are two types of languages
Formal Languages (Syntactic languages)
Informal Languages (Semantic
languages)
4
Alphabets
Definition:
A finite non-empty set of symbols (letters), is
called an alphabet. It is denoted by Σ ( Greek
letter sigma).
Example:
Σ={a,b}
Σ={0,1} //important as this is the language
//which the computer understands.
Σ={i,j,k}
5
NOTE:
 A certain version of language ALGOL has
113 letters
Σ (alphabet) includes letters, digits and a
variety of operators including sequential
operators such as GOTO and IF
6
Strings
Definition:
Concatenation of finite symbols from the
alphabet is called a string.
Example:
If Σ= {a,b} then
a, abab, aaabb, ababababababababab
7
NOTE:
EMPTY STRING or NULL STRING
Sometimes a string with no symbol at all is
used, denoted by (Small Greek letter Lambda)
λ or (Capital Greek letter Lambda) Λ, is called
an empty string or null string.
The capital lambda will mostly be used to
denote the empty string, in further discussion.
8
Words
 Definition:
Words are strings belonging to some
language.
Example:
If Σ= {x} then a language L can be
defined as
L={xn : n=1,2,3,…..} or L={x,xx,xxx,….}
Here x,xx,… are the words of L
9
NOTE:
All words are strings, but not all strings
are words.
10
Valid/In-valid alphabets
While defining an alphabet, an alphabet may
contain letters consisting of group of symbols
for example Σ1= {B, aB, bab, d}.
 Now consider an alphabet
Σ2= {B, Ba, bab, d} and a string BababB.
11
This string can be tokenized in two different
ways
(Ba), (bab), (B)
 (B), (abab), (B)
Which shows that the second group cannot
be identified as a Word, defined over
Σ = {a, b}.
12
As when this string is scanned by the
compiler (Lexical Analyzer), first symbol B is
identified as a letter belonging to Σ, while for
the second letter the lexical analyzer would
not be able to identify, so while defining an
alphabet it should be kept in mind that
ambiguity should not be created.
13
Remarks:
While defining an alphabet of letters
consisting of more than one symbols, no
letter should be started with the letter of the
same alphabet i.e. one letter should not be
the prefix of another. However, a letter may
be ended in the letter of same alphabet i.e.
one letter may be the suffix of another.
14
Conclusion
Σ1= {B, aB, bab, d}
Σ2= {B, Ba, bab, d}
Σ1 is a valid alphabet while Σ2 is an in-valid
alphabet.
15
Length of Strings
Definition:
The length of string s, denoted by |s|, is the
number of letters in the string.
Example:
Σ={a,b}
s=ababa
|s|=5
16
Example:
Σ= {B, aB, bab, d}
s=BaBbabd
Tokenizing=(B), (aB), (bab), (d)
|s|=4
17
Reverse of a String
Definition:
The reverse of a string s denoted by Rev(s)
or sr, is obtained by writing the letters of s
in reverse order.
Example:
If s=abc is a string defined over Σ={a,b,c}
then Rev(s) or sr = cba
18
Example:
Σ= {B, aB, bab, d}
s=BaBbabBd
Rev(s)=dBbabaBB
19
Lecture 2
Defining Languages
The languages can be defined in different
ways , such as Descriptive definition,
Recursive definition, using Regular
Expressions(RE) and using Finite
Automaton(FA) etc.
Descriptive definition of language:
The language is defined, describing the
conditions imposed on its words.
20
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, …}
21
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,…}
22
Example: The language EQUAL, of strings with
number of a’s equal to 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,…}
23
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 EVEN, of stings
defined over Σ={-,0,1,2,3,4,5,6,7,8,9}, can
be written as
EVEN = { …,-4,-2,0,2,4,…}
24
Example: The language {an
bn
}, of strings
defined over Σ={a,b}, as
{an
bn
: n=1,2,3,…}, can be written as
{ab, aabb, aaabbb,aaaabbbb,…}
Example: The language {an
bn
an
}, of strings
defined over Σ={a,b}, as
{an
bn
an
: n=1,2,3,…}, can be written as
{aba, aabbaa, aaabbbaaa,aaaabbbbaaaa,…}
25
Example: The language factorial, of strings
defined over Σ={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.
26
Example: The language DOUBLEFACTORIAL,
of strings defined over Σ={a, b}, as
{an!
bn!
: n=1,2,3,…}, can be written as
{ab, aabb, aaaaaabbbbbb,…}
Example: The language SQUARE, of strings
defined over Σ={a}, as
{an2
: n=1,2,3,…}, can be written as
{a, aaaa, aaaaaaaaa,…}
27
Example: The language
DOUBLESQUARE, of strings defined
over Σ={a,b}, as
{an2
bn2
: n=1,2,3,…}, can be written as
{ab, aaaabbbb, aaaaaaaaabbbbbbbbb,…}

More Related Content

PPT
Introducton to computer theory/theory of automata.pptx
PDF
Theory of Automata ___ Basis ...........
PPT
Theory of Automata - Power Point Slides Lecture 01).ppt
PPT
Lesson 01 for Computer Science Data Analysis
PPT
Theory of Automata Lesson 01
PPT
Theory of Automata
PPT
Lecture 1,2
PPT
Lesson-01-29092022-081117pm.ppt
Introducton to computer theory/theory of automata.pptx
Theory of Automata ___ Basis ...........
Theory of Automata - Power Point Slides Lecture 01).ppt
Lesson 01 for Computer Science Data Analysis
Theory of Automata Lesson 01
Theory of Automata
Lecture 1,2
Lesson-01-29092022-081117pm.ppt

Similar to Lesson 01.ppt (20)

PPT
Lesson 01.ppt theory of automata including basics of it
PDF
Language
PPTX
Theory of automata and formal language
PPT
Lec-02 Languages for finite automata FA
PPTX
Assignment 1 for the students of bscs.pptx
PPT
Introduction to Automata Theory
PDF
Regular Expression
PDF
01-Introduction&Languages.pdf
PPT
Theory of Automata Lesson 02
PPTX
theory of computation lecture 02
PPT
Lesson 03.ppt theory of automata including basics of it
PPT
Lecture 3,4
PPT
Lecture 3,4
PPT
Lesson 02.ppt theory of automata including basics of it
PPTX
L_2_apl.pptx
PPT
Lesson 02.ppt computer science data analysis
PPT
10651372.ppt
PPT
PPT
Lesson 02
PPT
COMPUTER SCIENCE IT IS VERY HELP FUL
Lesson 01.ppt theory of automata including basics of it
Language
Theory of automata and formal language
Lec-02 Languages for finite automata FA
Assignment 1 for the students of bscs.pptx
Introduction to Automata Theory
Regular Expression
01-Introduction&Languages.pdf
Theory of Automata Lesson 02
theory of computation lecture 02
Lesson 03.ppt theory of automata including basics of it
Lecture 3,4
Lecture 3,4
Lesson 02.ppt theory of automata including basics of it
L_2_apl.pptx
Lesson 02.ppt computer science data analysis
10651372.ppt
Lesson 02
COMPUTER SCIENCE IT IS VERY HELP FUL
Ad

More from ImXaib (20)

PPTX
cellular-communication-system presentation.pptx
PPTX
informationandnetworksecurity16transpositionciphers-210723152730.pptx
PPTX
ALI HAMZAH PRESENTATION ON INFO SECURITY.pptx
PPTX
Advance Machine Learning presentation.pptx
PPTX
NEW METHODOLOGIES FOR IDENTIFYING CUSTOMER NEEDS FROM USER-GENERATED CONTENTS...
PPTX
ERD introduction in databases model.pptx
PPTX
SDA presentation the basics of computer science .pptx
PPTX
terminal a clear presentation on the topic.pptx
PPTX
What is Machine Learning_updated documents.pptx
PPTX
Grid Computing and it's applications.PPTX
PDF
Firewall.pdf
PPT
4966709.ppt
PPT
lecture2.ppt
PPTX
Tools.pptx
PPT
lec3_10.ppt
PPT
ch12.ppt
PPT
Fullandparavirtualization.ppt
PPT
mis9_ch08_ppt.ppt
PPT
rooster-ipsecindepth.ppt
PPT
Policy formation and enforcement.ppt
cellular-communication-system presentation.pptx
informationandnetworksecurity16transpositionciphers-210723152730.pptx
ALI HAMZAH PRESENTATION ON INFO SECURITY.pptx
Advance Machine Learning presentation.pptx
NEW METHODOLOGIES FOR IDENTIFYING CUSTOMER NEEDS FROM USER-GENERATED CONTENTS...
ERD introduction in databases model.pptx
SDA presentation the basics of computer science .pptx
terminal a clear presentation on the topic.pptx
What is Machine Learning_updated documents.pptx
Grid Computing and it's applications.PPTX
Firewall.pdf
4966709.ppt
lecture2.ppt
Tools.pptx
lec3_10.ppt
ch12.ppt
Fullandparavirtualization.ppt
mis9_ch08_ppt.ppt
rooster-ipsecindepth.ppt
Policy formation and enforcement.ppt
Ad

Recently uploaded (20)

PDF
GIÁO ÁN TIẾNG ANH 7 GLOBAL SUCCESS (CẢ NĂM) THEO CÔNG VĂN 5512 (2 CỘT) NĂM HỌ...
PPTX
Math 2 Quarter 2 Week 1 Matatag Curriculum
PDF
anganwadi services for the b.sc nursing and GNM
PDF
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
PPTX
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
PDF
Unleashing the Potential of the Cultural and creative industries
PDF
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf
PDF
FYJC - Chemistry textbook - standard 11.
DOCX
EDUCATIONAL ASSESSMENT ASSIGNMENT SEMESTER MAY 2025.docx
PDF
English 2nd semesteNotesh biology biopsy results from the other day and I jus...
PDF
IS1343_2012...........................pdf
PPTX
GW4 BioMed Candidate Support Webinar 2025
PDF
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
PDF
GSA-Past-Papers-2010-2024-2.pdf CSS examination
PPTX
Diploma pharmaceutics notes..helps diploma students
PPTX
Theoretical for class.pptxgshdhddhdhdhgd
PPTX
pharmaceutics-1unit-1-221214121936-550b56aa.pptx
PDF
CHALLENGES FACED BY TEACHERS WHEN TEACHING LEARNERS WITH DEVELOPMENTAL DISABI...
DOCX
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
PDF
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
GIÁO ÁN TIẾNG ANH 7 GLOBAL SUCCESS (CẢ NĂM) THEO CÔNG VĂN 5512 (2 CỘT) NĂM HỌ...
Math 2 Quarter 2 Week 1 Matatag Curriculum
anganwadi services for the b.sc nursing and GNM
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
Unleashing the Potential of the Cultural and creative industries
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf
FYJC - Chemistry textbook - standard 11.
EDUCATIONAL ASSESSMENT ASSIGNMENT SEMESTER MAY 2025.docx
English 2nd semesteNotesh biology biopsy results from the other day and I jus...
IS1343_2012...........................pdf
GW4 BioMed Candidate Support Webinar 2025
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
GSA-Past-Papers-2010-2024-2.pdf CSS examination
Diploma pharmaceutics notes..helps diploma students
Theoretical for class.pptxgshdhddhdhdhgd
pharmaceutics-1unit-1-221214121936-550b56aa.pptx
CHALLENGES FACED BY TEACHERS WHEN TEACHING LEARNERS WITH DEVELOPMENTAL DISABI...
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf

Lesson 01.ppt

  • 1. 1 Welcome to ! Theory Of Automata
  • 2. 2 What does automata mean? It is the plural of automaton, and it means “something that works automatically”
  • 3. 3 Introduction to languages There are two types of languages Formal Languages (Syntactic languages) Informal Languages (Semantic languages)
  • 4. 4 Alphabets Definition: A finite non-empty set of symbols (letters), is called an alphabet. It is denoted by Σ ( Greek letter sigma). Example: Σ={a,b} Σ={0,1} //important as this is the language //which the computer understands. Σ={i,j,k}
  • 5. 5 NOTE:  A certain version of language ALGOL has 113 letters Σ (alphabet) includes letters, digits and a variety of operators including sequential operators such as GOTO and IF
  • 6. 6 Strings Definition: Concatenation of finite symbols from the alphabet is called a string. Example: If Σ= {a,b} then a, abab, aaabb, ababababababababab
  • 7. 7 NOTE: EMPTY STRING or NULL STRING Sometimes a string with no symbol at all is used, denoted by (Small Greek letter Lambda) λ or (Capital Greek letter Lambda) Λ, is called an empty string or null string. The capital lambda will mostly be used to denote the empty string, in further discussion.
  • 8. 8 Words  Definition: Words are strings belonging to some language. Example: If Σ= {x} then a language L can be defined as L={xn : n=1,2,3,…..} or L={x,xx,xxx,….} Here x,xx,… are the words of L
  • 9. 9 NOTE: All words are strings, but not all strings are words.
  • 10. 10 Valid/In-valid alphabets While defining an alphabet, an alphabet may contain letters consisting of group of symbols for example Σ1= {B, aB, bab, d}.  Now consider an alphabet Σ2= {B, Ba, bab, d} and a string BababB.
  • 11. 11 This string can be tokenized in two different ways (Ba), (bab), (B)  (B), (abab), (B) Which shows that the second group cannot be identified as a Word, defined over Σ = {a, b}.
  • 12. 12 As when this string is scanned by the compiler (Lexical Analyzer), first symbol B is identified as a letter belonging to Σ, while for the second letter the lexical analyzer would not be able to identify, so while defining an alphabet it should be kept in mind that ambiguity should not be created.
  • 13. 13 Remarks: While defining an alphabet of letters consisting of more than one symbols, no letter should be started with the letter of the same alphabet i.e. one letter should not be the prefix of another. However, a letter may be ended in the letter of same alphabet i.e. one letter may be the suffix of another.
  • 14. 14 Conclusion Σ1= {B, aB, bab, d} Σ2= {B, Ba, bab, d} Σ1 is a valid alphabet while Σ2 is an in-valid alphabet.
  • 15. 15 Length of Strings Definition: The length of string s, denoted by |s|, is the number of letters in the string. Example: Σ={a,b} s=ababa |s|=5
  • 16. 16 Example: Σ= {B, aB, bab, d} s=BaBbabd Tokenizing=(B), (aB), (bab), (d) |s|=4
  • 17. 17 Reverse of a String Definition: The reverse of a string s denoted by Rev(s) or sr, is obtained by writing the letters of s in reverse order. Example: If s=abc is a string defined over Σ={a,b,c} then Rev(s) or sr = cba
  • 18. 18 Example: Σ= {B, aB, bab, d} s=BaBbabBd Rev(s)=dBbabaBB
  • 19. 19 Lecture 2 Defining Languages The languages can be defined in different ways , such as Descriptive definition, Recursive definition, using Regular Expressions(RE) and using Finite Automaton(FA) etc. Descriptive definition of language: The language is defined, describing the conditions imposed on its words.
  • 20. 20 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, …}
  • 21. 21 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,…}
  • 22. 22 Example: The language EQUAL, of strings with number of a’s equal to 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,…}
  • 23. 23 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 EVEN, of stings defined over Σ={-,0,1,2,3,4,5,6,7,8,9}, can be written as EVEN = { …,-4,-2,0,2,4,…}
  • 24. 24 Example: The language {an bn }, of strings defined over Σ={a,b}, as {an bn : n=1,2,3,…}, can be written as {ab, aabb, aaabbb,aaaabbbb,…} Example: The language {an bn an }, of strings defined over Σ={a,b}, as {an bn an : n=1,2,3,…}, can be written as {aba, aabbaa, aaabbbaaa,aaaabbbbaaaa,…}
  • 25. 25 Example: The language factorial, of strings defined over Σ={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.
  • 26. 26 Example: The language DOUBLEFACTORIAL, of strings defined over Σ={a, b}, as {an! bn! : n=1,2,3,…}, can be written as {ab, aabb, aaaaaabbbbbb,…} Example: The language SQUARE, of strings defined over Σ={a}, as {an2 : n=1,2,3,…}, can be written as {a, aaaa, aaaaaaaaa,…}
  • 27. 27 Example: The language DOUBLESQUARE, of strings defined over Σ={a,b}, as {an2 bn2 : n=1,2,3,…}, can be written as {ab, aaaabbbb, aaaaaaaaabbbbbbbbb,…}