Established as per the Section 2(f) of the UGC Act, 1956
Approved by AICTE, COA and BCI, New Delhi
Lecture 2.2
Introduction to Automata
School of Computing and Information
Technology
Ms. Shruthi G
[email protected]
AY:2020-2021
OUTLINE
Recap of Previous Lecture
Topic of the Lecture
Lecture Discussion
• Alphabets
• Strings
• Operations on strings
• Languages
• Special Cases
Introduction to Automata
Recap of Previous Lecture
RECAP OF PREVIOUS LECTURE
Introduction to Automata
Course Description
• Definition of Theory of Automata
• Components of Automata
• Classifications of Automata
• The Simple Automaton - Examples
Introduction to Automata
Topic of the Lecture
TOPIC OF THE LECTURE
• Alphabets
Basics of • Strings
Automata • Operations on strings
Theory • Languages
• Special Cases
Introduction to Automata
Alphabets
ALPHABETS
An alphabet is a finite non empty set of symbols denoted by ∑
Examples:
Ʃ1 = {a, b, c, d, …, z}: the set of letters in English
Ʃ2 = {0, 1, …, 9}: the set of (base 10) digits
Ʃ3 = {ASCII Character set}: the alphabet set of programming language
Ʃ4 = {(, )}: the set of open and closed brackets
Ʃ5 = {0,1}: the set of base 2 digits
Ʃ6 = {a, t, g, c}: the set of genetic codes
Ʃ7 = {a, …, z, A,…,Z,_,0,…,9}: the set of symbols that can be used to name
an identifier in C programming language
Introduction to Automata
Strings
STRINGS
A string over an alphabet Ʃ is a zero or more sequence of symbols all of
which are taken from Ʃ.
Strings are generally denoted by last lower case letters of English alphabets
Examples:
w = 9021 is a string over Ʃ1 = {0, 1, …, 9}
x = ab#bc is a string over Ʃ2 = {a, b, …, z, #}
y = ))()(() is a string over Ʃ3 = {(, )}
t = attgccgt is a string over Ʃ4 = {a, t, g, c}
u = _Max09_7 is a string over Ʃ5 = {a,…,z,A,…,Z,0,..,9,_}
v = 0110101 is a string over Ʃ6 = {0,1}
The empty string is denoted by Є OR λ
Introduction to Automata
Operations on Strings
OPERATIONS ON STRINGS
Let x = 01101 and y = 001
Concatenation of Strings : Juxtaposition of symbols of second string at the end of
first string
w1 = x · y = 01101001 and w2 = y · x = 00101101
Reverse of a String : Sequence of symbols of a string in reverse.
xR = 10110 and yR = 100
Length of a String : The number of symbols in the string.
|x| = 5 , |y| = 3 and |x · y| = |01101001| = 8
Substring of a String : It is a subsequence of consecutive characters of a string.
String Substring
abbba bba
0110100 010
ababb a
OPERATIONS ON STRINGS
Prefixes and Suffixes: Let x = 1001 be a string.
Prefixes of x: λ, 1, 10, 100, 1001
w = uv Suffixes of x: 1001, 001, 01, 1, λ
Power Operation wn is the concatenation of string w with itself n number of time.
Example: (abbba)2 = (abbba) . (abbba) = abbbaabbba
Σn = The set of strings over Σ whose length is n.
Example: { a, b }2 = { a, b} . {a, b} = { aa, bb, ab, ba }
The * Operation: The set of all possible strings over an alphabet (∑).
(Star/Kleene Closure) If Σ= { a, b} then Σ* = { λ, a, b, aa, bb, aba, abba, ba, … }
The + Operation: The set of all possible strings over an alphabet ∑ except λ.
( Positive Closure) If Σ = { a, b} then Σ+ = { a, b, aa, bb, aba, abba, ba, … }
Introduction to Automata
Language
LANGUAGE
A language over an alphabet Σ is any subset of Σ*(star closure of the alphabet Σ).
Example: If Σ = { a, b } then Σ* = { λ, a, b, aa, bb, ab, ba, aab, … } and
few Languages over Σ are:
}
L1= { aa, bb, aba }
L2= { a, abb, ba,bb,aa,aaab,λ } Finite Languages
L3= { abba, bab, aaba,a,b,bb }
L4 = { λ }
L5 = { anbn | n ≥ 0 } i.e. { λ, ab, aabb, aaabbb, ….}
L6 = { anbm | n,m ≥ 0 } i.e. { λ, a, b, ab, aa, aab, bb, aaab, …}
}
L7 = { w |w is palindrome over {a, b} } i.e {λ, a, b, aa, bb, aba, …}
Infinite
Languages
Introduction to Automata
Special Cases
SPECIAL CASES
•Ф={}≠{λ}
• |λ| = |ε| =| Ф| = 0
• |{ λ }|= 1
• λ ·w = w ·λ = w
• w0 = λ
• Σ0 = λ
• Σ+ = Σ* - { λ }
• If L is a Language over Σ then L = Σ* L ( Complement of L)
• If L is a Language over Σ then LR = { wR | w є L }
Example: { ab, bba, bab, baa}R = { ba, abb, bab, aab}
If L = { anbn : n≥ 0} then LR = { bnan : n≥ 0}
• L1· L2 = { x·y | x є L1 and y є L2 }
Example: {ab, ba} · {aa, b} = { abaa, abb, baaa, bab }
SPECIAL CASES
• Ln = The set of strings formed by concatenating the Language L with itself
by n number of times.
• L0 = { λ }
• L* = L0 U L1 U L2…….
• L+ = L1 U L2 U L3…….
• L* = L+ U { λ }
Example: if L = { anbn | n≥ 0 } then L2 = ?
2
L = {anbnanbn | n≥ 0 } L2 = {anbnambm | n, m ≥ 0}
L={ λ, ab, aabb, aaabbb, …….}
L2 =L · L = { λ, ab, aabb, aaabbb, …….} · { λ, ab, aabb, aaabbb, …….}
=> L2 = {λ, ab, aabb, aaabbb, …, abab, abaabb,…,aabbab,aabbaabb,…}
SUMMARY OF THE LECTURE
Introduction to Automata
Classification of Automata
Basics of Automata Theory
Special Cases
RESOURCES AND TASK
Optional and non-optional reading resources of the
Lecture
Optional Resources
• https://www.eecs.wsu.edu/~ananth/CptS317/Lectures/index.htm
Web • https://www.geeksforgeeks.org/theory-of-computation-automata-tutorials/
resources • https://www.tutorialspoint.com/automata_theory/automata_theory_introdu
ction.htm
Non-Optional Resources
John E Hopcroft, Rajeev Motwani, Jeffrey D. Ullman, Introduction to Automata
Theory, Languages and Computation, 3rd Edition, Pearson Education, 2009.
Peter Linz, An Introduction to formal Languages and Automata, 4/ E, Jones
and Bartlett Publishers, 2006.
RESOURCES AND TASK
Optional and non-optional tasks to be completed
Optional Task
Turing award is the highest award in the field of computer science. To value
contributions of Alan Turing to Automata theory, one of the automata is named as
Turing machine. Write about contribution of Alan Turing to the field of computer
science.
Non-Optional Task
List various applications of Finite Automata, Push Down Automata and Turing Machine.
SUMMARY OF THE LECTURE
Reading resources for the next lecture
Topic of Next Lecture: Classifications of Finite Automata and Deterministic Finite Automata.
• https://www.eecs.wsu.edu/~ananth/CptS317/Lectures/index.htm
Web • https://www.geeksforgeeks.org/theory-of-computation-automata-tutorials/
resources • https://www.tutorialspoint.com/automata_theory/automata_theory_introduc
tion.htm
John E Hopcroft, Rajeev Motwani, Jeffrey D. Ullman, Introduction to Automata
Theory, Languages and Computation, 3rd Edition, Pearson Education, 2009.
Peter Linz, An Introduction to formal Languages and Automata, 4/ E, Jones
and Bartlett Publishers, 2006.
DISCUSSION
5 MINUTES
What is an alphabet for constructing an arithmetic expression of C language?
QUIZ TIME
10 MINUTES
QUIZ
Questions from Lecture 2.1
1. The more powerful automaton is _______________
A) Deterministic Finite Automata B) Push Down Automata
C) Non deterministic Finite Automata D) Turing Machine
2. Every executable program is an instance of which type of automata?
A) Push Down Automata B) Deterministic Finite Automata
C) Turing Machine D) Non deterministic Finite Automata
QUIZ
Questions from Lecture 2.1
3. Which of the following automata does not use temporary memory
A) Deterministic Finite Automata B) Push Down Automata
C) Non deterministic Finite Automata D) Both A and C
4. Which of the following finite automata use stack as temporary memory?
A) Deterministic Finite Automata B) Push Down Automata
C) Non deterministic Finite Automata D) Turing Machine
QUIZ
Questions from Lecture 2.2
5. Ʃ* is called as _______
A) Star closure B) Kleene closure
C) Both A & B D) Positive closure
6. Positive closure of an alphabet does not include ____
A) Ʃ B) λ
C) ɳ D) ɸ
QUIZ
Questions from Lecture 2.2
7. An alphabet is denoted by the symbol______
A) Ʃ B) λ
C) ɳ D) ɸ
8. If x and y are two strings and |x|=5 and |y|=7 then |x.y| is _____
A) 35 B) 12
C) 5 D) 7
THANK YOU