Skip to content
Snippets Groups Projects
Commit c3a0ad68 authored by Martin Mareš's avatar Martin Mareš
Browse files

Oops, a typo in "Corollary"!

parent 91c45d7a
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,7 @@ and once negatively. Therefore the right-hand side is equal to $3r_t(x) - 3r_0(x ...@@ -89,7 +89,7 @@ and once negatively. Therefore the right-hand side is equal to $3r_t(x) - 3r_0(x
as claimed by the theorem. as claimed by the theorem.
\qed \qed
\corr{ \cor{
As all ranks are logarithmic, the amortized cost of \alg{Splay} is $\O(\log n)$. As all ranks are logarithmic, the amortized cost of \alg{Splay} is $\O(\log n)$.
} }
...@@ -143,7 +143,7 @@ $ \sqrt{\alpha\beta} \le (\alpha + \beta) / 2 $. ...@@ -143,7 +143,7 @@ $ \sqrt{\alpha\beta} \le (\alpha + \beta) / 2 $.
As $\log{\alpha+\beta\over 2} = \log(\alpha+\beta) - 1$, the lemma implies: As $\log{\alpha+\beta\over 2} = \log(\alpha+\beta) - 1$, the lemma implies:
\corrxn{S}{sum of logarithms}{ \corxn{S}{sum of logarithms}{
For positive $\alpha$, $\beta$: $\log \alpha + \log \beta \le 2\log(\alpha+\beta) - 2$. For positive $\alpha$, $\beta$: $\log \alpha + \log \beta \le 2\log(\alpha+\beta) - 2$.
} }
......
...@@ -100,7 +100,7 @@ $$ ...@@ -100,7 +100,7 @@ $$
Therefore in each tree, we have $n \le b^h-1$, so $h \ge \log_b (n+1)$. Therefore in each tree, we have $n \le b^h-1$, so $h \ge \log_b (n+1)$.
\qed \qed
\corr{The height is $\Omega(\log_b n)$ and $\O(\log_a n)$.} \cor{The height is $\Omega(\log_b n)$ and $\O(\log_a n)$.}
\subsection{Searching for a~key} \subsection{Searching for a~key}
......
...@@ -144,7 +144,7 @@ present in the heap. Since each~$n$ has a~unique binary representation, the ...@@ -144,7 +144,7 @@ present in the heap. Since each~$n$ has a~unique binary representation, the
shape of the heap is fully determined by its size. Still, we have a~lot of shape of the heap is fully determined by its size. Still, we have a~lot of
freedom in location of items in the heap. freedom in location of items in the heap.
\corr{ \cor{
A~binomial heap with $n$~items contains $\O(\log n)$ trees, whose ranks and A~binomial heap with $n$~items contains $\O(\log n)$ trees, whose ranks and
heights are $\O(\log n)$. Each node has $\O(\log n)$ children. heights are $\O(\log n)$. Each node has $\O(\log n)$ children.
} }
...@@ -500,7 +500,7 @@ can be written as $F_0 + F_1 + F_2 + \ldots + F_k + 1$. By the previous lemma, t ...@@ -500,7 +500,7 @@ can be written as $F_0 + F_1 + F_2 + \ldots + F_k + 1$. By the previous lemma, t
is equal to~$F_{k+2}$. This completes the induction step. is equal to~$F_{k+2}$. This completes the induction step.
\qed \qed
\corrx{R}{ \corx{R}{
The ranks of all nodes are $\O(\log n)$. The ranks of all nodes are $\O(\log n)$.
} }
......
...@@ -416,7 +416,7 @@ the same. When OPT starts with non-empty cache, it can save up to $\Copt$ misses ...@@ -416,7 +416,7 @@ the same. When OPT starts with non-empty cache, it can save up to $\Copt$ misses
which is compensated by the extra $\Copt$ term in the statement of the theorem. which is compensated by the extra $\Copt$ term in the statement of the theorem.
\qed \qed
\corr{ \cor{
If we set $\Clru = 2\cdot\Copt$, then $\Tlru \le 2\Topt + \Copt$. So on a~long enough If we set $\Clru = 2\cdot\Copt$, then $\Tlru \le 2\Topt + \Copt$. So on a~long enough
access sequence, LRU is $(2+\varepsilon)$-competitive. access sequence, LRU is $(2+\varepsilon)$-competitive.
} }
......
...@@ -78,7 +78,7 @@ By linearity of expectation, we have ...@@ -78,7 +78,7 @@ By linearity of expectation, we have
$\E[A] = \E[\sum_i A_i] = \sum_i \E[A_i] \le \sum_i c/m = cn/m$. $\E[A] = \E[\sum_i A_i] = \sum_i \E[A_i] \le \sum_i c/m = cn/m$.
\qed \qed
\corrn{Complexity of hashing with chaining}{ \corn{Complexity of hashing with chaining}{
Consider a~hash table with chaining which uses $m$~buckets and a~hash function~$h$ Consider a~hash table with chaining which uses $m$~buckets and a~hash function~$h$
picked at random from a~$c$-universal family. Suppose that the hash table contains picked at random from a~$c$-universal family. Suppose that the hash table contains
items $x_1,\ldots,x_n$. items $x_1,\ldots,x_n$.
...@@ -338,7 +338,7 @@ So $\Pr[M] \le d/m^2 + cd/mr$. We want to write this as $c' / m^2$, so ...@@ -338,7 +338,7 @@ So $\Pr[M] \le d/m^2 + cd/mr$. We want to write this as $c' / m^2$, so
$c' = d + cdm/r = (1 + cm/r)d$. $c' = d + cdm/r = (1 + cm/r)d$.
\qed \qed
\corr{ \cor{
The family ${\cal F}\circ {\cal G}$ is also $(2,c')$-independent for $c' = (c+1)d$. The family ${\cal F}\circ {\cal G}$ is also $(2,c')$-independent for $c' = (c+1)d$.
} }
...@@ -369,7 +369,7 @@ Of course hashing from a~field to the same field is of little use, so we usually ...@@ -369,7 +369,7 @@ Of course hashing from a~field to the same field is of little use, so we usually
consider the family ${\cal P}_k\bmod m$ instead. If we set~$p$ large enough, Lemma~\xx{K} consider the family ${\cal P}_k\bmod m$ instead. If we set~$p$ large enough, Lemma~\xx{K}
guarantees: guarantees:
\corr{If $p \ge 2km$, the family ${\cal P}_k\bmod m$ is $(k,2)$-independent.} \cor{If $p \ge 2km$, the family ${\cal P}_k\bmod m$ is $(k,2)$-independent.}
The downside is that we need time $\Theta(k)$ both to pick a~function from the family The downside is that we need time $\Theta(k)$ both to pick a~function from the family
and to evaluate it for a~single~$x$. and to evaluate it for a~single~$x$.
...@@ -549,7 +549,7 @@ linear functions. Not only we get a~2-independent family as a~result, but Lemma~ ...@@ -549,7 +549,7 @@ linear functions. Not only we get a~2-independent family as a~result, but Lemma~
guarantees that if $p$~is sufficiently large, the big constant from $d$-universality guarantees that if $p$~is sufficiently large, the big constant from $d$-universality
disappears. disappears.
\corr{Given a~prime~$p$ and the number of buckets~$m$ such that $p \ge 4km$, the \cor{Given a~prime~$p$ and the number of buckets~$m$ such that $p \ge 4km$, the
compound family ${\cal R}\circ {\cal L}$ is $(2,5)$-independent.} compound family ${\cal R}\circ {\cal L}$ is $(2,5)$-independent.}
Hash functions of this kind play important role in the \em{Rabin-Karp string search Hash functions of this kind play important role in the \em{Rabin-Karp string search
...@@ -788,7 +788,7 @@ is bounded by the probability that one of the 12 blocks ...@@ -788,7 +788,7 @@ is bounded by the probability that one of the 12 blocks
is critical. By union bound and our estimate on the probability that a~block is critical, is critical. By union bound and our estimate on the probability that a~block is critical,
we get: we get:
\corr{ \cor{
Let~$R$ be a~run containing $h(x)$. The probability that Let~$R$ be a~run containing $h(x)$. The probability that
$\vert R\vert \in [2^{\ell+2}, 2^{\ell+3})$ is at most $\vert R\vert \in [2^{\ell+2}, 2^{\ell+3})$ is at most
$12 \cdot (\e/4)^{2^\ell / 3}$ = $12\cdot q^{2^\ell}$, where $q = (\e/4)^{1/3} \doteq 0.879$. $12 \cdot (\e/4)^{2^\ell / 3}$ = $12\cdot q^{2^\ell}$, where $q = (\e/4)^{1/3} \doteq 0.879$.
......
...@@ -119,7 +119,7 @@ Since all paths contain $\O(\log n)$ nodes together, we visit $\O(\log n)$ nodes ...@@ -119,7 +119,7 @@ Since all paths contain $\O(\log n)$ nodes together, we visit $\O(\log n)$ nodes
and report $\O(\log n)$ nodes and $\O(\log n)$ subtrees. and report $\O(\log n)$ nodes and $\O(\log n)$ subtrees.
\qed \qed
\corr{ \cor{
An~enumeration query is answered in time $\O(\log n + p)$, where~$p$ is the number An~enumeration query is answered in time $\O(\log n + p)$, where~$p$ is the number
of items reported. If we precompute sizes of all subtrees, a~counting query takes of items reported. If we precompute sizes of all subtrees, a~counting query takes
$\O(\log n)$ time. Aggregate queries can be answered if we precompute aggregate $\O(\log n)$ time. Aggregate queries can be answered if we precompute aggregate
......
...@@ -72,7 +72,7 @@ We can easily find the start and end of this range using binary search on the su ...@@ -72,7 +72,7 @@ We can easily find the start and end of this range using binary search on the su
We need $\O(\log |\alpha|)$ steps, each step involves string comparison with~$\alpha$, which We need $\O(\log |\alpha|)$ steps, each step involves string comparison with~$\alpha$, which
takes $\O(|\beta|)$ time in the worst case. This makes $\O(|\beta| \log|\alpha|)$ total. takes $\O(|\beta|)$ time in the worst case. This makes $\O(|\beta| \log|\alpha|)$ total.
\corr{Using the suffix array for~$\alpha$, we can enumerate all occurrences of a~substring~$\beta$ \cor{Using the suffix array for~$\alpha$, we can enumerate all occurrences of a~substring~$\beta$
in time $\O(|\beta| \log |\alpha| + p)$, where $p$~is the number of occurrences reported. Only in time $\O(|\beta| \log |\alpha| + p)$, where $p$~is the number of occurrences reported. Only
counting the occurrences costs $\O(|\beta| \log |\alpha|)$ time. counting the occurrences costs $\O(|\beta| \log |\alpha|)$ time.
} }
......
...@@ -755,10 +755,10 @@ ...@@ -755,10 +755,10 @@
\def\obs{\s{Observation:} \sbody} \def\obs{\s{Observation:} \sbody}
\def\note{\s{Note:} \sbody} \def\note{\s{Note:} \sbody}
\def\noten#1{\s{Note (#1):} \sbody} \def\noten#1{\s{Note (#1):} \sbody}
\def\corr{\s{Corrolary:} \sbody} \def\cor{\s{Corollary:} \sbody}
\def\corrn#1{\s{Corrolary (#1):} \sbody} \def\corn#1{\s{Corollary (#1):} \sbody}
\def\corrx#1{\s{Corrolary #1:} \sbody} \def\corx#1{\s{Corollary #1:} \sbody}
\def\corrxn#1#2{\s{Corrolary~#1 (#2):} \sbody} \def\corxn#1#2{\s{Corollary~#1 (#2):} \sbody}
\def\nota{\s{Notation:} \sbody} \def\nota{\s{Notation:} \sbody}
\def\example{\s{Example:} \sbody} \def\example{\s{Example:} \sbody}
\def\examples{\s{Examples:} \sbody} \def\examples{\s{Examples:} \sbody}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment