Professional Documents
Culture Documents
Assignment 1 PDF
Assignment 1 PDF
Assignment-1
March 12, 2019
Problem-1
Write down the regular expressions for the following. The set of input alphabets in
each case is Σ = {a, b}
1. All words in which a appears tripled.
2. All words that contain exactly two b’s or exactly three b’s, not more.
4. All strings in which the letter b is never tripled. This means that no word
contains the substring bbb.
8. All strings in which the total number of a’s is divisible by 3 no matter how they
are distributed, such as aabaabbaba.
Problem-2
9. {ω ϵ {a, b}* : ω contains at least two b’s that are not followed by an a}
Problem-3
1. Give a regular expression for the set of all elements of Σ* containing exactly
two b’s
2. Give a regular expression for the set of all elements of Σ* containing exactly
two b’s and two c’s
3. Give a regular expression for the set of all elements of Σ* containing two or
more b’s
4. Give a regular expression for the set of all elements of Σ* beginning and ending
with a and containing at least one b and one c.
5. Give a regular expression for the set of all elements of Σ* consisting of one or
more a’s, followed by one or more b’s and then one or more c’s.
Problem-4
Write down the regular expressions and draw DFSA also give the transition table for
the following languages.
The set of input alphabets in each case is Σ = {a,b}
1. L = {ω ϵ Σ* | ω contains even number of a’s}.
4. L = {ω ϵ Σ* | |ω| is even}.
Problem-5
Find regular expressions that correspond to the following regular sets: