Boolean Logic - Why doesn't the Associativity Law work in this scenario?

68 Views Asked by At

By the associativity law, shouldn't the statement below be true? I understand that the truth tables are different but where exactly does the associativity law apply then if this is False?

$(p \land q) \lor r = p \land (q \lor r)$

2

There are 2 best solutions below

1
On BEST ANSWER

Associativity is a law that applies to one operation. For example, associativity of addition means $(a+b)+c = a+(b+c)$.

Here, you have $(p \land q) \lor r = p \land (q \lor r)$. You know that these are two operations, and and or. So you can't say anything about their associativity, because associativity applies to only one operation.

Finally, it's easy to see that $(p \land q) \lor r = p \land (q \lor r)$ doesn't hold. Suppose $(p \land q) \lor r$ is true. Then either $r$ is true, or $(p$ and $q)$ are true, or both. So suppose only $r$ is true, and $p$ is false, so $(p \land q)$ is false. Then $(p \land q) \lor r$ is true. However, $p \land (q \lor r)$ is false, because $p$ is false, and $p$ must be true for the statement ($p$ and $(q$ or $r))$ to be true.

1
On

Also try to think of it like this:

$(p \land q) \lor r$

I am going the bathroom and take a shower or i'm eating salami

$p \land (q \lor r)$

I am going to the bathroom and I am either going to take a shower or eat salami.