# Find the minimum number of tests

Sorry for the title, but I couldn't think of something else, its not actually homework, but rather a question from a maths question book I am currently stuck on, but still I've tagged it in homework.

The question is as follows:

An institute holds 32 mock tests, students have the option to appear for any number of mocks, even 0. Student A gives 16, student B gives 18, student C gives 20. What is the minimum number of mocks which were written by more than one among A, B, and C.

The way I approached was as follows:

Since total mocks by A, B, and C if we sum them are 54, and the total mocks held by the institute were 32, so atleast 54 - 32 = 22 mocks could have been written by more than one.
The problem is I am stuck here, and can't move ahead.

I think this problem maybe solved by Set theory, but being an aptitude problem, I think there's more to it and it can be solved logically without going into much mathematics.

-
The efficient thing to do is if an exam is written by at least two, it is written by all three. This gives $11$ as the minimum. –  André Nicolas Jun 30 '12 at 17:16
@AndréNicolas Sorry but I'm not able to understand what you're trying to say.Can you please elaborate. Thank you –  Kartik Anand Jun 30 '12 at 17:17
Suppose André is right (I haven't checked his arithmetic). Then what you need to prove is twofold: (a) that there is a way for the three students to take their tests such that exactly 11 tests were taken by more than one of them, and (b) that there is no way they could take the tests with fewer than 11 tests being attended by two or more. The proof of part (a) could simply be by showing a concrete example of how it is possible. For part (b) you'll need an abstract argument, probably along the lines André suggests. –  Henning Makholm Jun 30 '12 at 17:24

If it can be arranged, let $n$ be the number of exams written by all three. Then A will write $16-n$ exams that no one else writes, B will write $18-n$, and C will write $20-n$. Thus $$n+(16-n)+(18-n)+(20-n)\le 32.$$ Solve. We get $n\ge 11$.
We can arrange for $n$ to be exactly $11$ by giving the first $11$ exams to everybody. In addition, A writes exams $12$ to $16$, B writes $17$ to $23$, and C writes $24$ to $32$.
Call an exam done by $2$ or more people "spoiled." If we want to spoil as few exams as possible, we should, if we can, arrange things so that any exam done by $2$ is actually done by all $3$. For when it comes to assigning an exam to a student, if we assign an already double-used exam, we are not increasing the total spoiled, but if we assign an exam that has only been written by $1$, we are increasing the number spoiled. (Of course it is OK to assign an exam so far written by $0$, but that just means that for the minimum spoiled, we will use all $32$ exams.) –  André Nicolas Jun 30 '12 at 17:37
Yes I'm getting you now. But how can we check that it's actually happening, I mean you're subtracting $n$ from all three, but how can we check that this $n$ was first done by $2$ and now we are taking it to $3$ –  Kartik Anand Jun 30 '12 at 17:49
Take $n=11$. Give these to A, plus $5$ new. Give them to B, plus $7$ new. Give them to C, plus $9$ new. There were $5+7+9$ "news" (that is $21$). Added to our $11$, that's the full $32$. And everybody got the right number. –  André Nicolas Jun 30 '12 at 17:53