update notations and fix typos
This commit is contained in:
@@ -96,7 +96,7 @@ We wait for $R$ times and then take the stairs. In worst case, we wait for $R$ t
|
||||
|
||||
Competitive ratio = $\frac{2R}{R}=2$.
|
||||
|
||||
EOP
|
||||
QED
|
||||
|
||||
Let's try $R=S-E$ instead.
|
||||
|
||||
@@ -116,7 +116,7 @@ We wait for $R=S-E$ times and then take the stairs.
|
||||
|
||||
Competitive ratio = $\frac{S-E+S}{S}=2-\frac{E}{S}$.
|
||||
|
||||
EOP
|
||||
QED
|
||||
|
||||
What if we wait less time? Let's try $R=S-E-\epsilon$ for some $\epsilon>0$
|
||||
|
||||
@@ -174,7 +174,7 @@ The optimal offline solution: In each subsequence, must have at least $1$ miss.
|
||||
|
||||
So the competitive ratio is at most $k+1$.
|
||||
|
||||
EOP
|
||||
QED
|
||||
|
||||
Using similar analysis, we can show that LRU is $k$ competitive.
|
||||
|
||||
@@ -184,7 +184,7 @@ Split the sequence into subsequences such that each subsequence LRU has $k$ miss
|
||||
|
||||
Argue that OPT has at least $1$ miss in each subsequence.
|
||||
|
||||
EOP
|
||||
QED
|
||||
|
||||
#### Many sensible algorithms are $k$-competitive
|
||||
|
||||
@@ -210,7 +210,7 @@ So competitive ratio is at most $\frac{ck}{(c-1)k}=\frac{c}{c-1}$.
|
||||
|
||||
_Actual competitive ratio is $\sim \frac{c}{c-1+\frac{1}{k}}$._
|
||||
|
||||
EOP
|
||||
QED
|
||||
|
||||
### Conclusion
|
||||
|
||||
@@ -297,7 +297,7 @@ Let $P$ be a page in the cache with probability $1-\frac{1}{k}$.
|
||||
|
||||
With probability $\frac{1}{k}$, $P$ is not in the cache and RAND evicts $P'$ in the cache and brings $P$ to the cache.
|
||||
|
||||
EOP
|
||||
QED
|
||||
|
||||
MRU is $k$-competitive.
|
||||
|
||||
@@ -317,4 +317,4 @@ Let's define the random variable $X$ as the number of misses of RAND MRU.
|
||||
|
||||
$E[X]\leq 1+\frac{1}{k}$.
|
||||
|
||||
EOP
|
||||
QED
|
||||
|
||||
Reference in New Issue
Block a user