The setup algorithms in App. 8B for the alias method produce cutoff values Fi that could actually be equal to 1; this will occur for at least one i if the second algorithm is used.
(a) Find a way to alter the cutoff and alias values so that every Fi will be strictly less than 1.
(b) With the Fi’s all being strictly less than 1, find a way to reduce the storage requirements from 2(n + 1) to n + 1 by combining the Li and Fi arrays into a single array of length n + 1. Restate the alias algorithm from Sec. 8.4.3 so that it works with this one-array method of holding the aliases and cutoff values.
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.