# How to simplify the following expression

I am attempting to simplify the following expression: `(!A && !B) || (!B && !C) || (C && !A)`. It should simplify to only two terms: `(!A and C) || (!B and !C)`

I have tried applying almost all of the laws and tried different combinations of factoring to see if anything will reduce but it does not lead to the required answer.

On

Here you go:

(! a && c) || (! b && ! c)

EDIT: Sorry I didnt know you were looking for HOT to solve it.

In this case I would suggest using a truth table. This will probably help you alot:

https://www.wolframalpha.com/input/?i=(!A+%26%26+!B)+%7C%7C+(!B+%26%26+!C)+%7C%7C+(C+%26%26+!A)

On

You know `C || !C` is true by the law of excluded middle. Combine that with `!A && !B` to get `!A && !B && (C || !C)`. Distribute to get `(!A && !B && C) || (!A && !B && !C)`. Substitute this back into the original expression to get `(!A && !B && C) || (!A && !B && !C) || (!B && !C) || (C && !A)`.

For any expressions `P` and `Q`, if `P -> Q`, then `P || Q` is the same as just `Q`. You should see that `!A && !B && C` implies `C && !A`, so you can remove the former. Same for `!A && !B && !C` and `!B && !C`. You can now easily reorder the remainder into `(!A && C) || (!B && !C)`.