How many titles should be in the cache so that with 99% probability an arriving book will be in the cache?

67 Views Asked by At

A book store has 10,000 titles. Let Z be the rank of a titles popularity. The distribution of Z is well described by the Zipf probability function. $PZ(k)= \frac{α}{k} , k=1,2,…,10000$

In order to provide a fast response, the store caches the most popular titles. How many titles should be in the cache so that with 99% probability an arriving book will be in the cache?

I already worked out α to be 0.10217.

1

There are 1 best solutions below

2
On BEST ANSWER

I´ve calculated $\alpha=0.102171$ as well by using the Euler approximation with the Euler-Mascheroni constant. For large $n$

$$\sum_{k=1}^n \frac1k\approx \ln(n)+0.5772$$

Now the equality is

$$0.102171\cdot \left(\ln(k^*)+0.5772\right)= 0.99$$

Solve for $k^*$