Talk:Alias method

optimizing
I wonder whether there's literature on building the table to maximize $$\Sigma U_i$$, i.e., minimize the probability of consulting K. —Tamfang (talk) 21:03, 24 November 2018 (UTC)


 * Oops, there it is: Doing this optimally turns out to be NP hard, but a “Robin Hood” heuristic comes reasonably close: rob from the richest and give to the poorest. Cute, but I'll add a link to greedy algorithm. —Tamfang (talk) 19:59, 26 September 2019 (UTC)