Cardinality of Set Union/Examples/Examination Candidates

Example of Use of Cardinality of Set Union
In a particular examination, there were $3$ questions.

All candidates attempted at least one of the questions.


 * $40$ candidates attempted question $1$.
 * $47$ candidates attempted question $2$.
 * $31$ candidates attempted question $3$.

Also, it was apparent that:


 * $9$ candidates attempted at least questions $1$ and $2$.
 * $15$ candidates attempted at least questions $1$ and $3$.
 * $11$ candidates attempted at least questions $2$ and $3$.

and:
 * exactly $6$ candidates attempted all $3$ questions.

It follows that $89$ candidates sat the examination in total.

Proof
Let:
 * $S_1$ denote the set of candidates who attempted question $1$.
 * $S_2$ denote the set of candidates who attempted question $2$.
 * $S_3$ denote the set of candidates who attempted question $3$.

The number of candidates $N$ who sat the examination in total is therefore:
 * $N = S_1 \cup S_2 \cup S_3$

From Cardinality of Set Union: 3 Sets:

From the question:

Hence: