On this page:
1 Formal Description of an NFA
2 DFAs vs NFAs
3 Are Regular Languages Closed Under OP1?

Homework 2

Last updated: Tue, 14 Feb 2023 18:19:13 -0500

Out: Wed Feb 08, 00:00 EST Due: Tue Feb 14, 23:59 EST

This assignment explores nondeterministic finite automata (NFAs) and closed operations for regular languages.

Homework Problems

  1. Formal Description of an NFA (11 points)

  2. DFAs vs NFAs (9 points)

  3. Are Regular Languages Closed Under OP1? (11 points)

  4. README (1 point)

Total: 32 points

Submitting

Submit your solution to this assignment in Gradescope hw2. Please assign each page to the correct problem and make sure your solutions are legible.

A submission must also include a README containing the required information.

1 Formal Description of an NFA

Consider the following NFA:

  1. Come up with 3 strings that are accepted by the NFA. Together, your answers must traverse all transitions and reach all accept states.

  2. Come up with 3 strings that are not accepted (rejected) by the NFA. Together, your answers must reach all non-accept states of the NFA.

  3. In class we learned that an NFA’s formal description has five components, e.g. N = (Q,\Sigma,\delta,q_{start},F), where \delta:Q\times\Sigma_\varepsilon\rightarrow\mathcal{P}(Q) is the transition function mapping a state and input symbol (or no symbol, in the case of an empty transition) to a set of states.

    Come up with the formal description of the NFA above.

2 DFAs vs NFAs

  1. Explain two possible differences between the formal description of a DFA and the formal description of an NFA.

  2. Explain a difference between computation with a DFA and computation with an NFA.

  3. Two machines are considered equivalent if they recognize the same language (i.e., they accept the same strings).

    Come up with a function \texttt{d2n} : \texttt{DFA} \rightarrow \texttt{NFA} where, given an input DFA M = (Q,\Sigma,\delta,q_{start},F) that satisfies the formal definition of DFAs from class, \texttt{d2n}(M) produces an NFA N = (Q^\prime,\Sigma,\delta^\prime,q^\prime_{start},F^\prime) that satisfies the formal definition of NFAs and is equivalent to the input DFA.

3 Are Regular Languages Closed Under OP1?

Define the following operation, called \mathrm{OP}_1, on two languages:

\mathrm{OP}_1(A,B)=\{w\mid w=ab, \textrm{ where }w\textrm{ is a string},a\notin A,\textrm{ and }b \in B\}

Prove that class of regular languages is closed under the \mathrm{OP}_1 operation: