...

/

Non-uniform Discrete Distribution (Continued)

Non-uniform Discrete Distribution (Continued)

In this lesson, we will continue modifying our non-uniform discrete distribution and also learn about rejection sampling.

In the previous lesson, we sketched out an O(logO(log n)n) algorithm for sampling from a weighted distribution of integers by implementing a discrete variation on the “inverse transform” method where the “inverse” step involves a binary search.


Modification of Non-Uniform Discrete Distribution

Can we do better than O(logn) ...