Nmims TCS CH 1
Nmims TCS CH 1
Nmims TCS CH 1
If ∑ = {0, 1} then,
∑0 = {ε}
∑1 = {0, 1}
∑2 = {00, 01, 10, 11}
∑3 = {000, 001, 010, 011, 100, 101, 110, 111}
Kleen Closure
• The set of all the strings over an alphabet ∑ is called kleen closure of ∑
& is denoted by ∑*. Thus, kleen closure is set of all the strings over
alphabet ∑ with length 0 or more.
• ∴∑* = ∑0 ∪ ∑1 ∪ ∑2 ∪ ∑3 ∪……………
• E.g. A = {0}
• A* = {0n / n = 0, 1, 2, …}
Positive Closure
• The set of all the strings over an alphabet ∑, except the empty string
is called positive closure and is denoted by ∑+.
• ∴∑+ = ∑1 ∪ ∑2 ∪ ∑3 ∪ ……………
Language
• A language L over an alphabet ∑ is subset of all the strings that can be formed out of ∑; i.e. a
language is subset of kleen closure over an alphabet ∑; L ⊆ ∑*. (Set of strings chosen from ∑*
defines language).
For example;
• Set of all strings over ∑ = {0, 1} with equal number of 0’s & 1’s.
L = {ε, 01, 0011, 000111, ………}
• φ is an empty language & is a language over any alphabet.
• {ε} is a language consisting of only empty string.
• Set of binary numbers whose value is a prime:
L = {10, 11, 101, 111, 1011, ……}
ConcatenationofStrings
Prefix of a string
• A string s is called a prefix of a string w if it is obtained by removing 0
or more trailing symbols of w. For example; w = abcd s = abc is prefix
of w,
Substring
• A string s is called substring of a string w if it is obtained by removing
0 or more leading or trailing symbols in w. It is proper substring of w if
s ≠ w.
• If s is a string then Substr (s, i, j) is substring of s beginning at ith
position & ending at jth position both inclusive.
Problem
• A problem is the question of deciding whether a given string is a
member of some particular language.
• In other words, if ∑ is an alphabet & L is a language over ∑, then
problem is
• Given a string w in ∑*, decide whether or not w is in L.
Tutorial 0
1. 2.
Chomsky Hierarchy
Application of automata in compiler construction
In automata theory, the main focus is on the study of automata, which are
mathematical models of computation. These automata are used to describe and
analyze various computational processes, such as the behavior of computer
programs and the recognition of patterns in text or other data.
Automata theory has many applications, including the design and analysis of
programming languages, the development of compilers and interpreters, the
construction of efficient algorithms for problem-solving, and the analysis of
natural language processing and machine learning. It is a fundamental area of
study for computer science and is essential for the development of modern
computer systems.
Application of automata in compiler construction
Finite Automata
a. Recognizing patterns in text or other data
b. Implementing regular expressions in programming languages
c. Validating input in form fields on websites
d. Modeling digital circuits and switching systems
e. Designing and analyzing computer algorithms and programs
f. Building compilers and interpreters
g. Analyzing the behavior of software and hardware systems
h. Verifying the correctness of software and hardware systems
i. Developing language models and machine learning algorithms
j. Studying formal languages and their properties
https://www.tutorialspoint.com/compiler_design/compile
r_design_syntax_analysis.htm
https://www.javatpoint.com/application-of-different-automata-theory-of-
computation#:~:text=Automata%20theory%20has%20many%20applications,language
%20processing%20and%20machine%20learning.
Thank You