admin管理员组文章数量:1431720
I am given a Boolean expression of arbitrary depth, like (A or (B and (C or (~D and E) or F) or (G and H)))
. There can be any number of terms at each level.
I want to limit the depth of the expression (the maximum depth of nested parentheses + 1) to some constant like 4. If the depth exceeds that bound, then I want to generate an equivalent expression with depth that does not exceed the bound.
I know that I can convert to CNF or DNF, which would limit the depth to 2, but the size of the expression can blow up exponentially.
How can I take advantage of more available levels to limit the size of the resulting expression as much as possible?
本文标签: algorithmLimiting the depth of Boolean expressionsStack Overflow
版权声明:本文标题:algorithm - Limiting the depth of Boolean expressions - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745590358a2665159.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论