Controlled non uniform random generation of decomposable structures - Archive ouverte HAL Access content directly
Journal Articles Theoretical Computer Science Year : 2010

Controlled non uniform random generation of decomposable structures

Abstract

Consider a class of decomposable combinatorial structures, using different types of atoms ${\cal Z} = \{z_1,\ldots ,z_{|{\cal Z}|}\}$. We address the random generation of such structures with respect to a size $n$ and a targeted distribution in $k$ of its \emph{distinguished} atoms. We consider two variations on this problem. In the first alternative, the targeted distribution is given by $k$ real numbers $\mu_1, \ldots, \mu_k$ such that $0 < \mu_i < 1$ for all $i$ and $\mu_1+\cdots+\mu_k \leq 1$. We aim to generate random structures among the whole set of structures of a given size $n$, in such a way that the {\em expected} frequency of any distinguished atom $z_i$ equals $\mu_i$. We address this problem by weighting the atoms with a $k$-tuple $\pi$ of real-valued weights, inducing a weighted distribution over the set of structures of size $n$. We first adapt the classical recursive random generation scheme into an algorithm taking ${\cal O}(n^{1+o(1)}+mn\log{n})$ arithmetic operations to draw $m$ structures from the $\pi$-weighted distribution. Secondly, we address the analytical computation of weights such that the targeted frequencies are achieved asymptotically, i. e. for large values of $n$. We derive systems of functional equations whose resolution gives an explicit relationship between $\pi$ and $\mu_1, \ldots, \mu_k$. Lastly, we give an algorithm in ${\cal O}(k n^4)$ for the inverse problem, {\it i.e.} computing the frequencies associated with a given $k$-tuple $\pi$ of weights, and an optimized version in ${\cal O}(k n^2)$ in the case of context-free languages. This allows for a heuristic resolution of the weights/frequencies relationship suitable for complex specifications. In the second alternative, the targeted distribution is given by a $k$ natural numbers $n_1, \ldots, n_k$ such that $n_1+\cdots+n_k+r=n$ where $r \geq 0$ is the number of undistinguished atoms. The structures must be generated uniformly among the set of structures of size $n$ that contain {\em exactly} $n_i$ atoms $z_i$ ($1 \leq i \leq k$). We give a ${\cal O}(r^2\prod_{i=1}^k n_i^2 +m n k \log n)$ algorithm for generating $m$ structures, which simplifies into a ${\cal O}(r\prod_{i=1}^k n_i +m n)$ for regular specifications.

Keywords

Fichier principal
Vignette du fichier
NonUniform2009.pdf (1.53 Mo) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-00483581 , version 1 (14-05-2010)
hal-00483581 , version 2 (30-03-2018)

Identifiers

Cite

Alain Denise, Yann Ponty, Michel Termier. Controlled non uniform random generation of decomposable structures. Theoretical Computer Science, 2010, 411 (40-42), pp.3527-3552. ⟨10.1016/j.tcs.2010.05.010⟩. ⟨hal-00483581v2⟩
480 View
206 Download

Altmetric

Share

Gmail Facebook X LinkedIn More