Number of ways a batsman can score 30 runs in 6 balls assuming that he can only hit 1,2,3,4,6 runs in a ball It’s simpler when he can score $1,2,3,4,5,6$ runs in a ball.
I considered the runs scored in a ball as $6-x_1, 6-x_2, 6-x_3, 6-x_4, 6-x_5, 6-x_6$ and equated it to 30.
So we’ll get
$x_1 + x_2 + x_3 +x_4+ x_5 +x_6=6$
We’ll get the runs scored from this expression using the distribution formula.
But after the condition that he can’t score 5, I’m not able to understand how I should include the new condition. How should I proceed, since I’m not able to use my previous method.
 A: Note that the batsman cannot have a single ($1$-run ball) since the only way to make $29$ from $5$ numbers in $[0,6]$ is $6+6+6+6+5$ and $5$ is not scoreable. Hence we may subtract $2$ from each score to get $x_1+\cdots+x_6=18$ with allowed scores $0,1,2,4$.
Suppose one $x_i$ in this latter equation is $0$, then it is easy to check that the only way to make $18$ with the five remaining numbers is $4+4+4+4+2$. This accounts for $6×5=30$ possibilities; set them aside, then decrement the $x_i$ again to get $x_1+\cdots+x_6=12$ with allowed scores $0,1,3$.
By considering this last equation modulo $3$ we deduce that the number of $1$s is also a multiple of $3$ – that number clearly cannot be $6$, so it is $0$ or $3$, corresponding to run partitions of $3^40^2$ and $3^31^3$ with $\binom62=15$ and $\binom63=20$ ways of achieving them respectively.
The total number of ways to score $30$ is therefore $30+15+20=65$.
A: Hint: $6$ is a really large number compared to $1$,$2$, and $3$. If the batsman only gets $6$ runs three times, can he even reach $30$ runs in total? On the other hand, if he gets it at least five times, can he get exactly $30$ runs?
