3

In a match a team needs 14 runs to win in the last over to win the match (i.e.) exactly 14 run, assuming that all runs are made off the bat and the batsmen can not score more than 4 runs off any ball. find the number of ways in which team just manages to win the match i.e. scores exactly 14 runs.

My attempt to the solution

We can take 3 cases

2 dot balls 1 dot balls 0 dot balls

Only the 1st case is easy to solve next are very difficult to calculate.

maths lover
  • 3,424
  • 3
    For those unfamiliar, the first part likely relates to cricket. What is the actual problem here? (Are you trying to count the number of ways of obtaining 14 runs?) It's natural to think the team would still win even if they scored 15 or more runs too. The second part of this question is totally disconnected from the first, and should be a separate question. – Douglas S. Stones Aug 15 '13 at 08:33
  • ya 2nd part is a new question.!! – maths lover Aug 15 '13 at 08:51
  • 1
    '(i.e.) exactly 14 run' limited the scope and left no ambiguity in my mind. i was about to drop my answer before this got put on hold. – elbeardmorez Aug 15 '13 at 10:16
  • Plz can u tell..now i have edited this. Niw the language is clear – maths lover Aug 15 '13 at 10:19
  • 1
    "2 dot balls 1 dot balls 0 dot balls" Whatever does that mean? – Gerry Myerson Aug 15 '13 at 12:55
  • Ist case means there are 2 dot balls in 6 balls. IInd case means there is 1 dot ball in 6 balls. IIIrd case means there is no dot ball in 6balls – maths lover Aug 15 '13 at 13:05
  • 1
    There are a lot of Cricket terms here. http://en.wikipedia.org/wiki/Glossary_of_cricket_terms is a glossary for those so interested. A dot ball is a delivery of a ball such that no runs are gained from it. There are 6 balls to an "over" - this aint gonna be easy! – Autolatry Aug 15 '13 at 13:07
  • @GerryMyerson: A "dot ball" is a ball in which no runs are scored. The question is to find the number of solutions $(x_1, x_2, x_3, x_4, x_5, x_6)$ such that $0 \le x_i \le 4$ and $\sum x_i = 14$. – ShreevatsaR Aug 15 '13 at 13:17

3 Answers3

4

If I understand the question, you want the number of ways of choosing six integers $a_1,\ldots,a_6$ with $0 \le a_i \le 4$ and $\sum_1^6 a_i = 14$. The answer is the coefficient of $x^{14}$ in the polynomial $(x^4+x^3+x^2+x+1)^6$, which you can ask Wolfram Alpha to compute.

This assumes that you don't need to have the team win the match on the very last ball.

TonyK
  • 68,059
  • can u explain this...that how does coefficient of dis works..? – maths lover Aug 15 '13 at 13:26
  • 1
    Each $x^4+x^3+x^2+x+1$ represents one delivery. The coefficient of $x^{14}$ in the product is the number of ways of choosing a term $x^{a_i}$ from each delivery so that the $a_i$ add up to 14. – TonyK Aug 15 '13 at 13:32
  • can i get some theory on this..? – maths lover Aug 15 '13 at 13:33
  • That's all I'm going to say. – TonyK Aug 15 '13 at 13:35
  • ??????????????? – maths lover Aug 15 '13 at 13:36
  • maths lover, answering your question doesn't commit me to holding an unpaid seminar on generating functions. Go and expand the polynomial by hand, and you will find out for yourself. – TonyK Aug 15 '13 at 13:39
  • i m asking a source for reading this – maths lover Aug 15 '13 at 13:41
  • 1
    @mathslover Generatingfuctionology is pretty good. – Tim Vermeulen Aug 15 '13 at 13:50
  • I think for concrete problems like this (as opposed to asymptotics), an answer in terms of generating functions is a non-answer, and worse than nothing. It is not any easier to find (by hand) the coefficient of $x^{14}$ in $(x^4+x^3+x^2+x+1)^6$ than it is to solve the original problem; any techniques applicable to the former are also applicable to the latter. If anything, the "reduction" to generating functions has only made the problem slighty harder, by introducing potentially distracting details. – ShreevatsaR Aug 15 '13 at 13:58
  • @ShreevatsaR: If we're talking concrete vs abstract, you may have noticed that my approach was the one that gave the correct answer. – TonyK Aug 15 '13 at 14:07
  • @TonyK: I don't see an answer. And did you compute the coefficient of $x^{14}$ in $(x^4 + x^3 + x^2 + x + 1)^6$ by hand? (BTW, I meant concrete not as opposed to abstract, but in the sense of wanting an actual number instead of asymptotics: perhaps "finite" would have been a better word.) – ShreevatsaR Aug 15 '13 at 14:15
  • @ShreevatsaR: You will find my answer in a comment to elbeardmorez's answer. And no, I didn't compute it by hand -- that's what elbeardmorez did, and they got it wrong :-) – TonyK Aug 15 '13 at 14:18
  • @TonyK: Yes, what I said in my original comment was that when you want to compute an answer by hand, it doesn't help to use the machinery of generating functions. (Though if you're using computers, there too both are at equal levels of algorithmic complexity, being essentially the same problem.) See also instances like this question where the generating functions approach gets positively ridiculous in comparison. – ShreevatsaR Aug 15 '13 at 14:23
