Enumeration, Counting, and Random Generation of Ladder Lotteries

Katsuhisa YAMANAKA, Shin-ichi NAKANO
2017 IEICE transactions on information and systems  
Katsuhisa YAMANAKA †a) and Shin-ichi NAKANO † †b) , Members SUMMARY A ladder lottery, known as "Amidakuji" in Japan, is one of the most popular lotteries. In this paper, we consider the problems of enumeration, counting, and random generation of the ladder lotteries. For given two positive integers n and b, we give algorithms of enumeration, counting, and random generation of ladder lotteries with n lines and b bars. The running time of the enumeration algorithm is O(n + b) time for each. The
more » ... nning time of the counting algorithm is O(nb 3 ) time. The random generation algorithm takes O(nb 3 ) time for preprocess, and then it generates a ladder lottery in O(n + b) for each uniformly at random.
doi:10.1587/transinf.2016fcp0015 fatcat:uakde7532zf4vcwx4w23ybts4q