1.

Let A={1,2,3} B={2,3,4} C={1,3,5} D={2,3}. Find the cardinality of sum of all the sets.(a) 6(b) 5(c) 4(d) 7This question was posed to me by my school teacher while I was bunking the class.The origin of the question is Number Theory topic in portion Number Theory of Data Structures & Algorithms II

Answer» CORRECT option is (b) 5

Best explanation: FIRST, include the cardinalities of all the sets. Then, exclude the cardinalities of EVEN intersections. Then include the cardinalities of ODD intersections. HENCE, 3+3+3+2-2-2-2-1-2-1+1+2+1+1-1=5.


Discussion

No Comment Found

Related InterviewSolutions