Professional Documents
Culture Documents
DS2– ASSIGNMENT/ACTIVITY #2
Discrete Structures II
February 5, 2024
This assignment contains 2 pages (including this cover page) and 4 questions. Total of points is 15.
Good luck and Happy solving!
1 3
2 3
3 6
4 3
Total: 15
1
DS2 ASSIGNMENT/ACTIVITY #2 February 5, 2024
Direction: Answer the following questions correctly. Please provide your complete solution.
1. In a discrete mathematics class every student is a major in computer science or mathematics or both. The
number of students having computer science as a major (possibly along with mathematics) is 25; the
number of students having mathematics as a major (possibly along with computer science) is 13; and the
number of students majoring in both computer science and mathematics is 8.
(a) (3 points) How many students are in the class?
Answer:
∣C∪M∣=∣C∣+∣M∣−∣C∩M∣
∣C∪M∣=25+13−8
∣C∪M∣=30
∣CPE∪CE∪EE∣=∣CPE∣+∣CE∣+∣EE∣−∣CPE∩CE∣−∣CPE∩EE∣−∣CE∩EE∣
+∣CPE∩CE∩EE∣
|96|= |44|+|38|+|40|-∣CPE∩CE∣-∣CPE∩EE-∣CPE∩CE∩EE∣
=41
THEREFORE, THERE ARE 41 hired who were skilled in exactly 2 jobs
3. Among 150 patients admitted to a community clinic, 55 are diagnosed with diabetes, 80 with bronchitis,
and 17 with both diabetes and bronchitis. Determine:
(a) (3 points) The number of patients diagnosed with diabetes or bronchitis (or both).
Ans.
4. A large software development company employs 100 computer programmers. Of them, 45 are proficient
in Java, 30 in C#, 20 in Python, six in C# and Java, one in Java and Python, five in C# and Python, and
just one programmer is proficient in all three languages above.
(a) (3 points) Determine the number of computer programmers that are not proficient in any of these
three languages.
Ans.
∣J∪C∪P∣=∣J∣+∣C∣+∣P∣−∣J∩C∣−∣J∩P∣−∣C∩P∣+∣J∩C∩P∣
∣J∪C∪P∣=45+30+20−6−1−5+1
∣J∪C∪P∣= 95-6-1-5+1
∣J∪C∪P∣= 84
=100- 84 = 16
Therefore, there are 16 computer programmers who are not proficient in any of the three
languages.
Page 2 of 2