为什么F + F'= 1?


15

我有函数:f(x,y,z,w)=wx+yz

我发现其补函数为:f(x,y,z,w)=wy+wz+xy+xz

我必须证明: 但我看不到该怎么做。f+f=1

似乎没有什么可以抵消彼此的。

编辑

如所建议的,我现在使用了德摩根定理并发现了这一点:

f+f=wx+yz+(w+y)+(w+z)+(x+y)+(y+z)

但是在我看来,没有什么可以使我更接近的实现。f+f=1


6
提示:使用德摩根定律
Spehro Pefhany

11
F或F”必须是1

4
您只有4个输入。如果没有别的,您可以简单地写出真值表。
Photon

2
Spehro的钱是对的,但可以肯定的是,将DeMorgan用作第一步并没有帮助。因此,请进一步扩展Spehro的提示:该解决方案涉及做一些基本的代数,其中包括DeMorgan。使用简单的代数+ DeMorgan可以将f'函数转换为f的明显负数。把它写在纸上,只花了我4个步骤就可以了。
斯努布先生19年

1
@ Mr.Snrub“我发现其补函数”的第一步应该是(wx + yz)'
OrangeDog

Answers:


4

自从卡尔问得很好。起点:

f(x,y,z,w)=wx+yz
f(x,y,z,w)=wy+wz+xy+xz

f执行以下步骤:

f(x,y,z,w)=w(y+z)+x(y+z)
f(x,y,z,w)=(w+x)(y+z)
DeMorgan:
f(x,y,z,w)=(wx)(yz)
DeMorgan,再次:
f(x,y,z,w)=(wx+yz)
所以,现在的右侧f只是右手边的简单否定f。这有点反高潮,因为现在我们仅依赖任何表达式x+x=1,这就是人们一直在说的关于f+f=1事实,但至少它提供了一点布尔代数解释,说明为何如此。


如果不通过最终答案,我不明白您如何到达第二行。您的最终答案是我的第一步:这只是双方的否定。
C. Lange

前两行是OP给出的公式。根据定义,它们是起点。我完全同意,稍后的内容可能是OP对前两个公式进行推导的一部分。但是我们没有这些信息。我们只是无法确认。
斯努布先生19年

理解了-假设在问题中给定了f ',例如OP已将它们写出。我的理解是,OP已经尝试扩展f ',并且不知道从那里去哪里。fff
C. Lange

41

关键是,函数f()实际是什么并不重要。关键事实是其输出是单个二进制值。

在布尔代数中,一个基本事实是,只要值本身为假,二进制值的补码就为真。这就是所谓的排除中间定律。因此,将值与其补数进行“或”运算始终为真,而将值与其补数进行“与”运算始终为假。

能够导出特定的函数f()很好,但这实际上与实际问题无关!


1

@BallpointBen:谢谢!我将其添加到我的答案中。
戴夫·特威德

13

先前的所有答案都是正确的,而且非常深入。但是更简单的方法可能是记住在布尔代数中,所有值都必须为0或1。

所以... F等于1,然后F'为0,或者相反:F为0且F'为1。如果然后应用布尔OR函数:F + F',则总会有一个两个项都为1,因此结果始终为1。


11

我的答案与Dave Tweed的答案相似,这意味着我将其放在了较为正式的水平。我显然稍后会回答,但是我还是决定发布它,因为有人可能会发现这种方法很有趣。


您试图证明的关系独立于函数f的结构,因为事实上它是一个重言式。要解释一下我的意思是,我提出了一个普通,正常形成,布尔表达式示范P布尔变量的任意数,说nNy1,,yn,其中yi{0,1}对于所有i=1,,n
我们有那个P(y1,,yn){0,1},并考虑为以下两组布尔值的n维布尔矢量(y1,,yn)

