handouts/ho02.tex
changeset 433 c08290ee4f1f
parent 416 357c395ae838
child 434 8664ff87cd77
equal deleted inserted replaced
432:55be90b2a642 433:c08290ee4f1f
    62     ytick={0,5,...,30},
    62     ytick={0,5,...,30},
    63     scaled ticks=false,
    63     scaled ticks=false,
    64     axis lines=left,
    64     axis lines=left,
    65     width=6.5cm,
    65     width=6.5cm,
    66     height=5cm]
    66     height=5cm]
    67 \addplot[green,mark=square*,mark options={fill=white}] table {re2.data};
    67 \addplot[green,mark=square*,mark options={fill=white}] table {re2b.data};
    68 \addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
    68 \addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
    69 \end{axis}
    69 \end{axis}
    70 \end{tikzpicture}
    70 \end{tikzpicture}
    71 \end{tabular}
    71 \end{tabular}
    72 \end{center}
    72 \end{center}
   385 \begin{center}
   385 \begin{center}
   386 \begin{tabular}{rll}
   386 \begin{tabular}{rll}
   387 Input: $r_1$, $abc$\medskip\\
   387 Input: $r_1$, $abc$\medskip\\
   388 Step 1: & build derivative of $a$ and $r_1$ & $(r_2 = \textit{der}\,a\,r_1)$\smallskip\\
   388 Step 1: & build derivative of $a$ and $r_1$ & $(r_2 = \textit{der}\,a\,r_1)$\smallskip\\
   389 Step 2: & build derivative of $b$ and $r_2$ & $(r_3 = \textit{der}\,b\,r_2)$\smallskip\\
   389 Step 2: & build derivative of $b$ and $r_2$ & $(r_3 = \textit{der}\,b\,r_2)$\smallskip\\
   390 Step 3: & build derivative of $c$ and $r_3$ & $(r_4 = \textit{der}\,b\,r_3)$\smallskip\\
   390 Step 3: & build derivative of $c$ and $r_3$ & $(r_4 = \textit{der}\,c\,r_3)$\smallskip\\
   391 Step 4: & the string is exhausted; test & ($\textit{nullable}(r_4)$)\\
   391 Step 4: & the string is exhausted: & $(\textit{nullable}(r_4))$\\
   392         & whether $r_4$ can recognise the\\
   392         & test whether $r_4$ can recognise the\\
   393         & empty string\smallskip\\
   393         & empty string\smallskip\\
   394 Output: & result of this test $\Rightarrow \textit{true} \,\text{or}\, \textit{false}$\\        
   394 Output: & result of this test $\Rightarrow \textit{true} \,\text{or}\, \textit{false}$\\        
   395 \end{tabular}
   395 \end{tabular}
   396 \end{center}
   396 \end{center}
   397 
   397