简化布尔EX pression算法 [英] Simplify boolean expression algorithm
问题描述
任何人都知道一个算法的简化布尔EX pressions?
Anybody knows of an algorithm to simplify boolean expressions?
我记得布尔代数和Karnaught地图,但是这意味着数字硬件,其中EVERITHING是布尔值。我想的东西,考虑到某些子前pressions不是布尔值。
I remember the boolean algebra and Karnaught maps, but this is meant for digital hardware where EVERITHING is boolean. I would like something that takes into account that some sub-expressions are not boolean.
例如:
a == 1 && a == 3
这可以转换为一个纯粹的布尔EX pression:
this could be translated to a pure boolean expression:
a1 && a3
但这是前pression的束缚,同时用算术everibody的知识一点点可以确定EX pression就是:
but this is expression is irreducible, while with a little bit of knowledge of arithmetics everibody can determine that the expression is just:
false
有些身体知道一些链接?
Some body knows some links?
推荐答案
您可能会感兴趣的 K-地图和奎因 - 麦克拉斯基算法。
我觉得SymPy能够解决和简化布尔EX pressions,查看源可能是有用的。
I think SymPy is able to solve and simplify boolean expressions, looking at the source might be useful.
这篇关于简化布尔EX pression算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!