Skip to content

Commit ab867a3

Browse files
authored
Merge pull request #803 from jeqcho/master
Fix typo on tuple encoding
2 parents d4cad9e + 750fe74 commit ab867a3

3 files changed

+5
-5
lines changed

lec_02_representation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ The following theorem shows that if $E$ is a prefix-free encoding of $\mathcal{O
682682

683683
::: {.theorem title="Prefix-free implies tuple encoding" #prefixfreethm}
684684
Suppose that $E:\mathcal{O} \rightarrow \{0,1\}^*$ is prefix-free.
685-
Then the following map $\overline{E}:\mathcal{O}^* \rightarrow \{0,1\}^*$ is one to one, for every $o_0,\ldots,o_{k-1} \in \mathcal{O}^*$, we define
685+
Then the following map $\overline{E}:\mathcal{O}^* \rightarrow \{0,1\}^*$ is one to one, for every $(o_0,\ldots,o_{k-1}) \in \mathcal{O}^*$, we define
686686
$$
687687
\overline{E}(o_0,\ldots,o_{k-1}) = E(o_0)E(o_1) \cdots E(o_{k-1}) \;.
688688
$$

lec_04_code_and_data.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ f_i(x) = \begin{cases} b & x=x^* \\ f_{i-1}(x) & x \neq x^*
229229
$$
230230
or in other words
231231
$$
232-
f_i(x) = f_{i-1}(x) \wedge \neg EQUAL(x^*,x) \; \vee \; b \wedge EQUAL(x^*,x)
232+
f_i(x) = IF(EQUAL(x^*,x),b,f_{i-1}(x))
233233
$$
234234
where $EQUAL:\{0,1\}^{2n} \rightarrow \{0,1\}$ is the function that maps $x,x' \in \{0,1\}^n$ to $1$ if they are equal and to $0$ otherwise.
235235
Since (by our choice of $i$), $f_{i-1}$ can be computed using at most $s$ gates and (as can be easily verified) that $EQUAL \in SIZE_n(9n)$,
@@ -539,7 +539,7 @@ Please make sure that you understand why `GET` and $LOOKUP_\ell$ are the same fu
539539
We saw that we can compute $LOOKUP_\ell$ in time $O(2^\ell) = O(s)$ for our choice of $\ell$.
540540

541541
For every $\ell$, let $UPDATE_\ell:\{0,1\}^{2^\ell + \ell +1} \rightarrow \{0,1\}^{2^\ell}$ correspond to the `UPDATE` function for arrays of length $2^\ell$.
542-
That is, on input $V\in \{0,1\}^{2^\ell}$ , $i\in \{0,1\}^\ell$, $b\in \{0,1\}$, $UPDATE_\ell(V,b,i)$ is equal to $V' \in \{0,1\}^{2^\ell}$ such that
542+
That is, on input $V\in \{0,1\}^{2^\ell}$ , $i\in \{0,1\}^\ell$, $b\in \{0,1\}$, $UPDATE_\ell(V,i,b)$ is equal to $V' \in \{0,1\}^{2^\ell}$ such that
543543
$$
544544
V'_j = \begin{cases} V_j & j \neq i \\ b & j = i \end{cases}
545545
$$

lec_06_loops.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ We describe the operation of our Turing machine $M$ in words:
146146

147147
* $M$ starts in state `START` and goes right, looking for the first symbol that is $0$ or $1$. If it finds $\varnothing$ before it hits such a symbol then it moves to the `OUTPUT_1` state described below.
148148

149-
* Once $M$ finds such a symbol $b \in \{0,1\}$, $M$ deletes $b$ from the tape by writing the $\times$ symbol, it enters either the `RIGHT_0` or `RIGHT_1` mode according to the value of $b$ and starts moving rightwards until it hits the first $\varnothing$ or $\times$ symbol.
149+
* Once $M$ finds such a symbol $b \in \{0,1\}$, $M$ deletes $b$ from the tape by writing the $\times$ symbol, it enters either the `RIGHT_`$b$ mode and starts moving rightwards until it hits the first $\varnothing$ or $\times$ symbol.
150150

151151
* Once $M$ finds this symbol, it goes into the state `LOOK_FOR_0` or `LOOK_FOR_1` depending on whether it was in the state `RIGHT_0` or `RIGHT_1` and makes one left move.
152152

@@ -169,7 +169,7 @@ The above description can be turned into a table describing for each one of the
169169
The formal definition of Turing machines is as follows:
170170

171171
::: {.definition title="Turing Machine" #TM-def}
172-
A (one tape) _Turing machine_ with $k$ states and alphabet $\Sigma \supseteq \{0,1, \triangleright, \varnothing \}$ is represented by a _transition function_
172+
A (one tape) _Turing machine_ $M$ with $k$ states and alphabet $\Sigma \supseteq \{0,1, \triangleright, \varnothing \}$ is represented by a _transition function_
173173
$\delta_M:[k]\times \Sigma \rightarrow [k] \times \Sigma \times \{\mathsf{L},\mathsf{R}, \mathsf{S}, \mathsf{H} \}$.
174174

175175
For every $x\in \{0,1\}^*$, the _output_ of $M$ on input $x$, denoted by $M(x)$, is the result of the following process:

0 commit comments

Comments
 (0)