InterviewSolution
Saved Bookmarks
| 1. |
One of the most important techniques of counting is the principle of exlcusion and inclusion. Let A_(1),A_(2),……………,A_(m) be m sets and n(A_(1)) represents the cardinality of the set A_(1) (the number of elements in the set A_(1))) then according to the principle of exlusion and inclusion. n(A_(1)uuA_(2)uu.........uuA_(m)) =sum_(i=1)^(m)n(A_(1))-sum_(i=j)n(A_(i)nnA_(j))+sum_(iltjltk)n(A_(i)nnA_(j)nnA_(k))-...........+(-1)^(m+1)n(A_(1)nnA_(2)nn........nnA_(m)) In particular if A,B,C are three sets, then n(AuuBuuC)=n(A)+n(B)+n(C)-n(AnnB)-n(BnnC)-n(CnnA)+n(AnnBnnC). Principle of exclusion and inclusion must be applied whenever there is a chance of repeated counting of some of the samples. The number of natural numbers less than or equal to 2985984, which are neither perfect squares nor perfect cubes is |
|
Answer» 2984124 |
|