# Sum of Products (Boolean Algebra)

I am having real trouble getting to the corrects answers when asked to simply Sum of products expressions. For instance:

Determine whether the left and right hand sides represent the same function:

a) $x_1\bar{x}_3+x_2x_3+\bar{x}_2\bar{x}_3 = (x_1+\bar{x}_2+x_3)(x_1+x_2+\bar{x}_3)(\bar{x}_1+x_2+\bar{x}_3)$

They answer is that they are equivalent. Here is my logic for solving the left hand side, I first expand so each term has 3 variables:

$$=x_1x_2\bar{x}_3+x_1\bar{x}_2\bar{x}_3+x_1x_2x_3+\bar{x}_1x_2x_3+x_1\bar{x}_2\bar{x}_3+\bar{x}_1\bar{x}_2\bar{x}_3$$

combining terms

\begin{align*} &=x_1x_2(\bar{x}_3+x_3)+(x_1+\bar{x}_1)\bar{x}_2\bar{x}_3+x_1\bar{x}_2\bar{x}_3\\ &=x_1x_2+\bar{x}_2\bar{x}_3+x_1\bar{x}_2\bar{x}_3 \end{align*}

Then if I apply De Morgan's law in order to get it in Product of sum form, I get nothing close to the equivalent of the right hand side.

-
Try expanding the RHS first. – user2468 Oct 1 '11 at 17:12
By expand do you mean distribute the terms through? – Nick Oct 1 '11 at 17:16
Or I could apply demorgans law to right side – Nick Oct 1 '11 at 17:25
Distribute the terms in RHS, and use identities such as commutativity, idempotence, etc. to simplify it. – user2468 Oct 1 '11 at 18:15
When I expanded the right hand side, I ended up with an extra $x_1x_2$ summand (in addition to the other three summands in your expression). However, one can check that as functions in which each $x_i$ can be either $0$ or $1$, the two expressions are equal functions: just verify that in each of the three cases in which the right hand side is zero the left hand side is zero as well (easy), and that in every other situation the left hand side is $1$. – Arturo Magidin Oct 1 '11 at 22:01

After expanding RHS using distributive law and reducing it you should get:

$x_1\bar{x}_3+\bar{x}_2\bar{x}_3+x_2x_3+x_1x_2$

Now, make Karnaugh map in order to get minimal disjunctive form:

If you group ones as on picture above you will get next expression:

$x_1\bar{x}_3+\bar{x}_2\bar{x}_3+x_2x_3$

-

Just as when proving trig identities, in general it’s better to start by trying to simplify the more complicated side, which in this case is the right-hand side. If you expand the RHS by brute force and use the identities $xx=x$, $x\bar{x}=0$, $x+\bar{x}=1$, and $x+xy=x$ repeatedly, you shouldn’t have much trouble reducing it to $$x_1x_2+x_1\bar{x}_3+x_2x_3+\bar{x}_2\bar{x}_3,$$ which is almost what you want. Now write $$x_1x_2 = x_1x_2 1 = x_1x_2 (x_3 + \bar{x}_3),$$ expand, and use the absorption identity again to get rid of the extra terms.

-
(+1),Nice use of absorption identity in the end. – Quixotic Oct 2 '11 at 5:11
This was very helpful thank you! – Nick Oct 2 '11 at 15:08