Exercise
The following table shows the value of an expression based on the values of a, b, and c.
Value of a |
Value of b |
Value of c |
Value of expression |
---|---|---|---|
true |
true |
true |
false |
true |
true |
false |
true |
true |
false |
true |
true |
true |
false |
false |
true |
false |
true |
true |
true |
false |
true |
false |
true |
false |
false |
true |
true |
false |
false |
false |
true |
Which of the following expressions are equivalent to the value of the expression shown in the table?
Select TWO answers.
(A) !a || !b || !c
(B) !(a || b || c)
(C) !(a && b && c)
(D) !a && !b && !c
Solution
(A) !a || !b || !c
(C) !(a && b && c)
Approach 1
The expression evaluates to false
if and only if a
, b
, and c
are all true
.
Write the expression as if it evaluated to true
in the above circumstance.
a && b && c
Add a !
to the entire expression to make it false
.
!(a && b && c)
This is one of the answer choices.
Distribute the !
.
!a || !b ! !c
This is the other correct answer choice.
Approach 2
The expression evaluates to true
when at least one of a
, b
, and c
is false
.
!a || !b || !c
This is one of the answer choices.
Factor the !
.
!(a && b && c)
This is the other correct answer choice.