Y={(y1,,yn){0,1}n|P(y1,,yn)=1}Y¯={(y1,,yn){0,1}n|P(y1,,yn)=0}
These set are a partition of the full set of values the input Boolean vector can assume, i.e. YY¯={0,1}n and YY¯= (the empty set), thus
P(y1,,yn)={0if (y1,,yn)Y¯1if (y1,,yn)YP(y1,,yn)={1if (y1,,yn)Y¯0if (y1,,yn)Y
therefore we always have
P+P=1(y1,,yn){0,1}n


11

All good answers that provide the necessary justification in one way or the other. Since it is a tautology, it's hard to create a proof that doesn't just result in "it is what it is!". Perhaps this method help tackle it from yet another, broader angle:

Expand both statements to include their redundant cases, and the remove the repeated cases:

𝑓=𝑤𝑥+𝑦𝑧  =wx(yz+yz+yz+yz) + yz(xw+xw+xw+xw)  =wxyz+wxyz+wxyz+wxyz + yzxw+yzxw+yzxw+yzxw  =wxyz+wxyz+wxyz+wxyz + yzxw+yzxw+yzxw

and

𝑓=𝑤𝑦+𝑤𝑧+𝑥𝑦+𝑥𝑧   =wy(xz+xz+xz+xz) + 𝑤𝑧(xy+xy+xy+xy) +         xy(wz+wz+wz+wz) + x𝑧(wy+wy+wy+wy)   =wyxz+wyxz+wyxz+wyxz + 𝑤𝑧xy+𝑤𝑧xy+𝑤𝑧xy+𝑤𝑧xy +         xywz+xywz+xywz+xywz + x𝑧wy+x𝑧wy+x𝑧wy+x𝑧wy   =wyxz+wyxz+wyxz+wyxz + 𝑤𝑧xy+𝑤𝑧xy +         xywz+xywz + x𝑧wy

I've kept the terms in consistent order to make the derivation more obvious, but they could be written alphabetically to be clearer. In any case, the point is that f ORs seven 4-bit cases, and f ORs nine, distinct 4-bit cases. Together they OR all sixteen 4-bit cases, so reduce to 1.


4
+1 this is the only answer that is answering the true intention of the OPs question, which is to do some Boolean algebra rather than making theoretical arguments. But per my comment on the OP, note that a more elegant solution does exist; this problem can be solved without needing to add in the redundant cases.
Mr. Snrub

I would very much like to see that as well. That is, if you have the time and the generosity to do it.t
Carl

8

F + F' = 1 means that you have to show that no matter the state of the 4 inputs, OR'ing the result of those 2 always result in 1,

A few minutes in excel shows it is indeed the case. You can use "NOT()" to invert between 0 and 1 in excel.

F = W * X + Y * Z

F' = W' * Y' + W' * Z' + X' * Y' + X' * Z'

As to why this is the case, If you want F to be false, e.g. setting W and Y low, you just made F' true. If you make X and Z low, you also made F" true, same for swapping there pairs.

enter image description here


2
"F + F' = 1 means that you have to show that no matter the state of the 4 inputs, OR'ing the result of those 2 always result in 1" . No, it doesn't. It merely means that you have to show that regardless of the output (which can only have two possibilities) and the corresponding output of its complement, the relation holds. The inputs are irrelevant, as is the function. The only truth table needed is the one showing the relationship between the output of the function and the output of anything qualifying as its complement.
Chris Stratton

@ChrisStratton, that depends if the question is to show that the OR of a function and its complement is always 1 (which is trivial by definition of the complement) or to show that the proposed function F' is actually the complement of F. From OP's wording, I think they had a 2 part problem. Part A: find the complement function. Part B: show that it actually is the complement.
The Photon

0

By simple definition of + (OR) and (NOT)

 A | B | A + B
---------------
 0 | 0 |   0
 1 | 0 |   1
 0 | 1 |   1
 1 | 1 |   1
 A | A′| A + A′
----------------
 0 | 1 |   1
 1 | 0 |   1

f.f+f=1

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.