There are 100 students in a class. In an examination, 50 of them failed in Mathematics, 45 failed in Physics, 40 failed in Biology and 32 failed in exactly two of the three subjects. Only one student passed in all the subjects. Then, the number of students failing in all the three subjects

4 min read
82 views
Published July 3, 2025
Mathematics
Combinatorics
Set Theory
Principle of Inclusion-Exclusion

💡 Want to ask your own questions?

Get instant explanations with AI • Free trial

Detailed Explanation

Key Concept – Principle of Inclusion–Exclusion (PIE)

For three sets AA, BB, CC:

ABC=A+B+CABACBC+ABC\lvert A \cup B \cup C \rvert = \lvert A \rvert + \lvert B \rvert + \lvert C \rvert - \lvert A\cap B \rvert - \lvert A\cap C \rvert - \lvert B\cap C \rvert + \lvert A\cap B\cap C \rvert

Why?

  • Adding A+B+C\lvert A \rvert+\lvert B \rvert+\lvert C \rvert counts every element inside each set.
  • Any element sitting in two sets is counted twice, so we subtract each pairwise intersection once.
  • But an element sitting in all three was subtracted three times, so we add it back once.

Information provided

  • Total students: 100100.
  • Fail in Math (A)(A): 5050.
  • Fail in Physics (B)(B): 4545.
  • Fail in Biology (C)(C): 4040.
  • Fail in exactly two subjects: 3232.
  • Pass all subjects: 1    1 \;\Longrightarrow\; Fail at least one subject ABC=99\lvert A \cup B \cup C \rvert = 99.

Unknowns we introduce

  • x=ABCx = \lvert A\cap B\cap C \rvert (fail all three).
  • p=ABp = \lvert A\cap B \rvert, q=ACq = \lvert A\cap C \rvert, r=BCr = \lvert B\cap C \rvert (pairwise overlaps).

Constraints built from the data

  1. From PIE:

50+45+40(p+q+r)+x=99    p+q+r=36+x(1)50 + 45 + 40 - (p+q+r) + x = 99 \;\Longrightarrow\; p+q+r = 36 + x \quad (1)

  1. ‘Exactly two’ means

(px)+(qx)+(rx)=32    p+q+r3x=32(2) (p-x) + (q-x) + (r-x) = 32 \;\Longrightarrow\; p+q+r - 3x = 32 \quad (2)

Solve the two equations

Substitute (1)(1) into (2)(2):

(36+x)3x=32    362x=32    x=2.\bigl(36 + x\bigr) - 3x = 32 \;\Longrightarrow\; 36 - 2x = 32 \;\Longrightarrow\; x = 2.

Hence, 2 students failed in all three subjects.

The logical chain:
Identify sets → translate verbal info into set sizes → write PIE → introduce variables → plug the counts → solve simultaneous equations.

Simple Explanation (ELI5)

Imagine three scary monsters called Math, Physics, and Biology.

  • 50 kids were caught by the Math monster (they failed Maths).
  • 45 kids were caught by the Physics monster.
  • 40 kids were caught by the Biology monster.
  • 32 kids were caught by exactly two monsters at the same time (but escaped the third).
  • Only one super-kid escaped all monsters — everyone else was caught by at least one monster.

We want to know: How many kids were caught by all three monsters together?

The counting rule we use is like putting together jigsaw pieces called Inclusion–Exclusion. It says:

  1. Add the single-monster counts.
  2. Subtract the double overlaps (to fix double-counting).
  3. Add back the triple overlap (because we subtracted it too many times).

Using the numbers given and a little algebra, we can find that only 2 kids were unlucky enough to be caught by all three monsters.

👆 Found this helpful? Get personalized explanations for YOUR questions!

Step-by-Step Solution

Step-by-Step Solution

Let

  • AA = set of students who failed Mathematics, A=50|A| = 50
  • BB = set of students who failed Physics, B=45|B| = 45
  • CC = set of students who failed Biology, C=40|C| = 40

Let

  • x=ABCx = |A \cap B \cap C| (fail all three)
  • AB=p|A \cap B| = p
  • AC=q|A \cap C| = q
  • BC=r|B \cap C| = r

Total students = 100100. One student passed everything, so

ABC=1001=99|A \cup B \cup C| = 100 - 1 = 99

Equation from Inclusion–Exclusion

50 + 45 + 40 - (p + q + r) + x = 99 \quad\Longrightarrow\quad p + q + r = 36 + x \tag{1}

Equation from "Exactly two" information

Number failing exactly two subjects: (px)+(qx)+(rx)=32 (p - x) + (q - x) + (r - x) = 32

Simplify: p + q + r - 3x = 32 \tag{2}

Solve (1) and (2)

Substitute (1)(1) into (2)(2):

(36+x)3x=32    362x=32    2x=4    x=2(36 + x) - 3x = 32 \;\Rightarrow\; 36 - 2x = 32 \;\Rightarrow\; 2x = 4 \;\Rightarrow\; x = 2

Final Answer

2\boxed{2}

Therefore 2 students failed in all three subjects.

Examples

Example 1

Counting employees who know programming languages C, Java, and Python with given overlaps.

Example 2

Survey of residents who own car, bike, and bus pass to find those who own all three.

Example 3

Marketing analysis of customers subscribing to three streaming platforms to isolate the triple subscribers.

Visual Representation

References

🤔 Have Your Own Question?

Get instant AI explanations in multiple languages with diagrams, examples, and step-by-step solutions!

AI-Powered Explanations
🎯Multiple Languages
📊Interactive Diagrams

No signup required • Try 3 questions free