Lecture 22 - Exercises
Part A - NFA-DFA Conversion
In these exercises, we will convert the following NFA to a DFA:

The \(\epsilon\)-closures of the
states are as follows:
- \(C_\epsilon(1) = \{1, 2\}\)
- \(C_\epsilon(2) = \{1\}\)
- \(C_\epsilon(3) = \{2\}\)
- Complete the state transition table of the equivalent DFA, including
only reachable states:
Start |
\(\{1, 2\}\) |
\(\{1, 2, 3\}\) |
\(\varnothing\) |
|
|
|
|
|
|
|
|
|
|
|
|
- Which of the states in the DFA are accept states?
- Draw a diagram of the converted DFA.
Part B - Closure Proof
Sketch
- Given two DFAs \(M_A\) and \(M_B\) accepting languages \(A\) and \(B\), respectively, describe how to
construct an NFA \(N\) for which \(L(N) = AB\).
- Given a DFA \(M_A\) accepting
language \(A\), describe how to
construct an NFA \(N\) for which \(L(N) = A^*\).
- Given a DFA \(M_A\), accepting
language \(A\), describe how to
construct an NFA \(N\) for which \(L(N) = \overline{A}\).
- Given two DFAs \(M_A\) and \(M_B\) accepting languages \(A\) and \(B\), respectively, describe how to
construct an NFA \(N\) for which \(L(N) = A \cap B\).
Part C - Regular Expressions
What language over \(\Sigma = \{a,
b\}\) does each of the following regular expressions
represent?
- \(ab\)
- \((a \cup b \cup \epsilon)\)
- \((ab \cup a)b\)
- \(a(a \cup b) \cup b(b \cup
a)\)
- \(ab^*\)
- \((aa)^*\)
- \((ab)^* \cup b^*\)
- \((a^*b^*)^*\)
Write a regular expression that describes each of the following
languages over \(\Sigma = \{0,
1\}\):
- \(\{w : w \text{ contains at least three
$1$'s}\}\)
- \(\{w : |w| \text{ is odd}\}\)
- \(\{w : \text{ every odd position in $w$
is $1$}\}\)
Give a regular expression that describes the language accepted by
the following DFA:
