English

Multi-dimensional Boltzmann Sampling of Languages

Data Structures and Algorithms 2010-12-21 v3

Abstract

This paper addresses the uniform random generation of words from a context-free language (over an alphabet of size kk), while constraining every letter to a targeted frequency of occurrence. Our approach consists in a multidimensional extension of Boltzmann samplers \cite{Duchon2004}. We show that, under mostly \emph{strong-connectivity} hypotheses, our samplers return a word of size in [(1ε)n,(1+ε)n][(1-\varepsilon)n, (1+\varepsilon)n] and exact frequency in O(n1+k/2)\mathcal{O}(n^{1+k/2}) expected time. Moreover, if we accept tolerance intervals of width in Ω(n)\Omega(\sqrt{n}) for the number of occurrences of each letters, our samplers perform an approximate-size generation of words in expected O(n)\mathcal{O}(n) time. We illustrate these techniques on the generation of Tetris tessellations with uniform statistics in the different types of tetraminoes.

Keywords

Cite

@article{arxiv.1002.0046,
  title  = {Multi-dimensional Boltzmann Sampling of Languages},
  author = {Olivier Bodini and Yann Ponty},
  journal= {arXiv preprint arXiv:1002.0046},
  year   = {2010}
}

Comments

12pp

R2 v1 2026-06-21T14:41:29.005Z