You are on page 1of 2

Cairo University Compilers and Languages Computer Eng. Dept.

Faculty of Engineering Problem Set #2 Spring 2022

1. Construct DFAs for each of the following regular languages. In all cases the alphabet is
{a, b}.
a) The set of strings that has exactly 3 bs (and any number of as).
b) The set of strings where the number of bs is a multiple of 3 (and there can be any
number of as).
c) The set of strings where the difference between the number of as and the number of bs
is a multiple of 3.

2. Given the regular expression a*(a|b)aa:


a) Construct an equivalent NFA for this regular expression.
b) Convert this NFA to a DFA

3. Given that binary number strings are read with the most significant bit first and may
NOT have leading zeroes, construct the minimized DFA for the following language

4. Make the minimized DFA equivalent to the following NFA:

5. Minimize the following DFAs

I II

You might also like