1. Draw a DFA to accept string of a’s having at least one a. 2. Obtain a DFA to accept strings of a’s and b’s starting with the string ab. 3. Draw a DFA to accept string of a’s and b’s ending with the string abb. 4. Draw a DFA to accept string of a’s and b’s which do not end with the string abb. 5. Draw a DFA to accept string of a’s and b’s having a substring abb. 6. Draw a DFA to accept string of a’s and b’s such that L={awa | w€(a+b)n where n≥0} 7. Give DFA’s accepting the following strings over the alphabet {0,1}: i. The set of all strings beginning with 101. ii. The set of all strings with exactly three consecutive 0’s. iii. The set of all strings with containing 1101 as substring. iv. The set of all strings not containing 110. v. The set of all strings that begin with 01 and end with 11. vi. The set of all strings which when interpreted as a binary integer is a multiple of 3/divisible by 3. vii. The set of all strings which when interpreted as a binary integer is a multiple of 5/divisible by 5. 8. Obtain a DFA to accept strings of a’s and b’s having even number of a’s and b’s. 9. Obtain a DFA to accept strings of a’s and b’s having even number of a's and odd number of b's? 10. Draw a DFA to accept string of a’s and b’s ending with ab or ba. 11. Obtain a DFA to accept strings of a’s and b’s with at most two consecutive b’s. 12. Obtain a DFA to accept strings of a’s and b’s starting with at least two 0’s and ending with at least two 1’s. 13. Draw a DFA to accept string of a’s and b’s such that L={w : na(w)≤3, w€(a+b)*} 14. Draw a DFA to accept the language L={ w : na(w) ≥ 1, nb(w) = 2} 15. Obtain a DFA to accept the language L={ w: |w| mod 3=0} on ∑={a,b}. 16. Obtain a DFA to accept strings of 0’s, 1’s and 2’s beginning with a ‘0’ followed by odd number of 1’s and ending with a “2”. 17. Draw a DFA to accept strings of a’s and b’s having not more than three a’s. Non-Deterministic Finite Automata (NFA: 1. Design NFA’s to recognize the following set of strings: i. lab, cab and dab. Assume the alphabet is {a, b, c, d, l} ii. 1101, 101 and 111. Assume the alphabet is {0,1} 2. Design an NFA to recognize the following set of strings abc, abd and aacd. 3. Obtain a NFA to recognize the following set of strings 0101, 101 and 011. 4. Design an NFA with ∑ = {0, 1} accepts all string in which the third symbol from the right end is always 0. 5. Design an NFA with ∑ = {0, 1} accepts all string ending with 01. 6. Design an NFA with ∑ = {0, 1} in which double '1' is followed by double '0'. Regular Expressions: 1. Write regular expressions for the following languages over {0,1}*. i. The set of all strings that begin with 110. ii. The set of all strings that contain 1011. iii. The set of all strings that contain exactly three 1’s. 2. Obtain a regular expression to accept strings of 0’s and 1’s having no two consecutive zeros. 3. Obtain a regular expression to accept strings of a’s and b’s whose second symbol from the right end is a. 4. Obtain a regular expression to accept strings of a’s and b’s whose length is either even or multiples of 3 or both. 5. Obtain a regular expression for the following language i. L={anbm | m+n is even} ii. L={ anbm | m ≥ 1 , n ≥ 1, nm ≥ 3} iii. L={ a2nb2m | n ≥ 0 , m ≥ 0 } iv. L={ anbm : n ≥ 4 , m ≤ 3 } 6. Obtain a regular expression for the language L={w : |w| mod 3 = 0 where w€{a,b}*}. 7. Obtain a regular expression for the set of all strings that do not end with 01 over {0,1}*. 8. Obtain a regular expression for L= { vuv : u,v € {a,b}* and |v|=2}. 9. Obtain a regular expression for the language L={ w : na(w) mod 3 = 0 where w€ {a,b}*}. 10. Write regular expression for the following: i. L={ anbm : n ≤ 4 , m ≥ 2 } ii. Strings of 0’s and 1’s having no two consecutive zeros. iii. Strings of 0’s and 1’s whose lengths are multiple of 3. Proving not to be Regular (Pumping Lemma): 1. Prove that following language is not regular L={0n1n |n≥0} 2. Show that L={aibj | i>j } is not regular. 3. Prove that following language is not regular L={wwR | w€ (0+1)*} 4. Show that L={ ww | w€{a,b}*} is not regular.
Adithya Institute of Technology COIMBATORE - 641 107 Degree: B.E. & Branch: CSE Semester: 05 & Year: III Cs8501 - Theory of Computation Question Bank Unit 1-Automata Fundamentals Part - A