boolean algebra, why is this try to simplify wrong?

so I have been trying to learn simplifying boolean Algebra, lets look at this term : $$(a*b)+(a*\neg b)+(\neg a * \neg b)$$

I have several questions, I know how the right solution looks like but why couldn't I collect $a$ and $\neg a$?
so :
1. $a* \neg a *(b+\neg b+\neg b)$
2. $0*(1)$

is the way I simplifyied it right, is it just non-sense doing it like this or what is I wrong with this?

• Because you have to collect $a$ from the first two terms... Apr 28 '17 at 12:15
• I did collect $a$ and $\neg a$, can you explain it a little bit to me? Apr 28 '17 at 12:17
• It works exactly as with numbers; you can collect $2$ from $(2 \times a) + (2 \times b)$ but you cannot colelct $2$ and $-2$ from $(2 \times a) + (-2 \times b)$ Apr 28 '17 at 12:17
• They are called Laws of boolean algebra; very similar to arithmetical laws. Apr 28 '17 at 12:19
• In the first equation if you set $a = 1 = b$ it evaluates to $1$, but equation $(1)$ evaluates to $0$. Here is a derivation: $(a\cdot b) + (a \cdot \neg b) + (\neg a)\cdot (\neg b) = (a \cdot b) + (\neg b) = (a+\neg b) \cdot (b + \neg b) = a + \neg b$
– Mike
Apr 28 '17 at 12:28

For the derivation, notice that there are 4 possible states of $a$ and $b$:
$$a = 0, b = 0 \\ a=0, b=1 \\ a=1,b=0 \\ a=1, b=1$$
Now, the expression $(a*b)$ is true for the fourth state, the expression $(a*\neg b)$ is true for the third state and the expression $(\neg a * \neg b)$ is true for the first state. So your expression is equivalent to: $$(a*b)+(a*\neg b)+(\neg a * \neg b) \equiv \neg(\neg a * b)$$ ("Just not the second option!"). By De-Morgan's rule: $$\neg(\neg a * b) \equiv a + \neg b$$