Problem

Consider a directory of classified advertisements that consists of m pages, where m is ver...

Consider a directory of classified advertisements that consists of m pages, where m is very large. Suppose that the number of advertisements per page varies and that your only method of finding out how many advertisements there are on a specified page is to count them. In addition, suppose that there are too many pages for it to be feasible to make a complete count of the total number of advertisements and that your objective is to choose a directory advertisement in such a way that each of them has an equal chance of being selected.

(a) If you randomly choose a page and then randomly choose an advertisement from that page, would that satisfy your objective? Why or why not?


Let n(i) denote the number of advertisements on page i,i = 1,..., m, and suppose that whereas these quantities are unknown, we can assume that they are all less than or equal to some specified value n. Consider the following algorithm for choosing an advertisement.

Step 1. Choose a page at random. Suppose it is page X. Determine n (X) by counting the number of advertisements on page X.

Step 2. ‘Accept” page X with probability n(X)/n. If page X is accepted, go to step 3. Otherwise, return to step 1.

Step 3. Randomly choose one of the advertisements on page X.

Call each pass of the algorithm through step 1 an iteration. For instance, if the first randomly chosen page is rejected and the second accepted, then we would have needed 2 iterations of the algorithm to obtain an advertisement.

(b) What is the probability that a single iteration of the algorithm results in the acceptance of an advertisement on page i?


(c) What is the probability that a single iteration of the algorithm results in the acceptance of an advertisement?


(d) What is the probability that the algorithm goes through k iterations, accepting the jth advertisement on page i on the final iteration?


(e) What is the probability that the jth advertisement on page i is the advertisement obtained from the algorithm?


(f) What is the expected number of iterations taken by the algorithm?

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search