Lab 4 - 09/4 Friday + Quiz 2
Since this is a quiz day, this will be a shorter lab. After your quiz, get some more practice internalizing DFAs, regular expressions and NFAs.
Deconstruction
- What language does this DFA accept?
It suffices to provide a regular expression if an english description is too difficult.
Recognition
- What language does the following regular expression represent? \[ (\epsilon+ 1)(01)^{∗}(\epsilon+ 0) \]
Non-deterministic Finite Automata (NFA)
Recall the formal definition of an NFA: an NF A is a 5-tuple \(\left(Q, \Sigma, \delta,q_0, F\right)\) where:
- \(Q\) is a finite set of states
- \(\Sigma\) is a finite set of symbols called the alphabet
- \(\delta\) is the transition function, which maps \(Q \times \Sigma \cup \{\epsilon\}\) to the power set of \(Q\)
- \(q_0 \in Q\) is the start state
- \(F \subseteq Q\) is the set of accept states
- Formally describe the NFA depicted below. Include the 5-tuple definition, and a transition table.
- Does this NFA accept the string
010? - Does this NFA accept the string
010110?
- Does this NFA accept the string
Let \(\Sigma =\)
{0,1}. Can you construct a NFA that describes a language:\[ L_1 = \left\{ w \in \Sigma^{*} \mid w \textrm{ contains the subsequence } 001 \right\} \]
Let \[ L_2 = \left\{ w \in \{0,1\}^{*} \mid w \textrm{ starts and ends with 0} \right\} \]
Construct an NFA for \(L_2\) with exactly three states.