handouts/ho03.tex
changeset 556 4b0fffaef849
parent 518 54632be1b873
child 572 96af3fbdcd8d
equal deleted inserted replaced
554:44af502ccb46 556:4b0fffaef849
   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}