1.

The sum of all integers from 1 to 520 that are multiples of 4 or 5?(a) 187(b) 208(c) 421(d) 52The question was posed to me in a job interview.My query is from Discrete Probability topic in portion Discrete Probability of Discrete Mathematics

Answer»

Right option is (B) 208

Best explanation: PIE is USED to count the elements of a set and stated as the sum of elements in A or B is equal to the sum of elements in A PLUS the sum of elements in B minus the sum of elements in A and B. Let A be the set of multiples of 4 and B be the set of multiples of 5, then A ⋂ B is the set of multiples of 20, and hence

\(\frac{520}{4} + \frac{520}{5} – \frac{520}{20}\) = 208.



Discussion

No Comment Found

Related InterviewSolutions