Why it matters

Alias method beats CDF-based sampling. Foundation for fast discrete sampling.

Advertisement

The architecture

Preprocess: table of probabilities + aliases.

Sample: roll die + biased coin.

Alias methodPreprocessprob + alias tablesRoll diechoose bucketBiased coinbucket or aliasVose's algorithm builds tables in O(n); each sample O(1)
Alias method.
Advertisement

How it works end to end

Vose's O(n) construction.

Each bucket: (prob_i, alias_i).

Sample: uniform bucket + coin.