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.
翻译:本文提出了生成均匀随机通用循环的实用算法。具体而言,我们研究了简写排列、子集与多重集排列、弱序以及可定向序列的通用循环。此外,我们还探讨了德布鲁因序列、权重范围德布鲁因序列以及禁止$0^z$子串的德布鲁因序列。每种算法以给定集合中的随机元素作为种子,通过在底层欧拉德布鲁因图上执行随机游走,获得随机树状图(生成入树)。基于随机树状图与德布鲁因图,可在常数时间内按符号生成对应的随机通用循环。我们通过拉斯维加斯算法,展示了各类对象计算随机树状图所需平均覆盖时间的实验结果。