# Simplifying the Boolean expression $x'y + x(x+y')$

Expression:

$$x'y + x(x+y')$$

My attempt:

1. $$x'y + x(x+y')$$
2. $$x'y + xx + xy' \quad \textit{After applying second Distributive law.}$$
3. $$x'y + x + xy' \quad \textit{After applying second Idempotent law.}$$
4. $$x'y + x(1 + y') \quad \textit{Breaking out x}$$
5. $$x'y + x(1) \quad \textit{After applying Annihilation law}$$
6. $$x'y + x$$

The answer is: $$x + y$$.

N.B. I am still new to this and learning, I am using the following book:

Discrete Mathematics for Computing / Edition 3
by Peter Grossman

• @amrsa, I reverted back to my original writing. Now I am stuck with $x'y + x$ Commented Mar 8 at 14:43
• @amrsa I got that from the Bing Copilot. Commented Mar 8 at 14:44
• @amrsa which law did you apply here? Commented Mar 8 at 14:55
• @amrsa the final answer in this book is x + y not sure what you are suggesting here. Commented Mar 8 at 14:56

## 2 Answers

For short, I'll abbreviate below Absorption, Associativity, Commutativity, Distributivity and Idempotence as abs, assoc, comm, distr and idemp, respectively.

Lemma. In a Boolean algebra, if $$a+b=ab$$, then $$a=b$$.

Proof. If $$a+b = ab$$ then \begin{align} a &= a (a + b) \tag{abs}\\ &= a (ab) \tag{hypothesis}\\ &= ab \tag{assoc, idemp}\\ &= b (ab) \tag{assoc, comm, idemp}\\ &= b (a + b) \tag{hypothesis}\\ &= b. \tag{abs} \end{align}

Now, \begin{align} (x + x'y) + (x + y) &= x + y + x'y \tag{assoc, comm, idemp}\\ &= x + (y + x'y) \tag{assoc}\\ &= x + y, \tag{abs} \end{align} and \begin{align} (x + x'y)(x+y) &= x + xy + x'yx + x'y \tag{distr}\\ &= x + (xy + x'y) \tag{assoc, xx'=0}\\ &= x + (x + x')y \tag{distr}\\ &= x + y. \tag{x + x' = 1} \end{align}

Hence, letting $$a = x + x'y$$ and $$b = x + y$$, we have $$a + b = b = ab$$, and so $$a=b$$, by the Lemma.
So $$x + x'y = x + y$$.

Shorter version: \begin{align} x + x'y &= (x + xy) + x'y \tag{abs}\\ &= x + (xy + x'y) \tag{assoc}\\ &= x + (x + x')y \tag{distr}\\ &= x + y. \end{align} According to a deleted answer below, this law is called Redundancy law.

Simplest Solution

You can use venn diagram to solve create it use 2 different circles for x and y

x'y=y\x x(x+y')=x

sum of both=x+y

That is why

• Discrete Mathematics for Computing / Edition 3 by Peter Grossman I am using this book, this problem is in the book on page 164 and it requires the usage of the boolean laws of algebra och the various laws for simplification to be used. Not Venn Diagrams from the Sets chapter much earlier. Commented Mar 8 at 15:34