# 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.

-

3
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

1
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
show 1 more comment

## 2 Answers

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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 12, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9148170351982117, "perplexity_flag": "head"}