AP CSP Day 32: Lossy Compression
Share
Practice Question
For which of the following values of x does the expression NOT (x < 3 OR x > 7) evaluate to true?Applying De Morgan's Law: NOT(x < 3 OR x > 7) is equivalent to (NOT(x < 3)) AND (NOT(x > 7)), which simplifies to (x ≥ 3) AND (x ≤ 7). This means x must be between 3 and 7 inclusive. x = 5 satisfies this condition.
A) x = 1: 1 < 3 is true, so (x < 3 OR x > 7) is true, and NOT of true is false. C) x = 8: 8 > 7 is true, so the inner OR is true, and NOT is false. B) x = 2: 2 < 3 is true, so the inner OR is true, and NOT is false.
Students incorrectly apply NOT by flipping only one part of the OR instead of applying De Morgan's Law properly. NOT distributes over OR by changing it to AND and flipping both conditions.
De Morgan's Laws: NOT(A OR B) = NOT A AND NOT B. NOT(A AND B) = NOT A OR NOT B. Practice these until they are automatic.
Keep Practicing!
Consistent daily practice is the key to AP CSP success.
AP CSP Resources Get 1-on-1 Help