Question

I am trying to better understand boolean equivalence but this example has me a little stuck.

I am referring to this website: http://chortle.ccsu.edu/java5/Notes/chap40B/ch40B_9.html

It makes sense, but doesn't at the same time... it says that they are equivalent, but the true/false values don't add up/align in a way that makes them out to be equivalent as the table shows they are. Could someone explain this to me?

!(A && B) <-- first expression

(C || D) <-- second expression

The last columns refers to the equivalency of the two expressions, which yes, they are equivalent according to the table. However, I just don't get how the two expressions are equivalent. If A = F, B = F --> T, wouldn't C = F, D = F --> T as well?

A   B     C   D
--------------------
F   F     T   T   T
F   T     T   F   T
T   F     F   T   T
T   T     F   F   F
Was it helpful?

Solution

You are confusing yourself when trying to reduce it from the actual expression to single letter variables. On referring the actual link, it would appear that the variables you use can be mapped to the original expressions as follows:

A = speed > 2000
B = memory > 512
C = speed <= 2000
D = memory <= 512

If you look at it, C equals !A and D equals !B. So the expression (C || D) is effectively !((!A) || (!B)). By De Morgan's Law, that is the same as !(A && B).

OTHER TIPS

This table is explaining that !(A && B) is equivalent to !A || !B. The columns C and D appear to be defined as C = !A and D = !B. The last column is C || D

So A = F, B = F certainly implies !(A && B). In this case C = D = T, and so also C || D = T.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top