### fixed typos, added another todo

parent 16df9964
 ... @@ -106,7 +106,7 @@ can be easily combined. ... @@ -106,7 +106,7 @@ can be easily combined. \:\em{Init}: \:\em{Init}: $C[1\ldots t][1\ldots k] \= 0$, where $k \= \lceil 2 / \varepsilon \rceil$ $C[1\ldots t][1\ldots k] \= 0$, where $k \= \lceil 2 / \varepsilon \rceil$ and $t \= \lceil \log(1 / \delta) \rceil$. and $t \= \lceil \log(1 / \delta) \rceil$. \:: Choose $t$ independent hash functions $h_1, \ldots h_t : [n] \to [k]$, each \:: Choose $t$ independent hash functions $h_1, \ldots , h_t : [n] \to [k]$, each from a 2-independent family. from a 2-independent family. \:\em{Process}($x$): \:\em{Process}($x$): \::For $i \in [t]$: $C[i][h_i(x)] \= C[i][h_i(x)] + 1$. \::For $i \in [t]$: $C[i][h_i(x)] \= C[i][h_i(x)] + 1$. ... @@ -114,7 +114,7 @@ can be easily combined. ... @@ -114,7 +114,7 @@ can be easily combined. \endalgo \endalgo Note that the algorithm needs $\O(tk \log m)$ bits to store the table $C$, and Note that the algorithm needs $\O(tk \log m)$ bits to store the table $C$, and $\O(t \log n)$ bits to store the hash functions $h_1, \ldots h_t$, and hence $\O(t \log n)$ bits to store the hash functions $h_1, \ldots , h_t$, and hence uses $\O(1/\varepsilon \cdot \log (1 / \delta) \cdot \log m uses$\O(1/\varepsilon \cdot \log (1 / \delta) \cdot \log m + \log (1 / \delta)\cdot \log n)$bits. It remains to show that it computes + \log (1 / \delta)\cdot \log n)$ bits. It remains to show that it computes a good estimate. a good estimate. ... @@ -298,7 +298,7 @@ Recall that $\E[Y_r] = d / 2^r$, so the terms in the first sum can be bounded ... @@ -298,7 +298,7 @@ Recall that $\E[Y_r] = d / 2^r$, so the terms in the first sum can be bounded using Chebyshev's inequality. The second sum is equal to the probability of using Chebyshev's inequality. The second sum is equal to the probability of the event $[t \geq s]$, that is, the event $Y_{s - 1} \geq c / \varepsilon^2$ the event $[t \geq s]$, that is, the event $Y_{s - 1} \geq c / \varepsilon^2$ (since $z$ is only increased when $B$ becomes larger than this threshold). (since $z$ is only increased when $B$ becomes larger than this threshold). We will simply use Markov's inequality to bound this event. We will use Markov's inequality to bound the probability of this event. Putting it all together, we have: Putting it all together, we have: \eqalign{\eqalign{ ... @@ -327,7 +327,12 @@ The counter $z$ requires only $\O(\log \log n)$ bits, and $B$ has ... @@ -327,7 +327,12 @@ The counter $z$ requires only $\O(\log \log n)$ bits, and $B$ has $\O(1 / \varepsilon^2)$ entries, each of which needs $\O( \log n )$ bits. $\O(1 / \varepsilon^2)$ entries, each of which needs $\O( \log n )$ bits. Finally, the hash function $h$ needs $\O(\log n)$ bits, so the total space Finally, the hash function $h$ needs $\O(\log n)$ bits, so the total space used is dominated by $B$, and the algorithm uses $\O(\log n / \varepsilon^2)$ used is dominated by $B$, and the algorithm uses $\O(\log n / \varepsilon^2)$ space. space. As before, if we use the median trick, the space used increases to $\O(\log\delta \cdot \log n / \varepsilon^2)$. (TODO: include the version of this algorithm where we save space by storing $(g(a), {\tt tz}(h(a)))$ instead of $(a, {\tt tz}(h(a)))$ in $B$ for some hash function $g$ as an exercise?) \endchapter \endchapter ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!