On each request the ith of n possible books is the one chosen with probability pi. To make it quicker to find the book the next
time, the librarian moves the book to the left end of the shelf. Define the state at any time to be the sequence of books we see as we examine the shelf from left to right. Since all the books are distinct this list is a permutation of the set {1, 2,... n}, i.e., each number is listed exactly once. Show that Ï(i1,... in)= pi1. pi^2/1-pi_1 . pi^3/1-pi_1- pi_2 ........ pi^n/1-pi_1- pi_2.....pi_n is a stationary distribution.