🤖 AI Summary
This work addresses the uniform random generation of universal cycles and de Bruijn sequences—including compact representations of permutations, subsets, multiset permutations, weak orders, and orientable sequences—as well as variants with weight constraints or forbidden substrings. We propose a novel framework coupling random walks on Eulerian digraphs with arborescence sampling, enabling the first constant-time-per-symbol unbiased sampling for these combinatorial objects. Our key innovation unifies Las Vegas algorithms, random arborescence generation, and Eulerian circuit traversal into a single model that eliminates backtracking and rejection sampling. Experimental evaluation confirms optimal average cover time across all sequence types, achieving both computational efficiency and provably uniform distribution. This constitutes the first general-purpose, rigorously uniform construction method for such combinatorial sequences.
📝 Abstract
We present practical algorithms for generating universal cycles uniformly at random. In particular, we consider universal cycles for shorthand permutations, subsets and multiset permutations, weak orders, and orientable sequences. Additionally, we consider de Bruijn sequences, weight-range de Bruin sequences, and de Bruijn sequences, with forbidden $0^z$ substring. Each algorithm, seeded with a random element from the given set, applies a random walk of an underlying Eulerian de Bruijn graph to obtain a random arborescence (spanning in-tree). Given the random arborescence and the de Bruijn graph, a corresponding random universal cycle can be generated in constant time per symbol. We present experimental results on the average cover time needed to compute a random arborescence for each object using a Las Vegas algorithm.