Discrete Mathematics Multiple Choice Questions on “Discrete Probability – Principle of Inclusion Exclusion”.
1. There are 70 patients admitted in a hospital in which 29 are diagnosed with typhoid, 32 with malaria, and 14 with both typhoid and malaria. Find the number of patients diagnosed with typhoid or malaria or both.
a) 39
b) 17
c) 47
d) 53
Answer: c
Clarification: By using the inclusion-exclusion principle: |T ∪ M| = |T| + |M| – |T ∩ M| = (29 + 32) – (14) = 47. Thus 47 patients are diagnosed with either typhoid or malaria.
2. At a software company, skilled workers have been hired for a project. Out of 75 candidates, 48 of them were software engineer; 35 of them were hardware engineer; 42 of them were network engineer; 18 of them had skills in all three jobs and all of them had skills in at least one of these jobs. How many candidates were hired who were skilled in exactly 2 jobs?
a) 69
b) 14
c) 32
d) 8
Answer: b
Clarification: Since 18 are skilled in all 3. Subtract 18 from all three to get a total with single skilled and double skilled workers including the duplicates. Software engineers = 48 – 18 = 30, Hardware engineers = 35 – 18 = 17, Network engineers = 42 – 18 = 24 making a total of 71 and this is a total set of single and double skilled workers including duplicates. Out of 75 candidates, 18 were skilled in three areas. So, 75 – 18 = 57 (actual no of workers skilled with single and both skills) Now the difference between the number without duplicates (57) and with duplicates (71), 71 – 57 = 14. So, 14 are skilled in exactly two jobs.
3. The numbers between 1 and 520, including both, are divisible by 2 or 6 is _______
a) 349
b) 54
c) 213
d) 303
Answer: d
Clarification: We add the number of numbers that are divisible by 2 and 6 and subtract the numbers which are divisible by 12. Hence, the required probability is
(frac{520}{2} + frac{520}{6} – frac{520}{12}) = 303.3 = 303(Approximately).
4. In a renowned software development company of 240 computer programmers 102 employees are proficient in Java, 86 in C#, 126 in Python, 41 in C# and Java, 37 in Java and Python, 23 in C# and Python, and just 10 programmers are proficient in all three languages. How many computer programmers are there those are not proficient in any of these three languages?
a) 138
b) 17
c) 65
d) 49
Answer: b
Clarification: Let U denote the set of all employed computer programmers and let J, C and P denote the set of programmers proficient in Java, C# and Python, respectively. So, |U| = 240, |J| = 102, |C| = 86, |P| = 126, |J ∩ C| = 41, |J ∩ P| = 37, |C ∩ P| = 23 and |J ∩ C ∩ P| = 10. The number of computer programmers that are not proficient in any of these three languages is said to be same as the cardinality of the complement of the set J ∪ C ∪ P. First, we have to calculate |J ∪ C ∪ P| = 102 + 86 + 126 – 41 – 37 – 23 + 10 = 223. Now calculate |(J ∪ C ∪ P)’ | = |U| – |J ∪ C ∪ P| = 240 – 223 = 17. 17 programmers are not proficient in any of the three languages.
5. In class, students want to join sports. 15 people will join football, 24 people will join basketball, and 7 people will join both. How many people are there in the class?
a) 19
b) 82
c) 64
d) 30
Answer: d
Clarification: There are 15 people who wish to join football, but 9 of those people also join basketball. By using the principle of inclusion and exclusion, we have: 15 people joining football + 24 people joining basketball – 9 people who will join both = 30 people total.
6. The sum of all integers from 1 to 520 that are multiples of 4 or 5?
a) 187
b) 208
c) 421
d) 52
Answer: b
Clarification: 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.
7. There are 9 letters having different colors (red, orange, yellow, green, blue, indigo, violet) and 4 boxes each of different shapes (tetrahedron, cube, polyhedron, dodecahedron). How many ways are there to place these 9 letters into the 4 boxes such that each box contains at least 1 letter?
a) 260100
b) 878760
c) 437102
d) 256850
Answer: a
Clarification: Let N be the total number of ways we can distribute the letters. Each letter can be placed into any one of the 4 boxes, so |N| = 49. Let T be the set of ways such that the tetrahedron box has no letters, C be the set of ways such that the cube box has no letters, P be the set of ways such that the cube box has no letters, and D be the set of ways such that the dodecahedron box has no letters. Now, to find |N| – |T U C U P U D|. We have |T|=|C|=|P|=|D|=27 and since the letters can be placed into one of the two other boxes, and |TUC| = |C U P| = |P U D| = |D U T| = 17, since all the letters must be placed in the remaining box, and T ⋂ C ⋂ P ⋂ D| = 0. Hence, PIE implies |N| – |T U C U P U D| = 49 – 4 x 29 + 4 x 19 – 0 = 260100.
8. A card is drawn randomly from a standard deck of cards. Determine the probability that the card drawn is a queen or a heart.
a) (frac{1}{4})
b) (frac{13}{56})
c) (frac{4}{13})
d) (frac{5}{52})
Answer: c
Clarification: Let M be the event that the card is a queen, and let N be the event that the card is a heart. Then Since there are 13 different ranks of cards in the deck, P(M) = (frac{1}{13}) and since there are 4 suits in the deck, P(N) = (frac{1}{4}). There is only one card that is both a queen and a heart, so P(M ⋂ N) = (frac{1}{52}). Therefore, P(M U N) = (frac{1}{4} + frac{1}{13} – frac{1}{52} = frac{16}{52} = frac{4}{13}).
9. An integer from 300 through 780, inclusive is to be chosen at random. Find the probability that the number is chosen will have 1 as at least one digit.
a) (frac{171}{900})
b) (frac{43}{860})
c) (frac{231}{546})
d) (frac{31}{701})
Answer: a
Clarification: The number of numbers that don’t have one anywhere 93 = 729 is (9 possibilities for each individual digit), and there are 9*102 = 900 numbers overall (9 possibilities for hundreds, 10 for the tens and units), so there are 900 – 729 = 171 numbers with at least a one and thus (frac{171}{900}) probability.
10. From 1, 2, 3, …, 320 one number is selected at random. Find the probability that it is either a multiple of 7 or a multiple of 3.
a) 72%
b) 42.5%
c) 12.8%
d) 63.8%
Answer: b
Clarification: Number of multiples of 7=45 and number of multiples of 3=106 and number of numbers which are multiples of both 7 and 3 = 15 Thus, P (selecting either a multiple of 7 or a multiple of 3) = (frac{45}{320} + frac{106}{320} – frac{15}{320} = frac{136}{320} = frac{2}{5}) = 0.425 or 42.5%.