4
$\begingroup$

I need to find the number of solutions to $$a+b+c+d+e+f=14$$ where $a,b,c,d,e$ and $f$ are whole numbers $\le 4$.

Manually I am getting the result which is $1506$, but is there any other method that solves the problem easily?

EDIT: Actually this is the question of cricket I converted it into the following problem:

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.

$\endgroup$
5
  • 1
    $\begingroup$ Do "whole numbers" include zero? $\endgroup$ – user7530 Aug 17 '18 at 17:51
  • $\begingroup$ If I remember correctly, whole numbers include 0, and natural do not. If they don't, I can change my answer appropriately. $\endgroup$ – Don Thousand Aug 17 '18 at 17:53
  • $\begingroup$ Yes the alphabets can be identical but sum needs to be 14 $\endgroup$ – Samar Imam Zaidi Aug 17 '18 at 17:54
  • 2
    $\begingroup$ 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. $\endgroup$ – Samar Imam Zaidi Aug 17 '18 at 17:54
  • $\begingroup$ Actually this is the question of cricket I converted it into the following problem $\endgroup$ – Samar Imam Zaidi Aug 17 '18 at 17:55
11
$\begingroup$

This problem is a perfect demonstration of stars and bars. We can think about distributing the units of 14 into 6 baskets, each representing one of the variables.

So, we divide our pile of 14 units (*) into 6 pieces (|). This leaves us with

**************|||||

So, we choose where to place the 5 bars in the 19 possible positions, so the answer is $19\choose{5}$ which is $11628$.

Now, I've ignored the condition that none of the numbers can be greater than 4. In order to account for that, I'll count the number of ways that one number will be greater than 4. First, I have 6 choices as to where to put 5 of our 14 units, and then, the remaining combinations are

*********|||||

So, we have $6\cdot{14\choose5}$. However, we've now undercounted, since if two of the numbers are above 4, then we double subtracted them from the total.

Hence, assume that we choose two numbers $6\choose2$ to have value 5 or above. So, we distribute these values and spread the remaining 4 across the bars

****|||||

This gives us $15{9\choose4}$.

So, our answer is ${19\choose 5} - 6{14\choose5} + {6\choose2}{9\choose4} = 1506$.

$\endgroup$
4
  • $\begingroup$ Gregory is right $\endgroup$ – Samar Imam Zaidi Aug 17 '18 at 17:57
  • $\begingroup$ Maximum number is 4 $\endgroup$ – Samar Imam Zaidi Aug 17 '18 at 17:58
  • $\begingroup$ @Rushabh Mehta it is correct See the actual problem, I converted it for solving purpose as it involves knowledge of cricket $\endgroup$ – Samar Imam Zaidi Aug 17 '18 at 18:04
  • $\begingroup$ @RushabhMehta - I agree that the answer is fixed now, so I've deleted the original comment. $\endgroup$ – Gregory J. Puleo Aug 17 '18 at 18:23
3
$\begingroup$

Another method is using generating functions (e.g. here and here) leading to $$(1+x+x^2+x^3+x^4)^6$$ with the coefficient of $\color{red}{x^{14}}$ being the answer, which is 1506.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.