Algorithms, Complexity, and Entropy of the Bernard-Letac Fair-Sampling Construction
Bernard and Letac (1971) introduced a method for uniform random sampling among $m$ outcomes from an unknown biased source of independent and identically distributed symbols. The process terminates when the multinomial coefficient of the cumulative symbol counts equals zero modulo $m$. This study extends the computational and information-theoretic analysis of their construction by presenting five algorithms with formal correctness guarantees and comprehensive complexity analyses. For prime $m=p$, the Bernard-Letac framework is analyzed in greater detail. The Rényi entropies of the source yield an exact product formula for the expected number of draws. A first-order approximation consistently overestimates this value, and the entropy lower bound is never attained. As $p$, treated as a continuous parameter, approaches 1, the expected cost converges to a constant greater than 1, determined by the entire source distribution. Furthermore, for every prime modulus $p$ and every finite alphabet $I$, an explicit automaton with $p + |I| + 3$ states computes the mod-$p$ first-passage kernel of the walk from the base-$p$ digits of its arguments, reducing the fair assignment cost from quadratic to nearly linear.