In a certain test $$a_i$$ students gave wrong answers to at least i questions, where $$i= 1,2,3......k$$ No student gave more than k wrong answers. The total number of wrong answers is

I wasn't able to start solving this. I tried subtracting 2-1 for exactly 1 answer but I didn't understand what was happening. The solution provided uses the same logic from the below sum of Therefore, total number of wrong answers contributed by $$2^{n−i} −2^{n−i−1}$$ students who answered i questions wrong is $$(2^{n−i}−2^{n−i−1})i$$. I have no clue how this was derived.

There is a similar question on the site already but it is the other way around and doesn't resolve my doubt. To find number of questions when number of wrong answers is given

• Did you mean to write $(2^{n - i} - 2^{n - i - 1})i$? This tutorial explains how to typeset mathematics on this site. – N. F. Taussig Jul 25 '20 at 10:01
• @N.F.Taussig okay ill check it out thanks! – Shaurya Goyal Jul 25 '20 at 10:03
• HINT: How many students gave precisely $i$ wrong answer? – FormulaWriter Jul 25 '20 at 10:14

• The number who gave at least $$k$$ wrong answers is $$a_k$$. Since no student gave more than $$k$$ wrong answers, the number who gave exactly $$k$$ wrong answers is $$a_k$$.

• The number who gave at least $$k-1$$ wrong answers is $$a_{k-1}$$. Since $$a_k$$ students gave more than $$k-1$$ wrong answers, the number who gave exactly $$k-1$$ wrong answers is $$a_{k-1}-a_k$$.

• The number who gave at least $$k-2$$ wrong answers is $$a_{k-2}$$. Since $$a_{k-1}$$ students gave more than $$k-2$$ wrong answers, the number who gave exactly $$k-2$$ wrong answers is $$a_{k-2}-a_{k-1}$$.

• $$\cdots$$

• The number who gave at least $$1$$ wrong answer is $$a_{1}$$. Since $$a_2$$ students gave more than $$1$$ wrong answer, the number who gave exactly $$1$$ wrong answers is $$a_1-a_2$$.

So the total number of wrong answers is $$1(a_1-a_2)+2(a_2-a_3) +\cdots+(k-1)(a_{k-1}-a_k)+k(a_k)$$ $$=a_1 +a_2(2-1)+a_3(3-2)+\cdots+a_k(k-(k-1))$$ $$=a_1+a_2+a_3+...+ a_k$$ $$=\sum\limits_1^k a_n$$

• I do not understand the second line. ak-1 is < ak. So the value come out on negative ? Could you please simplify it a little bit, or maybe just word it in a different way ? I tried this was ak=5 and ak-1= 4 but did not get it. – Shaurya Goyal Jul 26 '20 at 17:51
• I got it. I was assumimg ak> ak-1 when the values would actually be converging. Thanks! – Shaurya Goyal Jul 26 '20 at 17:53