Boolean simplification expression

82 Views Asked by At

In words my problem is

NOT(p AND q) AND (NOT p OR q) AND (p OR p).

I have rewritten it in symbols

¬(p ∧ q) ∧ (¬p ∨ q) ∧ (p ∨ p)

I got this far:

(¬p ∨ ¬q) ∧(¬p ∨ q) ∧ p

Any help please?

2

There are 2 best solutions below

0
On

Hint: Using De Morgan's law, your last step is: [(~p v (~q and q) ) and p].

3
On

You can use De Morgan's law to start off with

$$\neg( (p \wedge q) \vee (p \wedge \neg q) \vee \neg p)$$

Then you can combine the first and second terms as $(p \wedge q) \vee (p \wedge \neg q) = p$. See below for the intuition beind this: $(p \wedge q)$ in red, and $ (p \wedge \neg q) = p$ in green.

enter image description here

You should be good to go from there on in.


Alternatively, without the need for any intutition, it's possible to simply follow the rules of Boolean algebra. First of all you multiply out the brackets using the distributive law.

$$\begin{align} (\neg p \vee \neg q) \wedge (\neg p \vee q) \wedge p &= (\neg p \vee \neg q) \wedge (\neg p \wedge p \;\vee\; q \wedge p) \\ &= (\neg p \vee \neg q) \wedge (q \wedge p) \\ &= \neg p \wedge q \wedge p \;\;\vee\;\; \neg q \wedge q \wedge p \end{align}$$

Second you use the associative law to rearrange the logical AND on the left to $\neg p \wedge p \wedge q$.