You are on page 1of 2

PRACTICE QUESTION FOR DFA

1. Give deterministic finite automata accepting the following language over the alphabet {0,
1}.
(a) Number of 1’s is a multiple of 3.
(b) Number of 1’s not multiple of 3.
2.Design a DFA which accepts the odd number 1’s and any number of 0’sover Z = {0,1}.
3. Design a DFA for a set of strings over alphabet {0, 1} such that
(I) the numberof 0’s is divisible by five
(II) number of 1’s divisible by 3.
4. Draw DFA for the following language over {0, 1 } :
(I) All strings of length at most five
(II) All strings with exactly two 1’s
(III) All string containing at least two 0’s.
(Iv) All strings containing at most two 0’s.
(v) All strings starting with 1 and length of the string is divisible by 3.
5.Draw DFA for the following language over {a, b } :
(I) All strings starting with abb.
(II) All strings with abb as substring.
(III) All strings end with abb.
6.Design DFA for a language of string 0 and 1 that :
(I) Ending with 10
(II) Ending with 1
(III) Ending with 11
7. Design the DFA which accepts set of string such that every string containging 00 as a
substring but not 000 as a substring.
8. Design the DFA for the language, containing string in which leftmost symbol differ from
the rightmost symbol over {0, 1}
9. Design a DFA for set of strings over {a, b} in which there are at least occurrences of b
between any two occurrences of a.
10. Design a DFA for set of all strings over {a, b} ending in either ab or ba.
11. : Design an DFA for set of all strings over {a, b} containing both ab and ba as substrings.
12. Design a FA that reads string defined over S = {a,b} and accepts only those strings which
end up in either ‘aa’ or ‘bb’.
13. Design a DFA for set of all strings over {a, b} containing neither aa nor bb as a substring.
14. Design a DFA for set of all strings over {a, b) such that each a in coisimmediately
preceded and immediately followed by a 'b’.
15. Design a DFA for set of all strings over {0, 1} such that strings either beginor end (or
both) with 01 .

You might also like