Skip to content

Commit cbd1288

Browse files
authored
2 small typos in p 238 in lec_05_infinite
1 parent d4cad9e commit cbd1288

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lec_05_infinite.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ INPUT: Regular expression $e$ over $\Sigma^*$, $x\in \Sigma^n$ where $n\in\N$
765765
OUTPUT: $\Phi_e(x)$
766766
767767
procedure{DFAMatch}{$e$,$x$}
768-
Let $S \leftarrow S(e)$ be the set $\{ e[\alpha] | \alpha\in \{0,1\}^* \}$ as defined in the proof of the linear-time matching theorem.
768+
Let $S \leftarrow S(e)$ be the set $\{ e[\alpha] | \alpha\in \Sigma^* \}$ as defined in the proof of the linear-time matching theorem.
769769
For {$e' \in S$}
770770
Let $v_{e'} \leftarrow 1$ -if $\Phi_{e'}("")=1$ and $v_{e'} \leftarrow 0$ otherwise
771771
endfor
@@ -787,7 +787,7 @@ Hence it corresponds to a DFA.
787787
We prove its correctness by induction on the length $n$ of the input.
788788
Specifically, we will argue that before reading $x_i$, the variable $v_{e'}$ is equal to $\Phi_{e'}(x_0 \cdots x_{i-1})$ for every $e' \in S(e)$.
789789
In the case $i=0$ this holds since we initialize $v_{e'} = \Phi_{e'}("")$ for all $e' \in S(e)$.
790-
For $i>0$ this holds by induction since the inductive hypothesis implies that $last_e' = \Phi_{e'}(x_0 \cdots x_{i-2})$ for all $e' \in S(e)$ and by the definition of the set $S(e')$, for every $e' \in S(e)$ and $x_{i-1} \in \Sigma$, $e'' = e'[x_{i-1}]$ is in $S(e)$ and
790+
For $i>0$ this holds by induction since the inductive hypothesis implies that $last_{e'} = \Phi_{e'}(x_0 \cdots x_{i-2})$ for all $e' \in S(e)$ and by the definition of the set $S(e')$, for every $e' \in S(e)$ and $x_{i-1} \in \Sigma$, $e'' = e'[x_{i-1}]$ is in $S(e)$ and
791791
$\Phi_{e'}(x_0 \cdots x_{i-1}) = \Phi_{e''}(x_0 \cdots x_i)$.
792792
:::
793793

0 commit comments

Comments
 (0)