In Indo-Pak one day International cricket match at Sharjah, India needs 14 runs to win just before the start of the final over.
In Indo-Pak one day International cricket match at Sharjah, India needs 14 runs to win just before the start of the final over. Find the number of ways in which India just manages to win the match (i.e. scores exactly $14$ runs), assuming that all the runs are made off the bat & the batsman can not score more than $4$ runs off any ball.
I tried to solve it like this question **A man goes in for an examination in which there are $4$ papers with a maximum of $m$ marks for each paper; show that the number of ways of getting $2m$ marks on the whole is $(m + 1)(2m^2+ 4m + 3) / 3$ which has the solution *let the marks in the $4$ papers are $x,y,z,w$
where $0≤x,y,z,w≤m$
$x+y+z+w=2m$
now our task is to find out the integer solution of this equation in given condition.
number of solution is $ = (2m + 4-1)C(4-1) = (2m + 3) C3$
but this solution also includes those solutions in which any variable is greater than $m$
so we have to subtract those solutions
for $x ≥ m+1$ .
let $t = x - (m+1)$, $t≥0$
$x+y+z+w=2m$
$t+y+z+w=m -1$
Solution of this equation = $(m-1 + 4-1)C(4-1) = (m + 2)C3$
Similarly for $y ≥ m+1,z ≥ m+1,w ≥ m+1$
So final solution = $(2m + 3)C3 - 4 \cdot (m+2) C3$
$ =(m+1)(2m^2+4m+3)/3$
but i am not getting the correct answer which is 1506 please help
Solution 1:
Apply principle of inclusion exclusion.
You are looking for solution to the equation $\sum \limits_{i=1}^6 x_i = 14~$, where $0 \leq x_i \leq 4$.
First applying stars and bars method without upper restriction of $4$ on $x_i$ and $x_i$ being non-negative integers, the solution is $ \displaystyle {14 + 6 - 1 \choose 6 - 1}$. But we need to exclude those solutions where $x_i \gt 4$. Either one of $x_1$ to $x_6$ is greater than $4$ or two of them are greater than $4$. So we can assign $5$ to one of them or assign $5$ to two of them to start with and then apply stars and bars for the remaining of the sum.
So applying principle of inclusion-exclusion, the number of solutions is
$ \displaystyle {14 + 6 - 1 \choose 6 - 1} - {6 \choose 1} {9 + 6 - 1 \choose 6 - 1} + {6 \choose 2} {4 + 6 - 1 \choose 6 - 1}$
$ = 1506$