We present a method for generating random hypergraphs in context-free hypergraph languages. It is obtained by adapting Mairson's generation algorithm for context-free string grammars to the setting of hyperedge replacement grammars. Our main results are that for non-ambiguous hyperedge replacement grammars, the method generates hypergraphs uniformly at random and in quadratic time. We illustrate our approach by a running example of a hyperedge replacement grammar generating term graphs.
翻译:本文提出了一种在上下文无关超图语言中生成随机超图的方法。该方法通过将Mairson针对上下文无关字符串文法的生成算法适配到超边替换文法的框架中得到。我们的主要结果表明,对于非歧义超边替换文法,该方法能够以二次时间均匀随机地生成超图。我们通过一个持续运行的示例——生成项图的超边替换文法——来阐释我们的方法。