首页> 外文期刊>Theoretical computer science >Non-redundant random generation algorithms for weighted context-free grammars
【24h】

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

机译:加权上下文无关文法的非冗余随机生成算法

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

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 O (k · n · 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.
机译:我们解决了无上下文语言中长度为n的k个单词的非冗余随机生成。此外,我们希望避免使用预定义的单词集。我们研究了一种基于拒绝的方法,在某些情况下以及在优惠券收集器的极限情况下,其最坏情况下的时间复杂度显示为k呈指数增长。我们分别提出两种基于递归方法和非排序方法的算法。我们展示了这些算法的谨慎实现方式如何允许在预计算Θ(n)数后在O(k·n·log n)算术运算中非冗余地生成长度为n的k个单词。因此,总体复杂度由k个字的生成决定,并且非冗余的成本可忽略不计。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号