arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1211.0303cs.FLcs.DMcs.DS
收藏

加权上下文无关语言的无冗余随机生成算法

Non-redundant random generation algorithms for weighted context-free languages

Andy Lorenz, Yann Ponty

摘要:

我们解决了在上下文无关语言中长度为$n$的$k$字的非冗余随机生成。此外,我们希望避免预定义的单词集。我们研究了一个拒绝为基础的方法,其最坏情况下的时间复杂度呈指数增长与$k$的一些规格和限制的情况下,优惠券收集器。我们提出了两种算法,分别基于递归的方法和一个unranking的方法。我们如何仔细实现这些算法允许在$\mathcal{O}(k\cdot n\cdot \log{n})$算术运算的长度$n$的$k$字的非冗余生成,经过预计算的$Θ(n)$号码。因此,总体复杂性由$k$字的生成支配,并且非冗余性的代价可以忽略不计。

英文摘要:

We address the non-redundant random generation of $k$ words of length $n$ in a context-free language. Additionally, we want to avoid a predefined set of words. We study a rejection-based approach, whose worst-case time complexity is shown to grow exponentially with $k$ for some specifications and in the limit case of a coupon collector. We propose two algorithms respectively based on the recursive method and on an unranking approach. We show how careful implementations of these algorithms allow for a non-redundant generation of $k$ words of length $n$ in $\mathcal{O}(k\cdot n\cdot \log{n})$ arithmetic operations, after a precomputation of $Θ(n)$ numbers. The overall complexity is therefore dominated by the generation of $k$ words, and the non-redundancy comes at a negligible cost.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