handouts/ho02.tex
changeset 133 09efdf5cf07c
parent 126 7c7185cb4f2b
child 140 1be892087df2
equal deleted inserted replaced
132:04264d0c43bb 133:09efdf5cf07c
   177 \[
   177 \[
   178 match\,s\,r\quad\text{if and only if}\quad s\in L(r)
   178 match\,s\,r\quad\text{if and only if}\quad s\in L(r)
   179 \]
   179 \]
   180 
   180 
   181 \noindent
   181 \noindent
   182 holds, which means our algorithm satisfies the specification. This algorithm can be easily 
   182 holds, which means our algorithm satisfies the specification. This algorithm was introduced by
   183 extended for other regular expressions such as $r^{\{n\}}$, $r^?$, $\sim{}r$ and so on.
   183 Janus Brzozowski in 1964. Its main attractions are simplicity and being fast, as well as
       
   184 being easily extendable for other regular expressions such as $r^{\{n\}}$, $r^?$, $\sim{}r$ and so on.
   184 
   185 
   185 \begin{figure}[p]
   186 \begin{figure}[p]
   186 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app5.scala}}}
   187 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app5.scala}}}
   187 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app6.scala}}}
   188 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app6.scala}}}
   188 \caption{Scala implementation of the nullable and derivatives functions.}
   189 \caption{Scala implementation of the nullable and derivatives functions.}