author | Christian Urban <urbanc@in.tum.de> |
Tue, 21 Nov 2017 16:31:11 +0000 | |
changeset 152 | 114a89518aea |
parent 110 | 62389faa66e4 |
child 153 | 4383809c176a |
permissions | -rw-r--r-- |
6 | 1 |
\documentclass{article} |
62 | 2 |
\usepackage{../style} |
78 | 3 |
\usepackage{../langs} |
6 | 4 |
|
5 |
\begin{document} |
|
6 |
||
100 | 7 |
\section*{Coursework 8 (Scala, Regular Expressions)} |
6 | 8 |
|
79 | 9 |
This coursework is worth 10\%. It is about regular expressions, |
10 |
pattern matching and polymorphism. The first part is due on 30 |
|
152 | 11 |
November at 11pm; the second, more advanced part, is due on 21 |
12 |
December at 11pm. You are asked to implement a regular expression |
|
13 |
matcher based on derivatives of regular expressions. The reason is |
|
14 |
that regular expression matching in Java can be extremely slow |
|
15 |
sometimes.\bigskip |
|
62 | 16 |
|
17 |
\noindent |
|
152 | 18 |
\textbf{Important:} |
19 |
||
20 |
\begin{itemize} |
|
21 |
\item Make sure the files you submit can be processed by just calling\\ |
|
22 |
\mbox{\texttt{scala <<filename.scala>>}} on the commandline. Use the |
|
23 |
template files provided and do not make any changes to arguments of |
|
24 |
functions or to any types. You are free to implement any auxiliary |
|
25 |
function you might need. |
|
26 |
||
27 |
\item Do not use any mutable data structures in your |
|
28 |
submissions! They are not needed. This means you cannot create new |
|
29 |
\texttt{Array}s or \texttt{ListBuffer}s, for example. |
|
86 | 30 |
|
152 | 31 |
\item Do not use \texttt{return} in your code! It has a different |
32 |
meaning in Scala, than in Java. |
|
33 |
||
34 |
\item Do not use \texttt{var}! This declares a mutable variable. Only |
|
35 |
use \texttt{val}! |
|
36 |
||
37 |
\item Do not use any parallel collections! No \texttt{.par} therefore! |
|
38 |
Our testing and marking infrastructure is not set up for it. |
|
39 |
\end{itemize} |
|
40 |
||
41 |
\noindent |
|
42 |
Also note that the running time of each part will be restricted to a |
|
43 |
maximum of 360 seconds on my laptop |
|
6 | 44 |
|
45 |
||
110 | 46 |
\subsection*{Disclaimer} |
6 | 47 |
|
48 |
It should be understood that the work you submit represents |
|
68 | 49 |
your own effort! You have not copied from anyone else. An |
6 | 50 |
exception is the Scala code I showed during the lectures or |
51 |
uploaded to KEATS, which you can freely use.\bigskip |
|
52 |
||
53 |
||
68 | 54 |
\subsection*{Part 1 (6 Marks)} |
6 | 55 |
|
69 | 56 |
The task is to implement a regular expression matcher that is based on |
68 | 57 |
derivatives of regular expressions. The implementation can deal |
58 |
with the following regular expressions, which have been predefined |
|
69 | 59 |
in the file re.scala: |
6 | 60 |
|
61 |
\begin{center} |
|
62 |
\begin{tabular}{lcll} |
|
63 |
$r$ & $::=$ & $\ZERO$ & cannot match anything\\ |
|
64 |
& $|$ & $\ONE$ & can only match the empty string\\ |
|
68 | 65 |
& $|$ & $c$ & can match a character (in this case $c$)\\ |
66 |
& $|$ & $r_1 + r_2$ & can match a string either with $r_1$ or with $r_2$\\ |
|
67 |
& $|$ & $r_1\cdot r_2$ & can match the first part of a string with $r_1$ and\\ |
|
68 |
& & & then the second part with $r_2$\\ |
|
6 | 69 |
& $|$ & $r^*$ & can match zero or more times $r$\\ |
70 |
\end{tabular} |
|
71 |
\end{center} |
|
72 |
||
68 | 73 |
\noindent |
152 | 74 |
Why? Knowing how to match regular expressions and strings will let you |
75 |
solve a lot of problems that vex other humans. Regular expressions are |
|
76 |
one of the fastest and simplest ways to match patterns in text, and |
|
77 |
are endlessly useful for searching, editing and analysing data in all |
|
78 |
sorts of places (for example analysing network traffic in order to |
|
79 |
detect security breaches). However, you need to be fast, otherwise you |
|
80 |
will stumble over problems such as recently reported at |
|
68 | 81 |
|
82 |
{\small |
|
83 |
\begin{itemize} |
|
84 |
\item[$\bullet$] \url{http://stackstatus.net/post/147710624694/outage-postmortem-july-20-2016} |
|
85 |
\item[$\bullet$] \url{https://vimeo.com/112065252} |
|
86 |
\item[$\bullet$] \url{http://davidvgalbraith.com/how-i-fixed-atom/} |
|
87 |
\end{itemize}} |
|
88 |
||
79 | 89 |
\subsubsection*{Tasks (file re.scala)} |
68 | 90 |
|
91 |
\begin{itemize} |
|
152 | 92 |
\item[(1a)] Implement a function, called \textit{nullable}, by |
93 |
recursion over regular expressions. This function tests whether a |
|
94 |
regular expression can match the empty string, that is given a |
|
95 |
regular expression it either returns true or false. |
|
6 | 96 |
|
97 |
\begin{center} |
|
98 |
\begin{tabular}{lcl} |
|
99 |
$\textit{nullable}(\ZERO)$ & $\dn$ & $\textit{false}$\\ |
|
100 |
$\textit{nullable}(\ONE)$ & $\dn$ & $\textit{true}$\\ |
|
101 |
$\textit{nullable}(c)$ & $\dn$ & $\textit{false}$\\ |
|
102 |
$\textit{nullable}(r_1 + r_2)$ & $\dn$ & $\textit{nullable}(r_1) \vee \textit{nullable}(r_2)$\\ |
|
103 |
$\textit{nullable}(r_1 \cdot r_2)$ & $\dn$ & $\textit{nullable}(r_1) \wedge \textit{nullable}(r_2)$\\ |
|
104 |
$\textit{nullable}(r^*)$ & $\dn$ & $\textit{true}$\\ |
|
105 |
\end{tabular} |
|
68 | 106 |
\end{center}\hfill[1 Mark] |
107 |
||
108 |
\item[(1b)] Implement a function, called \textit{der}, by recursion over |
|
109 |
regular expressions. It takes a character and a regular expression |
|
69 | 110 |
as arguments and calculates the derivative regular expression according |
111 |
to the rules: |
|
6 | 112 |
|
113 |
\begin{center} |
|
114 |
\begin{tabular}{lcl} |
|
115 |
$\textit{der}\;c\;(\ZERO)$ & $\dn$ & $\ZERO$\\ |
|
116 |
$\textit{der}\;c\;(\ONE)$ & $\dn$ & $\ZERO$\\ |
|
117 |
$\textit{der}\;c\;(d)$ & $\dn$ & $\textit{if}\; c = d\;\textit{then} \;\ONE \; \textit{else} \;\ZERO$\\ |
|
118 |
$\textit{der}\;c\;(r_1 + r_2)$ & $\dn$ & $(\textit{der}\;c\;r_1) + (\textit{der}\;c\;r_2)$\\ |
|
119 |
$\textit{der}\;c\;(r_1 \cdot r_2)$ & $\dn$ & $\textit{if}\;\textit{nullable}(r_1)$\\ |
|
120 |
& & $\textit{then}\;((\textit{der}\;c\;r_1)\cdot r_2) + (\textit{der}\;c\;r_2)$\\ |
|
121 |
& & $\textit{else}\;(\textit{der}\;c\;r_1)\cdot r_2$\\ |
|
122 |
$\textit{der}\;c\;(r^*)$ & $\dn$ & $(\textit{der}\;c\;r)\cdot (r^*)$\\ |
|
123 |
\end{tabular} |
|
69 | 124 |
\end{center} |
125 |
||
126 |
For example given the regular expression $r = (a \cdot b) \cdot c$, the derivatives |
|
127 |
w.r.t.~the characters $a$, $b$ and $c$ are |
|
128 |
||
129 |
\begin{center} |
|
130 |
\begin{tabular}{lcll} |
|
131 |
$\textit{der}\;a\;r$ & $=$ & $(\ONE \cdot b)\cdot c$ & ($= r'$)\\ |
|
132 |
$\textit{der}\;b\;r$ & $=$ & $(\ZERO \cdot b)\cdot c$\\ |
|
133 |
$\textit{der}\;c\;r$ & $=$ & $(\ZERO \cdot b)\cdot c$ |
|
134 |
\end{tabular} |
|
135 |
\end{center} |
|
136 |
||
137 |
Let $r'$ stand for the first derivative, then taking the derivatives of $r'$ |
|
138 |
w.r.t.~the characters $a$, $b$ and $c$ gives |
|
139 |
||
140 |
\begin{center} |
|
141 |
\begin{tabular}{lcll} |
|
142 |
$\textit{der}\;a\;r'$ & $=$ & $((\ZERO \cdot b) + \ZERO)\cdot c$ \\ |
|
143 |
$\textit{der}\;b\;r'$ & $=$ & $((\ZERO \cdot b) + \ONE)\cdot c$ & ($= r''$)\\ |
|
144 |
$\textit{der}\;c\;r'$ & $=$ & $((\ZERO \cdot b) + \ZERO)\cdot c$ |
|
145 |
\end{tabular} |
|
146 |
\end{center} |
|
147 |
||
148 |
One more example: Let $r''$ stand for the second derivative above, |
|
149 |
then taking the derivatives of $r''$ w.r.t.~the characters $a$, $b$ |
|
150 |
and $c$ gives |
|
151 |
||
152 |
\begin{center} |
|
153 |
\begin{tabular}{lcll} |
|
154 |
$\textit{der}\;a\;r''$ & $=$ & $((\ZERO \cdot b) + \ZERO) \cdot c + \ZERO$ \\ |
|
155 |
$\textit{der}\;b\;r''$ & $=$ & $((\ZERO \cdot b) + \ZERO) \cdot c + \ZERO$\\ |
|
152 | 156 |
$\textit{der}\;c\;r''$ & $=$ & $((\ZERO \cdot b) + \ZERO) \cdot c + \ONE$ & |
157 |
(is $\textit{nullable}$) |
|
69 | 158 |
\end{tabular} |
159 |
\end{center} |
|
160 |
||
161 |
Note, the last derivative can match the empty string, that is it is \textit{nullable}.\\ |
|
162 |
\mbox{}\hfill\mbox{[1 Mark]} |
|
6 | 163 |
|
68 | 164 |
\item[(1c)] Implement the function \textit{simp}, which recursively |
69 | 165 |
traverses a regular expression from the inside to the outside, and |
166 |
simplifies every sub-regular-expression on the left (see below) to |
|
68 | 167 |
the regular expression on the right, except it does not simplify inside |
168 |
${}^*$-regular expressions. |
|
6 | 169 |
|
68 | 170 |
\begin{center} |
69 | 171 |
\begin{tabular}{l@{\hspace{4mm}}c@{\hspace{4mm}}ll} |
6 | 172 |
$r \cdot \ZERO$ & $\mapsto$ & $\ZERO$\\ |
173 |
$\ZERO \cdot r$ & $\mapsto$ & $\ZERO$\\ |
|
174 |
$r \cdot \ONE$ & $\mapsto$ & $r$\\ |
|
175 |
$\ONE \cdot r$ & $\mapsto$ & $r$\\ |
|
176 |
$r + \ZERO$ & $\mapsto$ & $r$\\ |
|
177 |
$\ZERO + r$ & $\mapsto$ & $r$\\ |
|
178 |
$r + r$ & $\mapsto$ & $r$\\ |
|
179 |
\end{tabular} |
|
68 | 180 |
\end{center} |
181 |
||
69 | 182 |
For example the regular expression |
68 | 183 |
\[(r_1 + \ZERO) \cdot \ONE + ((\ONE + r_2) + r_3) \cdot (r_4 \cdot \ZERO)\] |
184 |
||
79 | 185 |
simplifies to just $r_1$. \textbf{Hints:} Regular expressions can be |
186 |
seen as trees and there are several methods for traversing |
|
187 |
trees. One of them corresponds to the inside-out traversal. Also |
|
152 | 188 |
remember numerical expressions from school: there you had expressions |
189 |
like $u + \ldots + (1 \cdot x) - \ldots (z + (y \cdot 0)) \ldots$ |
|
79 | 190 |
and simplification rules that looked very similar to rules |
191 |
above. You would simplify such numerical expressions by replacing |
|
192 |
for example the $y \cdot 0$ by $0$, or $1\cdot x$ by $x$, and then |
|
152 | 193 |
look whether more rules are applicable. If you organise the |
79 | 194 |
simplification in an inside-out fashion, it is always clear which |
195 |
rule should applied next.\\\mbox{}\hfill[1 Mark] |
|
68 | 196 |
|
197 |
\item[(1d)] Implement two functions: The first, called \textit{ders}, |
|
69 | 198 |
takes a list of characters and a regular expression as arguments, and |
199 |
builds the derivative w.r.t.~the list as follows: |
|
68 | 200 |
|
201 |
\begin{center} |
|
202 |
\begin{tabular}{lcl} |
|
69 | 203 |
$\textit{ders}\;(Nil)\;r$ & $\dn$ & $r$\\ |
204 |
$\textit{ders}\;(c::cs)\;r$ & $\dn$ & |
|
68 | 205 |
$\textit{ders}\;cs\;(\textit{simp}(\textit{der}\;c\;r))$\\ |
206 |
\end{tabular} |
|
6 | 207 |
\end{center} |
208 |
||
78 | 209 |
Note that this function is different from \textit{der}, which only |
210 |
takes a single character. |
|
211 |
||
212 |
The second function, called \textit{matcher}, takes a string and a |
|
213 |
regular expression as arguments. It builds first the derivatives |
|
214 |
according to \textit{ders} and after that tests whether the resulting |
|
215 |
derivative regular expression can match the empty string (using |
|
216 |
\textit{nullable}). For example the \textit{matcher} will produce |
|
217 |
true given the regular expression $(a\cdot b)\cdot c$ and the string |
|
218 |
$abc$.\\ \mbox{}\hfill[1 Mark] |
|
6 | 219 |
|
69 | 220 |
\item[(1e)] Implement the function $\textit{replace}\;r\;s_1\;s_2$: it searches |
221 |
(from the left to |
|
222 |
right) in the string $s_1$ all the non-empty substrings that match the |
|
223 |
regular expression $r$---these substrings are assumed to be |
|
68 | 224 |
the longest substrings matched by the regular expression and |
69 | 225 |
assumed to be non-overlapping. All these substrings in $s_1$ matched by $r$ |
226 |
are replaced by $s_2$. For example given the regular expression |
|
6 | 227 |
|
68 | 228 |
\[(a \cdot a)^* + (b \cdot b)\] |
6 | 229 |
|
69 | 230 |
\noindent the string $s_1 = aabbbaaaaaaabaaaaabbaaaabb$ and |
78 | 231 |
replacement the string $s_2 = c$ yields the string |
6 | 232 |
|
68 | 233 |
\[ |
234 |
ccbcabcaccc |
|
235 |
\] |
|
6 | 236 |
|
78 | 237 |
\hfill[2 Marks] |
68 | 238 |
\end{itemize} |
6 | 239 |
|
78 | 240 |
|
241 |
||
242 |
||
243 |
\subsection*{Part 2 (4 Marks)} |
|
244 |
||
245 |
You need to copy all the code from \texttt{re.scala} into |
|
246 |
\texttt{re2.scala} in order to complete Part 2. Parts (2a) and (2b) |
|
247 |
give you another method and datapoints for testing the \textit{der} |
|
248 |
and \textit{simp} functions from Part~1. |
|
249 |
||
79 | 250 |
\subsubsection*{Tasks (file re2.scala)} |
78 | 251 |
|
252 |
\begin{itemize} |
|
253 |
\item[(2a)] Write a \textbf{polymorphic} function, called |
|
254 |
\textit{iterT}, that is \textbf{tail-recursive}(!) and takes an |
|
255 |
integer $n$, a function $f$ and an $x$ as arguments. This function |
|
256 |
should iterate $f$ $n$-times starting with the argument $x$, like |
|
257 |
||
258 |
\[\underbrace{f(\ldots (f}_{n\text{-times}}(x))) |
|
259 |
\] |
|
260 |
||
261 |
More formally that means \textit{iterT} behaves as follows: |
|
262 |
||
263 |
\begin{center} |
|
264 |
\begin{tabular}{lcl} |
|
265 |
$\textit{iterT}(n, f, x)$ & $\dn$ & |
|
266 |
$\begin{cases} |
|
267 |
\;x & \textit{if}\;n = 0\\ |
|
268 |
\;f(\textit{iterT}(n - 1, f, x)) & \textit{otherwise} |
|
269 |
\end{cases}$ |
|
270 |
\end{tabular} |
|
271 |
\end{center} |
|
272 |
||
273 |
Make sure you write a \textbf{tail-recursive} version of |
|
274 |
\textit{iterT}. If you add the annotation \texttt{@tailrec} (see |
|
79 | 275 |
below) your code should not produce an error message. |
78 | 276 |
|
277 |
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm] |
|
278 |
import scala.annotation.tailrec |
|
279 |
||
280 |
@tailrec |
|
281 |
def iterT[A](n: Int, f: A => A, x: A): A = ... |
|
282 |
\end{lstlisting} |
|
283 |
||
284 |
You can assume that \textit{iterT} will only be called for positive |
|
285 |
integers $0 \le n$. Given the type variable \texttt{A}, the type of |
|
286 |
$f$ is \texttt{A => A} and the type of $x$ is \texttt{A}. This means |
|
287 |
\textit{iterT} can be used, for example, for functions from integers |
|
79 | 288 |
to integers, or strings to strings, or regular expressions to |
289 |
regular expressions. \\ \mbox{}\hfill[2 Marks] |
|
78 | 290 |
|
291 |
\item[(2b)] Implement a function, called \textit{size}, by recursion |
|
292 |
over regular expressions. If a regular expression is seen as a tree, |
|
293 |
then \textit{size} should return the number of nodes in such a |
|
294 |
tree. Therefore this function is defined as follows: |
|
295 |
||
296 |
\begin{center} |
|
297 |
\begin{tabular}{lcl} |
|
298 |
$\textit{size}(\ZERO)$ & $\dn$ & $1$\\ |
|
299 |
$\textit{size}(\ONE)$ & $\dn$ & $1$\\ |
|
300 |
$\textit{size}(c)$ & $\dn$ & $1$\\ |
|
301 |
$\textit{size}(r_1 + r_2)$ & $\dn$ & $1 + \textit{size}(r_1) + \textit{size}(r_2)$\\ |
|
302 |
$\textit{size}(r_1 \cdot r_2)$ & $\dn$ & $1 + \textit{size}(r_1) + \textit{size}(r_2)$\\ |
|
303 |
$\textit{size}(r^*)$ & $\dn$ & $1 + \textit{size}(r)$\\ |
|
304 |
\end{tabular} |
|
305 |
\end{center} |
|
306 |
||
307 |
You can use \textit{size} and \textit{iterT} in order to test how much |
|
308 |
the 'evil' regular expression $(a^*)^* \cdot b$ grows when taking |
|
79 | 309 |
successive derivatives according the letter $a$ and then compare it to |
78 | 310 |
taking the derivative, but simlifying the derivative after each step. |
311 |
For example, the calls |
|
312 |
||
313 |
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm] |
|
314 |
size(iterT(20, (r: Rexp) => der('a', r), EVIL)) |
|
315 |
size(iterT(20, (r: Rexp) => simp(der('a', r)), EVIL)) |
|
316 |
\end{lstlisting} |
|
317 |
||
318 |
produce without simplification a regular expression of size of |
|
79 | 319 |
7340068 after 20 iterations, while the one with |
320 |
simplification gives |
|
78 | 321 |
just 8.\\ \mbox{}\hfill[1 Mark] |
322 |
||
323 |
||
324 |
\item[(2c)] Write a \textbf{polymorphic} function, called |
|
325 |
\textit{fixpT}, that takes |
|
326 |
a function $f$ and an $x$ as arguments. The purpose |
|
327 |
of \textit{fixpT} is to calculate a fixpoint of the function $f$ |
|
328 |
starting from the argument $x$. |
|
329 |
A fixpoint, say $y$, is when $f(y) = y$ holds. |
|
330 |
That means \textit{fixpT} behaves as follows: |
|
331 |
||
332 |
\begin{center} |
|
333 |
\begin{tabular}{lcl} |
|
334 |
$\textit{fixpT}(f, x)$ & $\dn$ & |
|
335 |
$\begin{cases} |
|
336 |
\;x & \textit{if}\;f(x) = x\\ |
|
337 |
\;\textit{fixpT}(f, f(x)) & \textit{otherwise} |
|
338 |
\end{cases}$ |
|
339 |
\end{tabular} |
|
340 |
\end{center} |
|
341 |
||
342 |
Make sure you calculate in the code of $\textit{fixpT}$ the result |
|
343 |
of $f(x)$ only once. Given the type variable \texttt{A} in |
|
344 |
$\textit{fixpT}$, the type of $f$ is \texttt{A => A} and the type of |
|
345 |
$x$ is \texttt{A}. The file \texttt{re2.scala} gives two example |
|
346 |
function where in one the fixpoint is 1 and in the other |
|
347 |
it is the string $a$.\\ \mbox{}\hfill[1 Mark] |
|
348 |
\end{itemize}\bigskip |
|
349 |
||
350 |
||
94
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
351 |
\subsection*{Background} |
78 | 352 |
|
94
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
353 |
Although easily implementable in Scala, the idea behind the derivative |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
354 |
function might not so easy to be seen. To understand its purpose |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
355 |
better, assume a regular expression $r$ can match strings of the form |
152 | 356 |
$c\!::\!cs$ (that means strings which start with a character $c$ and have |
94
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
357 |
some rest, or tail, $cs$). If you now take the derivative of $r$ with |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
358 |
respect to the character $c$, then you obtain a regular expressions |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
359 |
that can match all the strings $cs$. In other words, the regular |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
360 |
expression $\textit{der}\;c\;r$ can match the same strings $c::cs$ |
ae4708c851ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
86
diff
changeset
|
361 |
that can be matched by $r$, except that the $c$ is chopped off. |
75 | 362 |
|
363 |
Assume now $r$ can match the string $abc$. If you take the derivative |
|
364 |
according to $a$ then you obtain a regular expression that can match |
|
365 |
$bc$ (it is $abc$ where the $a$ has been chopped off). If you now |
|
78 | 366 |
build the derivative $\textit{der}\;b\;(\textit{der}\;a\;r))$ you |
367 |
obtain a regular expression that can match the string $c$ (it is $bc$ |
|
368 |
where $b$ is chopped off). If you finally build the derivative of this |
|
369 |
according $c$, that is |
|
370 |
$\textit{der}\;c\;(\textit{der}\;b\;(\textit{der}\;a\;r)))$, you |
|
371 |
obtain a regular expression that can match the empty string. You can |
|
372 |
test this using the function nullable, which is what your matcher is |
|
373 |
doing. |
|
75 | 374 |
|
78 | 375 |
The purpose of the simp function is to keep the regular expression |
376 |
small. Normally the derivative function makes the regular expression |
|
377 |
bigger (see the SEQ case and the example in (2b)) and the algorithm |
|
378 |
would be slower and slower over time. The simp function counters this |
|
379 |
increase in size and the result is that the algorithm is fast |
|
380 |
throughout. By the way, this algorithm is by Janusz Brzozowski who |
|
381 |
came up with the idea of derivatives in 1964 in his PhD thesis. |
|
75 | 382 |
|
78 | 383 |
\begin{center}\small |
384 |
\url{https://en.wikipedia.org/wiki/Janusz_Brzozowski_(computer_scientist)} |
|
385 |
\end{center} |
|
6 | 386 |
|
387 |
\end{document} |
|
388 |
||
68 | 389 |
|
6 | 390 |
%%% Local Variables: |
391 |
%%% mode: latex |
|
392 |
%%% TeX-master: t |
|
393 |
%%% End: |