algorithm - Limiting the depth of Boolean expressions - Stack Overflow

I am given a Boolean expression of arbitrary depth, like (A or (B and (C or (~D and E) or F) or (G and

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745590358a4634793.html

相关推荐

  • algorithm - Limiting the depth of Boolean expressions - Stack Overflow

    I am given a Boolean expression of arbitrary depth, like (A or (B and (C or (~D and E) or F) or (G and

    9小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信