3

i'll be interested to see if there's a better way of doing this, but below is my brute force (systematic) attempt at getting the combinations. hopefully i didn't miss any.

4 4 4 2 0 0 | 6!/(3!2!) = 60
4 4 4 1 1 0 | 6!/(3!2!) = 60
4 4 3 3 0 0 | 6!/(2!2!2!) = 90
4 4 3 2 1 0 | 6!/2! = 360
4 4 3 1 1 1 | 6!/(2!3!) = 60
4 4 2 2 2 0 | 6!/(2!3!) = 60
4 4 2 2 1 1 | 6!/(2!2!2!) = 90
4 3 3 3 1 0 | 6!/3! = 120
4 3 3 2 2 0 | 6!/(2!2!) = 180 <- [edit: initially missed, spotted by TonyK]
4 3 3 2 1 1 | 6!/(2!2!) = 180
4 3 2 2 2 1 | 6!/3! = 120
4 2 2 2 2 2 | 6!/5! = 6
3 3 3 3 2 0 | 6!/4! = 30
3 3 3 3 1 1 | 6!/(4!2!) = 15
3 3 3 2 2 1 | 6!/(3!2!) = 60
3 3 2 2 2 2 | 6!/(2!4!) = 15

so 1506 ways to make exactly 14..

we're looking for unique combinations initially and then calculating the number of permutations for each. hopefully you can see the logic but..

starting with the most efficient way to make 14 (4 4 4 2), work on combinations based around modification of the last scoring bat (2 in this case), reduce by 1 and then 'compensate' by scoring (the same or less) for the remaining bat(s), and only where necessary (i.e where the tally < 14), and where possible (i.e. there are bats remaining in the over)

so (4 4 4 2 0 0) -> (4 4 4 1 1 0). and that exhausts the combinations for necessary scoring bats. we then reduce the last scoring bat >1 and continue as before. (4 4 4 1 1 0) -> (4 4 3 ? ? ?) so thus (4 4 3 3 0 0) gives 14. then (4 4 3 3 0 0) -> (4 4 3 2 ? ?) so (4 4 3 2 1 0) and so on and so on..

1

Finding the number of $6$-tuples with elements in $\{0,1,2,3,4\}$ that sum to $14$ can be solved computationally in GAP via:

S:=RestrictedPartitions(14+6,[0,1,2,3,4]+1,6)-1;
Sum(S,P->NrPermutationsList(P));

This finds the set $S$ of partitions of $20$ into $6$ integers in $\{1,2,3,4,5\}$ and subtracts $1$ from each coordinate. Then for each element $P \in S$, it finds the number of ordered $6$-tuples that give rise to $P$ when unordered.

This return 1506 in agreement with the other answers.


Comment: One might also get the same answer using

S:=RestrictedPartitions(14,[0,1,2,3,4],6);

but this could be considered "cheating" (since RestrictedPartitions is not guaranteed to work correctly for partitions involving 0; e.g. NrRestrictedPartitions(1,[0,1],2); returns 0).