The slice equivalence problem for unambiguous context-free grammars is stated as follows: given two unambiguous context-free grammars \(G_1\) and \(G_2\) , tell whether or not they describe the same set of strings of length n. The paper presents an \(O({{\,\textrm{poly}\,}}(n, |G_1|, |G_2|))\) randomized algorithm for this problem. If the sets are different, the algorithm constructs the lexicographically smallest string on which they do not agree. The algorithm combines the idea of the Cocke–Kasami–Younger parsing algorithm and the Schwartz–Zippel lemma.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Checking whether Two Unambiguous Context-Free Grammars Describe the Same Set of Strings of Length n

  • Vladislav Makarov

摘要

The slice equivalence problem for unambiguous context-free grammars is stated as follows: given two unambiguous context-free grammars \(G_1\) and \(G_2\) , tell whether or not they describe the same set of strings of length n. The paper presents an \(O({{\,\textrm{poly}\,}}(n, |G_1|, |G_2|))\) randomized algorithm for this problem. If the sets are different, the algorithm constructs the lexicographically smallest string on which they do not agree. The algorithm combines the idea of the Cocke–Kasami–Younger parsing algorithm and the Schwartz–Zippel lemma.