Theory of Computation
Theory of Computation
1. Construct a DFA accepting the set of strings over {a,b} such that
i. Strings containing atmost 1 a
ii. Strings containing atleast 1 a
Check whether the strings aabab, abbb are valid or not
2. Construct a DFA accepting the set of strings over {a,b} which ends
with a, Check whether the strings ababa, abbbab are valid or not
3. Construct a DFA over the strings of 0’s and 1’s
i. Begins with 01
ii. Ends with 01
iii. Substring 01
NFA Problems
1. Construct an NFA that accepts the strings of a’s and b’s that begins
with ab
2. Construct an NFA that accepts the strings of a’s and b’s that ends
with ab
3. Construct an NFA that accepts the strings of a’s and b’s containing
substring ab
4. Construct an NFA that accepts the strings of 0’s and 1’s which ends
with either 01 or 10
5. Construct NFA for the language L accepting the strings
(abc+ab(cb)*)
6. Construct NFA accepting the strings abc,abd,acd,abcd
7. Construct NFA accepting the strings of 0’s and 1’s such that the 3 rd
symbol from the right end is 1
8. Construct and NFA accepting the strings over {a,b} such that
L={an:n>=0) U {bna:n>=1} with 4 states
9. Draw an NFA in which all the string contains a substring 1110.
10. Draw an NFA with the alphabet over {0,1} accepts all string in
which the third symbol from the right end is always 0.
11. Draw the NFA which accepts any binary string that contains 00
or 11 as a substring.
12. Draw NFA that accepts all binary strings that end with 101.
13. Draw NFA for a*+(ab)*
14. Draw NFA with the alphabet over {0,1} in which each string
must contain “11” followed by “00”.
15. Construct an NFA with the alphabet over {0,1} that accepts all
strings that begin with 1 and end with 0.
16. Construct NFA with the alphabet {0,1} for the language
L={0 1 , where m>=0 and n>=1}.
m n
ε-NFA Problems
1. Construct ε-NFA for the strings ab,aab,abc over the alphabet set
∑={a,b}
2. Construct ε-NFA for the language L=(a+b)*ab
3. Construct ε-NFA for the language L= ab (a+b)*
4. Construct ε-NFA for the language L= (a+b)* aba*
5. Construct ε-NFA for the language L= (a+b)*ab (a+b)*
6. Construct ε-NFA for the language L= (0+1)*2 (1+2)*12
7. Construct ε-NFA for the language L= (0|1)2*
8. Convert the following regular expression into its equivalent 1 (0 +