Table of Contents
Fetching ...

Las Vegas algorithms to generate universal cycles and de Bruijn sequences uniformly at random

Joe Sawada, Daniel Gabrić

TL;DR

This work delivers practical Las Vegas algorithms for uniformly sampling universal cycles across diverse combinatorial families by leveraging random arborescences in Eulerian de Bruijn graphs. The core method seeds a random edge, builds a random arborescence, orients bridges accordingly, and traverses to produce a random Euler cycle with constant-time per-symbol output and linear-space storage of the graph. The authors apply the framework to shorthand permutations, subsets, multiset permutations, weak orders, and several de Bruijn-related ensembles (including weight-range and forbidden-substring variants) and provide extensive experimental data on cover times, along with public code. The results demonstrate the feasibility of uniform random generation for these complex objects and offer insights into performance trade-offs and practical implementations. These contributions facilitate unbiased sampling for universal cycles and related sequences, with implications for combinatorial enumeration and randomized constructions.

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.

Las Vegas algorithms to generate universal cycles and de Bruijn sequences uniformly at random

TL;DR

This work delivers practical Las Vegas algorithms for uniformly sampling universal cycles across diverse combinatorial families by leveraging random arborescences in Eulerian de Bruijn graphs. The core method seeds a random edge, builds a random arborescence, orients bridges accordingly, and traverses to produce a random Euler cycle with constant-time per-symbol output and linear-space storage of the graph. The authors apply the framework to shorthand permutations, subsets, multiset permutations, weak orders, and several de Bruijn-related ensembles (including weight-range and forbidden-substring variants) and provide extensive experimental data on cover times, along with public code. The results demonstrate the feasibility of uniform random generation for these complex objects and offer insights into performance trade-offs and practical implementations. These contributions facilitate unbiased sampling for universal cycles and related sequences, with implications for combinatorial enumeration and randomized constructions.

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 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.
Paper Structure (10 sections, 2 theorems, 6 equations, 1 figure, 8 tables, 3 algorithms)

This paper contains 10 sections, 2 theorems, 6 equations, 1 figure, 8 tables, 3 algorithms.

Key Result

Lemma 4.1

Algorithm alg:weak can generate a weak order $w_1w_2\cdots w_n$ uniformly at random using $\mathcal{O}(n^2)$ simple operations on numbers up to $W_n$.

Figures (1)

  • Figure 1: Two de Bruijn graphs. The graph in (b) is Eulerian.

Theorems & Definitions (4)

  • Lemma 4.1
  • proof
  • Lemma 4.2
  • proof