You are on page 1of 3

PARTIDO STATE UNIVERSITY

Faculty of Engineering and Computational Science

DS2– ASSIGNMENT/ACTIVITY #2
Discrete Structures II

Instructor: Mr. Clarence Alib

February 5, 2024

Name: Maricar A. Barbon


Program: BSCS-1B

This assignment contains 2 pages (including this cover page) and 4 questions. Total of points is 15.
Good luck and Happy solving!

Basic Counting Principle:


Principle of Inclusion-Exclusion
Question Points Score

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

Therefore, there are 30 students in the class.


2. At a reputable company, skilled workers have been hired for a project. Out of 96 candidates, 44 of them
were computer engineer; 38 of them were chemical engineer; 40 of them were electronics engineer; 15
of them had skills in all three jobs and all of them had skills in at least one of these jobs.
(a) (3 points) How many candidates were hired who were skilled in exactly 2 jobs?
Answer:

∣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.

|D|=55 |B|=80 |D∩B|= 17


||D∩B|= 55+80-17 =118
Therefore, there are 118 of patients diagnosed with diabetes or bronchitis (or both).
(b) (3 points) The number of patients not diagnosed with diabetes or bronchitis.
ans.

|D∩B|= 150 - 118 = 22


Therefore, there are 22 patients not diagnosed with diabetes or bronchitis.

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

You might also like