Problem 3: Web Caching If you think about it, web browsing is basically a Markov chain - the page you'll go to next depends on the page you're currently at. Suppose our web server has 3 pages, and we have the following reference probabilities:
\[
\begin{array}{r}
P(1 \rightarrow 1)=0 \quad P(1 \rightarrow 2)=x \quad P(1 \rightarrow 3)=1-x \\
P(2 \rightarrow 1)=y \quad P(2 \rightarrow 2)=0 \quad P(2 \rightarrow 3)=1-y \\
P(3 \rightarrow 1)=0 \quad P(3 \rightarrow 2)=1 \quad P(3 \rightarrow 3)=0
\end{array}
\]
Assume that \( 0<x<y<\frac{1}{2} \). These are transition probabilities: If I'm at page 1, then I will ask for page 2 next with probability \( \mathrm{x} \) and for page 3 next with probability \( 1-x \).
Recall that web browsers cache pages so that they can be quickly retrieved later. We will assume that the cache has enough memory to store two pages. Whenever a request comes in for a page that is not cached, the browser will store that page in the cache, replacing the page least likely to be referenced next based on the current request. For example, if my cache contained pages \( \{2,3\} \) and I requested page 1 , I would now store \( \{1,3\} \) in my cache (since \( x<1-x \) ).
(a) Find the proportion of time that the cache contains the following pages (HINT: be very careful about the state space you will use):
(i) \( \{1,2\} \) (ii) \( \{2,3\} \) (iii) \( \{1,3\} \).
(b) Find the proportion of requests that are for cached pages.