Exercise 6. (Bonus) organizing books It is required to organize n books B1, B2, . . . , Bn on a library shelf in such a way that readers searching from left to right waste as little time as possible on average. Assuming that each reader requires book Bi with probability pi, find the ordering of the books which minimizes P (T ≥ k) for all k, where T is the (random) number of titles examined by a reader before discovery of the required book.