Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
National Examination, 04-BS-16 Discrete Mathematics, May 2016. Closed book, no aids. The exam instructs "answer 10 of 12 questions"; every question is answered below as a complete study resource.
Reference texts: Rosen, Discrete Mathematics and Its Applications, 7th ed. (logic, induction, combinatorics, probability, relations, graph theory).
Find. (a) The number of boys who passed. (b) $P(C\mid\text{Defective})$.
Approach. (a) use $P(E_1),P(E_2)$ independence to find the class-wide fail rate from the girls-only fail rate, then back out the boys' fail/pass counts. (b) apply Bayes' theorem with the law of total probability over the three lines.
(a) Boys who passed. $16$ of $20$ girls passed, so $4$ girls failed: $P(E_2\mid E_1)=4/20=0.20$. Independence of $E_1,E_2$ means $P(E_2\mid E_1)=P(E_2)$, so the class-wide fail rate is also $0.20$:
$$P(E_2)=0.20 \;\Rightarrow\; \text{total failed} = 0.20\times 60 = 12$$
Of these 12 failures, 4 are girls, so boys who failed $=12-4=8$. Boys who passed:
$$\boxed{40-8=32}$$
(b) $P(C\mid D)$ via Bayes' theorem. Let $D$ = "lamp is defective". By the law of total probability:
$$P(D)=P(D|A)P(A)+P(D|B)P(B)+P(D|C)P(C)=0.04(0.30)+0.08(0.50)+0.03(0.20)=0.012+0.040+0.006=0.058$$
Bayes' theorem then gives:
$$P(C\mid D)=\frac{P(D\mid C)P(C)}{P(D)}=\frac{0.006}{0.058}\approx\boxed{0.1034\ (10.34\%)}$$