MHB Prove the following Logic Property

  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    Logic Property
AI Thread Summary
The discussion revolves around proving the logic property x + y * z = (x + y)(x + z) using a truth table, which is identified as the distributive property of disjunction over conjunction. Participants analyze the truth table outputs, addressing discrepancies in calculations and the importance of proper evaluation order. There is a consensus on the necessity of parentheses in Boolean expressions to avoid ambiguity, as the operations of conjunction and disjunction are treated equally in Boolean algebra. Ultimately, the proof is confirmed through correct manipulation and evaluation of the truth table, leading to the conclusion that x + yz = (x + y)(x + z). The conversation emphasizes clarity in notation and the logical principles governing Boolean operations.
shamieh
Messages
538
Reaction score
0
Prove the following logic property using a Truth Table (perfect induction). What is this property called?

x + y * z = (x + y)(x + z)

My Answer:

Distributive Property?

Truth table.

  1. x y z f
    [0]0 0 0 0
    [1]0 0 1 0
    [2]0 1 0 0
    [3]0 1 1 1
    [4]1 0 0 0
    [5]1 0 1 1
    [6]1 1 0 0
    [7]1 1 1 1

By truth table I get: $$\bar{x}yz + x\bar{y}z + xyz$$ which becomes z + z + xyz ?Am I doing this wrong? Why am I not getting x + yz?

should I use algebraic manipulation?

x + yz = (x + y)(x + z)
x + yz = xx + xz + xy + yz
x + yz = x + xz + xy + yz
now what?
 
Last edited:
Physics news on Phys.org
shamieh said:
Prove the following logic property using a Truth Table (perfect induction). What is this property called?

x + y * z = (x + y)(x + z)

My Answer:

Distributive Property?
Yes, distributivity of disjunction over conjunction. Regular distributivity in arithmetic x * (y + z) = x * y + x * z is distributivity of multiplication over addition: multiplication is carried into the sum and is distributed to each of the terms y and z. Similarly, in x + y * z = (x + y) * (x + z), disjunction (+) is carried into the conjunction and is distributed to each of the conjuncts y and z. This type of distributivity does not hold in regular arithmetic, unlike distributivity of conjunction over disjunction: x * (y + z) = x * y + x * z.

shamieh said:
Truth table.
  1. x y z f
  2. 0 0 0 0
  3. 0 0 1 0
  4. 0 1 0 0
  5. 0 1 1 1
  6. 1 0 0 0
  7. 1 0 1 1
  8. 1 1 0 0
  9. 1 1 1 1
Is this the truth table of the left- or right-hand side? In any case, check rows 6 and 8.
 
Is this the truth table of the left- or right-hand side? In any case, check rows 6 and 8.
The truth table is of the left hand side. What do I need to check rows 6 and 8 for?

$$Row 6:$$ 1 OR 0 = 1, 1 AND 1 = 1, thus; 1.
$$Row 8:$$ 1 OR 1 = 1, 1 AND 1 = 1, thus; 1

"OR evaluates to 1 if any n in the comparison is 1"
"AND evaluates to 1 if every n in the comparison is 1"

These hold true...So I don't understand the problem here?
 
Last edited:
shamieh said:
$$Row 6:$$ 1 OR 0 = 1, 1 AND 1 = 1, thus; 1.
$$Row 8:$$ 1 OR 1 = 1, 1 AND 1 = 1, thus; 1
I don't understand how you calculated this. But in any case, you got 1, while in post #1 the value of f in rows 6 and 8 is 0.

The left-hand side is x + y * z.

Row 6: x = 1, y = 0, z = 0, so x + y * z = 1 + 0 * 0 = 1 + 0 = 1.

Row 8: x = 1, y = 1, z = 0, so x + y * z = 1 + 1 * 0 = 1 + 0 = 1.
 
I don't understand how you calculated this.
I've forgotten a row :p Let me fix it lol.
 
Last edited:
I labeled my rows correctly now. Can you check and see if my $f$ is producing the right output again?

Here is what I am getting: $$\bar{x}yz + x\bar{y}z + xyz$$ which is $$z + z + xyz$$?
 
shamieh said:
Can you check and see if my $f$ is producing the right output again?
Please check rows 4 and 6. The value of (x + y * z) should be 1 there, as I explained in post #4.
 
I found the Problem Ev, I was evaluating 1 + 0 before I was evaluating 0 * 0. I feel like an idiot. Thanks so much for the help!

so i get

$$(\bar{x}yz)+(x\bar{y}\bar{z})+(x\bar{y}z)+(xy\bar{z})+(xyz) = x + yz$$ which by distributivity of disjunction over conjuction gives me$$ (x + y)(x + z) = xx + yz = x + yz$$ :D:D

thus

$$x + yz = (x + y)(x + z)$$
 
Last edited:
Just a reminder:

(x+y)*z is not the same as: x+(y*z), as one can see by setting:

x = y = 1, z = 0.

Parentheses matter.
 
  • #10
x +yz is equivalent to x +(y*z) though correct? Or should I include parenthesis just to be safe? Because if you know that yz is y * z wouldn't it be obvious that according to operations it is clear the multiplication would be done, then addition?
 
  • #11
If you are following a CONVENTION in which it is AGREED that multiplication is performed FIRST, then yes.

Although such a convention exists for ordinary arithmetic, it does not (logically) follow that the same convention is to be used for Boolean operations.

In ordinary arithmetic, multiplication is a "higher level" operation than addition (addition has to be defined first, and then multiplication is "iterated addition"). In Boolean algebra, disjunction and conjunction are "on the same level", there is no intrinsic reason to denote one as "prior" (hence the symmetry in the DeMorgan rules, conjunction and disjunction are DUAL).

I would include the parentheses, so as to obviate the need for clarification to any reader.
 
Back
Top