Number of ways in which a batsman can score 14 runs in 6 balls not scoring more than 4 runs in any ball. Hello everybody my query is regarding the number of positive integral solution.

In the sport of cricket, find the number of ways in which a batsman can score $14$ runs in $6$ balls not scoring more than $4$ runs in any ball.

 A: If they’re the $6$ balls of a single over, and we’re talking about one batsman, either he scores nothing but $0,2$, and $4$, or he scores $3$ twice and $4$ twice, with the other batsman taking strike twice and scoring an odd number of runs each time. I suspect, though, that you’re intended to assume that the same batsman receives all $6$ balls, and that that $6$ balls are not necessarily consecutive.
You can solve it as a stars and bars problem, though you’ll have to use an inclusion-exclusion argument to take into account the limitation that he never scores better than a $4$. Specifically, if $x_k$ is his score on the $k$-th ball, you want the number of solutions of
$$x_1+x_2+x_3+x_4+x_5+x_6=14\tag{1}$$
in non-negative integers, subject to the condition that each $x_k\le 4$. Ignoring that last restriction, the stars and bars computation (which is explained reasonably well at the link in case you’ve not seen it before) gives a total of 
$$\binom{14+6-1}{6-1}=\binom{19}5\tag{2}$$
solutions in non-negative integers. However, some of these solutions aren’t wanted, because one or more of the scores is over $4$. How many have $x_1\ge 5$? If we replace $x_1$ by $y_1=x_1-5$, every solution in non-negative integers to
$$y_1+x_2+x_3+x_4+x_5+x_6=9\tag{3}$$
corresponds to a solution of $(1)$ in non-negative integers with $x_1\ge 5$. The stars and bars calculation yields a total of 
$$\binom{9+6-1}{6-1}=\binom{14}5$$
solutions in non-negative integers to $(3)$, so we should subtract them from $(1)$. Moreover, the same thing can happen with each of the other five scores, so we should reduce $(2)$ to
$$\binom{19}5-6\binom{14}5\;.\tag{4}$$
Unfortunately, any solution to $(1)$ that had two scores over $4$ has been removed twice in $(4)$ and should be added back in once.
Suppose that $x_1$ and $x_2$ are both over $4$; then we can replace $x_1$ by $y_1=x_1-5$ and $x_2$ by $y_2=x_2-5$ and count the non-negative solutions to
$$y_1+y_2+x_3+x_4+x_5+x_6=4\;.$$
The same calculation that we’ve already made twice tells us that there are
$$\binom{4+6-1}{6-1}=\binom95$$
of them. There are $\binom62$ pairs of scores, so we have to add $\binom95$ back in $\binom62$ times, getting
$$\binom{19}5-6\binom{14}5+\binom62\binom95\;.\tag{5}$$
And this is as far as we need to go, since it’s impossible to have more than two scores over $4$ and a total score of $14$: $(5)$ is the desired number.
A: I just realized that this game is cricket, and actually this question has insufficient information ,because in cricket you usually can't make scores of $2$ or $3$ but only $0,1,4,6$ most of time. Well it depends on condition, but i am here going to assume that all outcome are possible from $0\to4$.
So our six variable let them be $x_i$ where  $1\leq i \leq 6$ . 
Also assuming independency each $0\leq x_i\leq 4$
Since total score we require is 
$\sum_{i=1}^{6}x_i=14$
The generator function can be formulated as 
$coeff(x^{14})\;\;\; in \;\;\; (x^0+x^1+x^2+x^3+x^4)^6$
$\implies \dfrac{(1-x^5)^6}{(1-x)^{6}}$
$\implies (1-x^5)^6(1-x)^{-6}$
$\implies (1-x^5)^6(1+^{6}C_{1}x+^7C_2x^2+....$
You can take from here, also if $x_i\notin[2,3]$
Simply discard those values in exponents of $x$.
A: my solution is based on non-negative intergral solution..
$a+b+c+d+e+f=14$ provided the condition $a,b,c,d,e,f \leq 4$
let $a=4-a_1,b=4-a_2,....f=4-a_6$ and replace in given equation
we get ,
$(4-a_1)+(4-a_2)+(4-a_3)+(4-a_4)+(4-a_5)+(4-a_6)=14$
$24-(a_1+a_2+a_3+a_4+a_5+a_6)=14$
$a_1+a_2+a_3+a_4+a_5+a_6=10$ ( now $a$ was $\leq 4$ so $4-a_1 \leq 4 \Rightarrow a_1 \geq 0$)
so,
$a_1+a_2+a_3+a_4+a_5+a_6=10$  provided $a_1,a_2,a_3,a_4,a_5,a_6 \geq 0$ 
use solution of non-negative integral solution for linear equation
$= {{n+r-1}\choose{r-1}}$
$ = {{10+6-1}\choose{6-1}} = {{15}\choose{5}} = 3003$
so total no of ways $=3003$
