3

Need some help with this exercise:

There are $300$ students in a course. Each student can get a grade from $0-100$. How many ways can you divide the scores to get an average of $60$?

I had struggles to isolate the scenario of the exact required average. After that I know how to make the distribution.

Igor
  • 97
  • 5
  • Welcome to MSE. Questions like "Here is the task. Solve it for me!" are poorly received on this site. Therefore try to improve your question with an edit. Improving could consist of providing some context concerning your task or by adding what you have tried so far and where did you struggle :) – mrtaurho Dec 23 '18 at 12:52
  • Thanks you for the remark, I've edited it :) – Igor Dec 23 '18 at 12:56

3 Answers3

1

First of all note that average of 60 implies a total score (sum of score of all students) $= 60\cdot300=18000$.

Also, let $x_i$ be the score of $i^{th}$ student. Then, $0\leq x_i\leq100$. I assume that you can only can integral grades.

Note that what you need is $x_1+x_2+\cdots+x_{300}=18000$

So, using generating functions, total possible ways$=$ $$\text{Coeff. of }z^{18000}\text{ in }(z^0+z^1+z^2+\cdots+z^{100})^{300}$$ $$=(\frac{z^{101}-1}{z-1})^{300}$$ $$=(z^{101}-1)^{300}\cdot(z-1)^{-300}$$ $$=\sum_{i=0}^{178}\binom{300}{i}\binom{300+(18000-101i)-1}{18000-101i}$$ $$=\sum_{i=0}^{178}\binom{300}{i}\binom{18299-101i}{18000-101i}$$ Note that I took $i\leq 178$ because $18000-101i\geq0\implies i\leq178.2$. And I'll be really honest. I don't know if there's any way to solve that summation.

Ankit Kumar
  • 1,874
  • I've came to something similar:

    $\sum\limits_{j=0}^{300}\binom{300+18000-100j-1}{18000-100j}\binom{300}{j}(-1)^j$

    Counting all the possibilities and limiting 100 for each "cell". After 180 I will just sum zeros.

    – Igor Dec 23 '18 at 14:16
  • There's a slight mistake. $(-1)^{18000-101j}$ will come from the other term too. So you need not include that. Further, the formula for negative binomial is $\binom{n+k-1}{k}$. You seem to have missed the -1. Also, it'll be 101j and not 100j because there're 101 terms in the geometric expression and not 100 ;) – Ankit Kumar Dec 23 '18 at 14:19
  • -I don't understand why -1 is not necessary.
    • Yes, you are right :)
    • Why 101
    – Igor Dec 23 '18 at 14:26
  • You've included -1 only from the $(z^{101}-1)^{300}$ term if I'm correct. But it'll be from $(z-1)^{-300}$ term too right? – Ankit Kumar Dec 23 '18 at 14:28
  • Each student can a get a grade from 0 to 100. They are 101 numbers (and hence possible values of $x_i$s) and not 100 – Ankit Kumar Dec 23 '18 at 14:29
  • I'm taking all the distribution scenarios and eliminating all the possibilities that there will be a student with more than 100. – Igor Dec 23 '18 at 14:37
  • Can you explain why you wrote 100? May be then i can tell where r u wrong – Ankit Kumar Dec 23 '18 at 14:56
  • I'm taking all the possibilities to distribute 18000 "balls" to 300 "cells". From it I'm demanding for 100 maximum balls in each cell with the inclusion-exclusion principle. – Igor Dec 23 '18 at 15:35
  • 1
    This problem will be way easier for you to solve if you read about generating functions ;) – Ankit Kumar Dec 23 '18 at 15:36
  • 1
    This is the subject of the next lecture I will have this week :) – Igor Dec 23 '18 at 17:32
0

Suppose there are $n$ students in a given course, and on a particular exam each student can receive an integer grade from $0$ to $100$. If the class average on the exam is exactly $60$, then how many different grade distributions are there for the students in the course?

What we are really doing is counting the solutions to a restricted Diophantine equation: $$ s_1+s_2+\cdots+s_n=n\cdot60 \quad \text{with all } s_i\in[0,100] $$ In the case $n=1$, there is clearly only one solution. In the case $n=2$, we will have $81$ solutions, and for $n\geq 3$ it becomes clear that there are difficult counting problems involved that yield some rather large numbers.

Thankfully, this problem has been well studied; what we are really doing is counting lattice points in some high dimensional polytope, which can be accomplished with Ehrhart polynomials. In particular, this post has an answer that demonstrates how you may go about computing the answer you seek!

0

The correct generating function is already given by Ankit Kumar.

So to find the exact solution, a few lines of Mathematica code is enough:

g = (z^101 - 1)/(z - 1);
f = g^300;
SeriesCoefficient[f, {z, 0, 18000}]

283842333432402321353024303661058637351420936084067738626583506213864447957870755539611750086168273196143155816656392895618438969536797685183460631860648381858482057644617263985079629258986110897789595623952660661105103107276955285902613205328147901598400715242942785403171606118195123592165718190326762039521274137278366225940884773691094689005096899697160884662108869409844236284336801805326795531698837921700003716989423475547841836096863072991222376259898318028580853239559456607248039447660955555656440250262052607092640488420986795396794284727379957951608980168883759138931179704247147