Lecture 25 - Exercises
Part A - NFA-DFA Conversion
Warmup
- Consider the NFA below. Ignoring \(\epsilon\) transitions, in which states
could the machine be in after processing the string \(aaa\)?
- Same question, but now allow for \(\epsilon\) transitions.
Part B - NFA-DFA Conversion
The \(\epsilon\)-closures of the
states are as follows:
- \(C_\epsilon(0) = \{1, 2\}\)
- \(C_\epsilon(1) = \{1\}\)
- \(C_\epsilon(2) = \{2\}\)
- Complete the state transition table of the equivalent DFA, including
only reachable states:
Start |
\(\{1, 2\}\) |
\(\{1, 2, 3\}\) |
\(\varnothing\) |
|
\(\{1, 2, 3\}\) |
\(\{1,2,3\}\) |
\(\{2, 3\}\) |
|
|
|
|
|
|
|
|
- Which of the states in the DFA are accept states?
- Draw a diagram of the converted DFA.
Part C - Closure Proof
Sketch
- Given two DFAs \(M_A\) and \(M_B\) describe how to construct an NFA
\(N\) for which \(L(N) = AB\).
- Given a DFA \(M_A\), describe how
to construct an NFA \(N\) for which
\(L(N) = A^*\).
- Given a DFA \(M_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\).
Consider the following NFA:
- Write its state transition table. This should have four columns:
State, \(a\), \(b\), and \(\epsilon\).
- Give the \(\epsilon\)-closure of
each state:
- \(C_\epsilon(0) =\)
- \(C_\epsilon(1) =\)
- \(C_\epsilon(2) =\)
- Construct the transition table for the equivalent DFA; this table
should have three columns: State, \(a\), and \(b\). You do not need to include unreachable
states.