我有以下功能:
f(x) = (x2 + x1x3x5)(x4 + x3x5x6)(x5 + x6)
如何使表达式如下:
f(x) = x1x2x3 + x2x3x4 + ...
出于此?有什么方法吗?
我不确定SO是否是发布此内容的正确位置...我猜它不是,但仍然,我找到了标签和大约100个帖子,所以我在这里: p
答案 0 :(得分:0)
据我记得布尔代数,你可以将它们乘以普通数。 所以(x2 + x1x3x5)(x5 + x6)将是x2x5 + x2x6 + x1x3x5x5 + x1x3x5x6。但据我记得,这仅适用于“AND”而不是“OR”
答案 1 :(得分:0)
这看起来更像是一个数学问题。
但是,如果我理解你想要的东西,它会是这样的
x2x4x5+x2x4x6+x2x3x5x6x5+x2x3x5x6x6+x1x3x5x4 ext.
基本上 (A1 + A2)A3 = a1a3 + A2A3 (A1 + A2)(A3 + A4)= a1a3 + a1a4 + A2A3 + A3A4
答案 2 :(得分:0)
你走了:
(x2x4x5 + x1x3x5)(x4x6) + (x2x5 + x1x3x5)(x3x5x6)
(x2x4x5x6 + x1x3x4x5x6) + (x2x5 + x1x3x5)(x3x5x6)
x2x4x5x6 + x1x3x4x5x6 + x2x3x5x6 + x1x3x5x6
x2x4x5x6 + x1x3(x4x5x6 + x5x6) + x2x3x5x6
x2x5x6(x4+1) + x1x3(x4x5x6 + x5x6)
x2x4x5x6 + x1x3(x5x6(x4+1))
x2x4x5x6 + x1x3(x4x5x6)
x2x4x5x6 + x1x3x4x5x6
(x2+x1x3)x4x5x6
我可能在某处犯了错误,所以你应该先测试一下。
答案 3 :(得分:0)
你原来的:
f(x) = (x2 + x1x3x5)(x4 + x3x5x6)(x5 + x6)
现在使用一些简单的数学:
f(x) = (x2x4 + x2x3x5x6 + x1x3x5x4 + x1x3x5x3x5x6)(x5 + x6)
f(x) = x2x4x5 + x2x3x5x6x5 + x1x3x5x4x5 + x1x3x5x3x5x6x5 + x2x4x6 + x2x3x5x6x6 + x1x3x5x4x6 + x1x3x5x3x5x6x6
简化让我们得到答案(虽然不一定更短),
f(x) = x2x4x5 + x2x3x5x6 + x1x3x5x4x5 + x1x3x5x6 + x2x4x6 + x2x3x5x6 + x1x3x5x4x6 + x1x3x5x6