What is the total number of ways a student appearing in the examination to get $5$ marks? In an examination there are $5$ multiple choice questions with $3$ choices, out of which exactly one is correct. There are $3$ marks for each correct answer, $-2$ marks for each wrong answer, and $0$ marks if the question is not attempted. Then what is the total number of ways a student appearing in the examination to get $5$ marks?
One case possible is possible in which he scored $5$ marks when $3$ questions are correct and $2$ are incorrect. So number of ways become $\binom{5}{3}=10$. But this answer is incorrect.
 A: If get 5 marks, there is only one case: "three corrects" + "two wrongs", for "three corrects", there are $\binom{5}{3}$ ways. For "two wrongs", each one has two ways to get wrong, so $2\times 2$
Answer: $\binom{5}{3}\times4=40$
A: Lets try to model the question using generating functions such that the exponential part of $x's$ represent the marks , and the coefficient of $x's$ represent the number of possible ways to get the mark (exponential).
Then ,

*

*If the correct answer gives $3$ marks and there is only one way to get correct answer , we can represent it by $x^3$


*If the wrong answers give $(-2)$ marks and there are two ways to get wrong answers , we can represent it by $2x^{-2}= \frac{2}{x^2}$


*If we do not attempt question , we cannot take any marks , so we take $0$ marks.Moreover , we can do this only one way , i.e , no attempting the question can be done only one way like choosing the correct one. Then , represent it by $1x^0$
It is known that we can either choose the correct one or the wrong answers or no attempting the question. Then , we can represent a single question by $$\bigg(1+\frac{2}{x^2}+x^3\bigg)$$
However , we have $5$ questions , so the number of getting score $\color{red}{n}$ can be represented by  $$[x^n]\bigg(1+\frac{2}{x^2}+x^3\bigg)^5$$
HERE IS THE CALCULATION
We see that the number of possible ways of getting score :

*

*$5$ is $40$


*$0$ is $81$


*$15$ is $1$


*$-8$ is $80$


*$4$ is $60$
