arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.00522cs.CL
收藏

如何从上下文无关文法中枚举树

How to enumerate trees from a context-free grammar

Steven T. Piantadosi

AI总结:

本研究提出一种基于配对函数建立CFG推导与自然数双射的树枚举算法,可用于自然逻辑语言表达式编号,还能推广至更通用推导形式及树上类Lempel-Ziv编码场景。

摘要:

本文提出一种用于枚举由上下文无关文法(CFG)生成的树的简单算法。该算法使用配对函数在CFG推导与自然数之间建立双射,从而可通过计数唯一解码出树。这为自然逻辑语言中的表达式编号提供了通用方法,且有望扩展至其他组合问题。本文还展示了如何将该算法推广至更通用的推导形式,包括树上的Lempel-Ziv编码的类似形式。

英文摘要:

I present a simple algorithm for enumerating the trees generated by a Context Free Grammar (CFG). The algorithm uses a pairing function to form a bijection between CFG derivations and natural numbers, so that trees can be uniquely decoded from counting. This provides a general way to number expressions in natural logical languages, and potentially can be extended to other combinatorial problems. I also show how this algorithm may be generalized to more general forms of derivation, including analogs of Lempel-Ziv coding on trees.

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

↑