なぜF + F '= 1ですか?


15

私は次の関数を持っています:f(x,y,z,w)=wx+yz

その補関数は次のようになりました:f(x,y,z,w)=wy+wz+xy+xz

私はそれを示さなければなり ません:f+f=1が、どうすればいいのかわかりません。

互いに打ち消し合うものは何もないようです。

編集

示唆されたように、私は今、DeMorganの定理を使用して、これを見つけました:

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

しかし、f + f = 1の実現に私を近づけるものは何もないように思えます。f+f=1


6
ヒント:使用ドモルガンの法則
Spehro Pefhany

11
fまたはf 'のいずれかは1でなければなりません
チュー

4
入力は4つだけです。他に何もない場合は、単純に真理値表を書くことができます。
光子

2
Spehroはお金に問題はありませんが、はい、最初のステップとしてDeMorganを適用しても効果はありません。Spehroのヒントを少し拡張するために、解決策には、DeMorganをステップとして含むいくつかの基本的な代数の実行が含まれます。単純な代数+ DeMorganを使用すると、f '関数を明らかに明らかなfの否定に変えることができます。一枚の紙にそれを走り書きして、それをするのに4つのステップが必要でした。
Mr Mr Snrub

1
@ Mr.Snrub「補数関数が見つかりました」の最初のステップは(wx + yz) 'である
OrangeDog

回答:


4

カールがきちんと尋ねたので。開始点:

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

Take the following steps with 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, again:
f(x,y,z,w)=(wx+yz)
So now the right-hand side of f is just the simple negation of the right-hand side of f. Which is a little anti-climactic, since now we just rely upon the fact that any expression x+x=1, which is what people have been saying all along about f+f=1, but at least it provides a little Boolean-algebra explanation for why that is true.


I don't understand how you got to the second line without passing by your final answer. Your final answer was my first step: it's just the negation of both sides.
C. Lange

The first two lines are the formulas given by OP. They are the starting point, by definition. I fully agree that the stuff later on may have been part of OP's derivation of those first two formulas. But we don't have that information; we just cannot confirm.
Mr. Snrub

Understood -- on the assumption that f and f were given in the question like OP has written them out. My understanding was that OP had already tried to expand f and didn't know where to go from there.
C. Lange

41

The point is, it really doesn't matter what the function f() actually is. The key fact is that its output is a single binary value.

It is a fundamental fact in Boolean algebra that the complement of a binary value is true whenever the value itself is false. This is known as the law of excluded middle. So ORing a value with its complement is always true, and ANDing a value with its complement is always false.

It's nice that you were able to derive the specific function f(), but that's actually irrelevant to the actual question!


1
This is known as the law of excluded middle.
BallpointBen

@BallpointBen: Thanks! I added it to my answer.
Dave Tweed

13

All previous answers are correct, and very much in depth. But a simpler way to approach this might be to remember that in boolean algebra, all values must be either 0 or 1.

So... either F is 1, then F' is 0, or the other way around: F is 0 and F' is 1. If you then apply the boolean OR-function: F + F', you will always have one of both terms 1, so the result will always be 1.


11

私の答えは、デイブツイードの答えと似ています。つまり、より正式なレベルに置いています。明らかに後で答えましたが、誰かがこのアプローチを面白いと思うかもしれないので、それを投稿することにしました。


fPnNy1,,ynyi{0,1} for all i=1,,n.
We have that P(y1,,yn){0,1} and consider the following two sets of Boolean values for the n-dimensional Boolean vector (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

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.