CS3452- THEORY OF COMPUTATION
UNIT 1 PART A
1 Define finite automata.
2 What is the need for automata?
3 State the difference between NFA and DFA.
4 Define language.
5
Define ∈-closure with an example.
What is structural induction?
6
7 Construct DFA over alphabet {0,1}which starts with ‘01’.
8 Give some example of additional forms of proof.
9 What is regular expression?
10 Write three operations of regular expressions.
Unit I - Part B
Prove the following by induction for all n≥0
(i) 12+22+32+42+…….+n2=(n(n+1)(2n+1))/6
1. 13
3 3 3 2 2
(ii) 1 +2 +….+n =(n (n+1) )/4
Prove the following by mathematical induction method
(i) 2n > n for all n≥0
2. 13
(ii) x ≥4, 2x ≥ x2
Construct DFA equivalent to the NFA given below
3. 13
Design DFA to accept the Language L={w/w has both even number of 0‘s and even
4. 13
number of 1‘s}
i) Construct an NFA for the set of strings with {0,1} ending with 01 draw the
transitiontable for the same and check whether the input string 00101 is accepted
5. by above NFA. 13
ii) Construct NFA for set of all strings {0,1} that ends with three consecutive 1‘sat
its end.
i) If a Regular language L is accepted by a non – deterministic finite automata
then there exists a Deterministic Finite Automata that accepts L.
6. 13
ii) A Language ‗L‘ is accepted by some ε – NFA if and only if L is accepted by
NFA without ε transition
Construct NFA without ε transitions for the NFA given below
7. 13
i) Construct a DFA that accepts all strings on {0, 1} except those containing
the substring 101.
8. 13
ii) Construct a NFA accepting the set of strings over {a,b} ending in aba. Use it
to constructa DFA accepting the same set of strings.
i) Convert the following NFA-with ε, to a NFA- without ε
ε
0 1 2
q0
{q0} {φ} {φ} {q1}
(start)
9. q1 {φ} {q1} {φ} {q2} 13
* q2 {φ} {φ} {q2} {φ}
ii)Convert to a DFA, the following NFA
a b
p(start) {p} {p,q}
q {r} {r}
r {Φ} {Φ}
Define ε-NFA. Consider the following ε-closure of each state and find it‘s
equivalent DFA.
10. 13
Design a NFA accept the following strings over the alphabets {0,1} that begins with
11. 13
01 and ends with 11. Check for the validity of 01111 and 0110 strings.
Convert to a DFA, the following NFA.
0 1
P(start) {p,q} {p}
Q {r} {r} 13
12.
R {s} -
S {s} {s}
Construct the DFA which accepts a language of all string not starting with ‘a’ or not
13. 13
ending with ‘b’
Give NFA to accept the following languages over {0,1}
(i) L = {String that contains either 101 or 110 as a substring}
14. 13
(ii) L = {Strings such that every 1 is following immediately by 00}
Design a DFA to accept the language L = {w/w has both an even number of 0’s and
15. even number of 1’s} and illustrate from its transition function to check the string w= 13
UNIT II PART A
1. What is regular expression?
2. Give the regular expression for set of all strings ending in 00
3. Is regular set is closed under complement? Justify
4. Construct NFA for the regular expression (0+1)01
5. Show whether a language L=(0n12n/n>0} is regular or not using pumping Lemma
6. Prove or disprove that (r+s)*=r*+s*.
7. Give the description for the following language (0+10)*1.
8. State pumping lemma for regular language.
Give the regular expression for the following
9. L1= set of all strings of 0 and 1 ending in 00
L2= set of all string 0 and 1 beginning with 0 and ending with 1
10. Construct NFA for the regular expression (0+1)01
UNIT II – Part B
1 Construct an - NFA for the regular expression b+ba*. 13
Which of the following language is regular? Justify.
n m
2 i. L={ a b /n,m>0} 13
ii. L={ anbn/n,>0}
3 13
Obtain the regular expression for the finite automata.
i) Using pumping lemma for the regular sets, prove that the language
4 L={ambn/m>n} is notregular. 13
ii) Prove any two closure properties of regular languages.