# Set counting of failed students in all subjects

There are $100$ students in a class. In a test, $50$ of them failed in mathematics, $45$ failed in physics and $40$ failed in chemistry. $32$ failed in exactly two of these three subjects.Only one student passed in all the three subjects.The number of students failing in all three subjects is

My solution:

As only one student has passed in all three subjects so $99$ students have failed in at least one subject. Denoting fail in mathematics as $M$, physics as $P$, chemistry as $C$. $MP$ denotes fail in math and phy. similarly $PC$ and $MC$. $MPC$ denote fail in all three subjects.

Number of students failed in $M$ OR $P$ OR $C$ = $M+P+C-MP-PC-MC+MPC$

Given that $32$ students failed exactly in two of these subjects. so $MP+PC+MC=32$.

$99=50+45+40-32+MPC$, $MPC=-4$

Whats wrong here?

Help appreciated :)

• Arithmetic. $MPC$ is actually $-4$. ... Seriously, though, check the numbers again. If they're the numbers from the original problem, then the problem was written badly. Possibly by one of those 50 students. Mar 23, 2016 at 7:34

It looks as if you are using the standard Inclusion/Exclusion formula. In that formula, $\text{MP}$ would represent the people who failed math and physics, and possibly chemistry. (The usual notation is something like $|M\cap P|$.) Similar remarks can be made about the other symbols.
The term $\text{MP}+\text{PC}+\text{MC}$ is then $32+3\text{MPC}$. This is because $\text{MPC}$ should be added three times to the count of people who failed exactly two subjects. So your equation should be $$99=50+45+40-(32+3\text{MPC})+\text{MPC}.$$
• I have added a bit to the post. In the formula you are using, $\text{MP}$ is supposed to count all the people who failed math and physics, and possibly chemistry. So it is the number of people who failed precisely math and physics, together with the people who failed all three. Thus the sum $\text{MP}+\text{PC}+\text{MC}$ gives us the people who failed exactly two, plus three times the people who failed everything. Mar 23, 2016 at 7:49