In the following question, I am not able to find an O(log n) algorithm when the algorithm should run irrespective of the value of pi.
"Consider a problem of using a source of unbiased random bits to generate samples from the set S = {0,1,...,n-1} such that the element 'i' is chosen with probability pi. Show how to perform this sampling using O(log n) random bits per sample, regardless of the values of pi. Prove that for certain pi and n (for example, a uniform sample from {1,2,3}), if you only you have unbiased random bits, it is impossible top generate an appropriately distributed sample using finite number of bits in the worst case."
Aucun commentaire:
Enregistrer un commentaire