2
$\begingroup$

I'm confused over how negation is distributed in logic statements/boolean algebra when the negation is outside the bracket. Do we just put the negation in each variable like normal distribution? Like for ~(a AND b) would it just be (~a OR ~b) both variables are negated and the AND is changed to OR?

$\endgroup$
  • 1
    $\begingroup$ Drawing a Venn Diagram can help you understand the equivalence $\endgroup$ – David Peterson Feb 12 at 6:37
  • $\begingroup$ @bob_xxx are you satisfied with one of the answers? Then please consider accepting one. If not, let us know how to improve. $\endgroup$ – James Feb 13 at 8:00
1
$\begingroup$

\begin{array}{|c|c|c|c|c|c|c|} \hline A & B & -A & -B & \text{A and B} & \text{-(A and B)} & \text{-A or -B} \\ \hline t & t & f & f & t & f & f \\ \hline t & f & f & t & f & t & t \\ \hline f & t & t & f & f & t & t \\ \hline f & f & t & t & f & t & t \\ \hline \end{array}

So -(A and B) is the same as -A or -B. You can draw such a table for any logical statement. It is also quite intuitive: If A and B are not both true, at least one of them is false.

$\endgroup$
0
$\begingroup$

To explain this, let us take an example of the statements we use in our daily lives. Suppose you want to buy a phone. You go to a nice shop and tell the shopkeeper, "I want a smartphone with $32$ megapixels camera and $128$ GB of extendable memory". The shopkeeper gives you a box of smartphone. When you reach home, you open the box and suddenly realize that you have been cheated.

When would you say that the shopkeeper cheated on you? An obvious answer is, "When you do not get what you required". Now, the question is, "What was it that you required?" Well, your statement says that you needed the following things in your smartphone:-

  1. $32$ megapixels camera.
  2. $128$ GB extendable storage.

If you claim that you did not get what you wanted, it means that either you did not get $1$ or you did not get $2$ (or did not get both). In any of these cases, you would say that the shopkeeper cheated!

So, what is the corresponding logical statement for cheating? It will be "The smartphone does not have $32$ megapixels camera or it does not have $128$ GB extendable memory". This is what we call "negation" in the technical terms of logic.

Hence, in general, if you see, the negation of any logical statement such as $p \wedge q$ is $\neg p \vee \neg q$.

$\endgroup$
  • $\begingroup$ The truth table which James made above is just a logical representation of the explanation here. $\endgroup$ – Aniruddha Deshmukh Feb 12 at 6:50
  • $\begingroup$ Nice real-life example ;-) $\endgroup$ – James Feb 12 at 6:52
0
$\begingroup$

You are correct. For example, if something is not both green and soft it is either not green or not soft. The general rule is one of De Morgan's laws.

$\endgroup$
0
$\begingroup$

There are nice analogies given by other members. I would just add something that I learned .

When you are having the expression

$\overline{A\space .\space B}=\overline {A}+\overline{B}$

$\overline{A\space +\space B}=\overline {A}.\overline{B}$

Break the line, change the sign

Hope this helps...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.