@bhuv

Sir Can u please tell the online source or book for learning Generating Functions?

Sir Can u please tell the online source or book for learning Generating Functions?

25 votes

Four fair six-sided dice are rolled. The probability that the sum of the results being $22$ is $\dfrac{X}{1296}$. The value of $X$ is _______

53 votes

Best answer

20 votes

Using Generating Functions

$$x1+x2+x3+x4=22\ where\ 1\leq x_{i}\leq 6$$

Now we need to find Cofficent of $x^{22}$

$$=[X^{22}]\left \{ (x^{1}+x^{2}+x^{3}+x^{4}+x^{5}+x^{6})^{4} \right \} \\ =[X^{22}][x^{4}]\left \{ (1+x^{1}+x^{2}+x^{3}+x^{4}+x^{5})^{4} \right \} \\ =[X^{18}]\left \{ (1+x^{1}+x^{2}+x^{3}+x^{4}+x^{5})^{4} \right \} \\$$

$$=[X^{18}]\left \{ (1+x^{1}+x^{2}+x^{3}+x^{4}+x^{5})^{4} \right \} \\ =[X^{18}]\left ( \frac{1-x^{6}}{1-x} \right )^{4}\ using\ GP\ Formula \\ =[X^{18}]\left ( \frac{1}{1-x} \right )^{4} \left ( 1-x^{6} \right )^{4} \\ =[X^{18}]\underbrace{\left [ \sum_{r=0}^{\bowtie } \binom{4+r-1}{r}x^{r}\right ]} \underbrace{\left [ \sum_{r=0}^{4}\binom{4}{r} (-x^{6})^{r} \right ]} \\$$

IN First and Second Part we can put the values as

$$r=18 \ r=0 \\ r=12 \ r=1 \\ r=6 \ r=2 \\ r=0 \ r=3$$

$$=\binom{21}{18}x^{18}-\binom{15}{12}\binom{4}{1}x^{18}+\binom{9}{6}\binom{4}{2}x^{18}-\binom{3}{0}\binom{4}{3}x^{18} \\ =(1330-1820+504-4) x^{18} \\ =10x^{18}$$

So, there are $10$ ways to get sum as $22$.

I know this method seems tedious and long, but it is mechanical and universal if used carefully.

$$x1+x2+x3+x4=22\ where\ 1\leq x_{i}\leq 6$$

Now we need to find Cofficent of $x^{22}$

$$=[X^{22}]\left \{ (x^{1}+x^{2}+x^{3}+x^{4}+x^{5}+x^{6})^{4} \right \} \\ =[X^{22}][x^{4}]\left \{ (1+x^{1}+x^{2}+x^{3}+x^{4}+x^{5})^{4} \right \} \\ =[X^{18}]\left \{ (1+x^{1}+x^{2}+x^{3}+x^{4}+x^{5})^{4} \right \} \\$$

$$=[X^{18}]\left \{ (1+x^{1}+x^{2}+x^{3}+x^{4}+x^{5})^{4} \right \} \\ =[X^{18}]\left ( \frac{1-x^{6}}{1-x} \right )^{4}\ using\ GP\ Formula \\ =[X^{18}]\left ( \frac{1}{1-x} \right )^{4} \left ( 1-x^{6} \right )^{4} \\ =[X^{18}]\underbrace{\left [ \sum_{r=0}^{\bowtie } \binom{4+r-1}{r}x^{r}\right ]} \underbrace{\left [ \sum_{r=0}^{4}\binom{4}{r} (-x^{6})^{r} \right ]} \\$$

IN First and Second Part we can put the values as

$$r=18 \ r=0 \\ r=12 \ r=1 \\ r=6 \ r=2 \\ r=0 \ r=3$$

$$=\binom{21}{18}x^{18}-\binom{15}{12}\binom{4}{1}x^{18}+\binom{9}{6}\binom{4}{2}x^{18}-\binom{3}{0}\binom{4}{3}x^{18} \\ =(1330-1820+504-4) x^{18} \\ =10x^{18}$$

So, there are $10$ ways to get sum as $22$.

I know this method seems tedious and long, but it is mechanical and universal if used carefully.

0

https://gateoverflow.in/65803/find-number-integral-solutions-using-generating-function

This post and material in its links are enough.

4 votes

In general, Probability (of an event ) = No of favorable outcomes to the event / Total number of possible outcomes in the random experiment.

Here, 4 six-faces dices are tossed, for one dice there can be 6 equally likely and mutually exclusive outcomes. T

aking 4 together, there can be total number of 6*6*6*6 = 1296 possible outcomes.

Now, No of favorable cases to the event : here event is getting sum as 22. So, there can be only 2 cases possible.

Case 1: Three 6's and one 4, for example: 6,6,6,4 ( sum is 22) Hence, No of ways we can obtain this = 4!/3! = 4 ways ( 3! is for removing those cases where all three 6 are swapping among themselves)

Case 2: Two 6's and two 5's,for example: 6,6,5,5 ( sum is 22) Hence, No of ways we can obtain this = 4! /( 2! * 2!) = 6 ways ( 2! is for removing those cases where both 6 are swapping between themselves, similarly for both 5 also)

Hence total no of favorable cases = 4 + 6 = 10. Hence probability = 10/1296. Therefore option D.

Here, 4 six-faces dices are tossed, for one dice there can be 6 equally likely and mutually exclusive outcomes. T

aking 4 together, there can be total number of 6*6*6*6 = 1296 possible outcomes.

Now, No of favorable cases to the event : here event is getting sum as 22. So, there can be only 2 cases possible.

Case 1: Three 6's and one 4, for example: 6,6,6,4 ( sum is 22) Hence, No of ways we can obtain this = 4!/3! = 4 ways ( 3! is for removing those cases where all three 6 are swapping among themselves)

Case 2: Two 6's and two 5's,for example: 6,6,5,5 ( sum is 22) Hence, No of ways we can obtain this = 4! /( 2! * 2!) = 6 ways ( 2! is for removing those cases where both 6 are swapping between themselves, similarly for both 5 also)

Hence total no of favorable cases = 4 + 6 = 10. Hence probability = 10/1296. Therefore option D.