40 software professionals were interviewed for a job. 25 knew PYTHON 20 knew JAVA and 5 knew neither language. How many knew both languages ?
10
When two groups overlap, the inclusion-exclusion principle gives the size of their union: \(|P \cup J| = |P| + |J| - |P \cap J|\). People who know neither language lie outside the union.
Step 1 — People who know at least one language: \(|P \cup J| = 40 - 5 = 35\).
Step 2 — Substitute into the formula: \(35 = 25 + 20 - |P \cap J|\).
Step 3 — Solve: \(|P \cap J| = 45 - 35 = 10\). So 10 professionals knew both PYTHON and JAVA.
A value of 20 would require only 25 people to know at least one language. The values 53 and 88 are larger than the total of 40 interviewed and cannot be the size of any subgroup.
10 option is correct.
Consider a set A = {1, 2, 3, …….., 1000}. How many members of A shall be divisible by 3 or by 5 or by both 3 and 5 ?
If cardinality of a set A is 6 and that of set B is 7 then find the Cardinality of A Δ B?
Consider a set A = {1, 2, 3, …….., 1000}. How many members of A shall be divisible by 3 or by 5 or by both 3 and 5 ?