2. Syllabus
Theory of Computation: Regular languages and finite automata,
context-free languages & pushdown automata, recursively
enumerable sets & Turing machines, undecidability
4. Basic Terminologies
● Symbol: A symbol is the smallest building block, which can be any
alphabet, letter, or picture.
● Alphabets: They are a set of symbols, which are always finite.
Example: Alphabets of binary digits, decimal digits.
5. Basic Terminologies
● String: A string is a finite sequence of symbols from some alphabet.
● A string is generally denoted as w and the length of a string is denoted
as |w|.
● List out strings having length in the alphabet set containing {a,b}.
6. Basic Terminologies
● For alphabet {a, b} with length n, number of strings can be generated = 2n
● General case: If the number of symbols in the alphabet Σ is represented by |Σ|,
then a number of strings of length n, possible over Σ is |Σ|n
7. Basic Terminologies
● Closure Representation
○ L+: It is a Positive Closure that represents a set of all strings
except Null or ε-strings.
8. Basic Terminologies
● Closure Representation
○ L*: It is “Kleene Closure”, that represents the occurrence of certain
alphabets for given language alphabets from zero to the infinite
number of times.
12. Basic Terminologies
● A language is a set of strings, chosen from some Σ*
● A language is a subset of Σ* ‘.
● A language that can be formed over ‘ Σ ‘ can be Finite or
Infinite.
13. Basic Terminologies
● Finite – List out string of length 2 in the alphabet {a,b}*
● Infinite – List out string starting with a in the alphabet {a,b}*
14. Regular Expression
● Regular Expressions are patterns that are used to denote
languages.
● An expression is regular if:
○ ɸ is a regular expression for regular language ɸ.
○ ɛ is a regular expression for regular language {ɛ}.
○ If a ∈ Σ , a is regular expression with language {a}.
15. Regular Expression
● An expression is regular if:
○ If a and b are regular expression, a + b is also a regular
expression with language {a,b}.
○ If a and b are regular expression, ab (concatenation of a
and b) is also regular.
○ If a is regular expression, a* (0 or more times a) is also
regular.
22. Question - 1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
(B) The set of all strings containing at most two 0’s.
(C) The set of all strings containing at least two 0’s.
(D) The set of all strings that begin and end with either 0 or 1.
23. Question - 1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
24. Question - 1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(B) The set of all strings containing at most two 0’s.
25. Question - 1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(D) The set of all strings that begin and end with either 0 or 1.
26. Question - 1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(C) The set of all strings containing at least two 0’s.
27. Question - 1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
(B) The set of all strings containing at most two 0’s.
(C) The set of all strings containing at least two 0’s.
(D) The set of all strings that begin and end with either 0 or 1.