handouts/ho03.tex
changeset 556 40e22ad45744
parent 518 aecbe0077f2d
child 572 4a1739f256fd
equal deleted inserted replaced
554:2509c670e3a2 556:40e22ad45744
   290 \begin{figure}[p]
   290 \begin{figure}[p]
   291 \small
   291 \small
   292 \lstinputlisting[numbers=left]{../progs/display/nfa.scala}
   292 \lstinputlisting[numbers=left]{../progs/display/nfa.scala}
   293 \caption{A Scala implementation of NFAs using partial functions.
   293 \caption{A Scala implementation of NFAs using partial functions.
   294   Notice that the function \texttt{accepts} implements the
   294   Notice that the function \texttt{accepts} implements the
   295   acceptance of a string in a breath-first search fashion. This can be a costly
   295   acceptance of a string in a breadth-first search fashion. This can be a costly
   296   way of deciding whether a string is accepted or not in applications that need to handle
   296   way of deciding whether a string is accepted or not in applications that need to handle
   297   large NFAs and large inputs.\label{nfa}}
   297   large NFAs and large inputs.\label{nfa}}
   298 \end{figure}
   298 \end{figure}
   299 
   299 
   300 Look very careful at the \texttt{accepts} and \texttt{deltas}
   300 Look very careful at the \texttt{accepts} and \texttt{deltas}