Two programmers describe the same search filter in different ways. In which pair do the two descriptions give equal sets?
Competency-Based Questions (CBQ) · Question 6 of 80
Two programmers describe the same search filter in different ways.
Question 61 markMCQMedium
Select your answer
- Correct answer
(A) and
(B) and
(C) and
(D) and
Option (A) is correct.
Explanation:
Two sets are equal when they have exactly the same elements.
First set in (A): for every real , . So means , that is . Hence or , which gives . The set is .
Second set in (A): the integers with are . The even ones are . The set is .
Both are , so the two descriptions are equal.
Why the other options are wrong
- (B) gives , so or . Over the set is because . The integers that are not negative include , so the second set is . The domain changes the set.
- (C) has no real solution, so the first set is , with no element. gives , so the second set is , which has one element. .
- (D) The second set contains (take ). The first set has only positive even numbers.
