Four fair six-sided dice are rolled. The probability that the sum of the results being $22$ is $$\frac{X}{1296}.$$ What is the value of $X$?
I simplified it to the equation of the form:
$x_{1}+x_{2}+x_{3}+x_{4}=22, 1\,\,\leq x_{i} \,\,\leq 6,\,\,1\,\,\leq i \,\,\leq 4 $
- Number of ways to put N items into K bins with at least 1 per bin?
- Multiple choice exam where no three consecutive answers are the same (1)
- Frequency distribution for N balls in m urns (distributed equiprobably)
- What is the maximum length of a non-repeating word on $n$ letters?
- Why do graph degree sequences always have at least one number repeated?
- Using permutation or otherwise, prove that $\frac{(n^2)!}{(n!)^n}$ is an integer,where $n$ is a positive integer.
Solving this equation results in:
$x_{1}+x_{2}+x_{3}+x_{4}=22$
I removed restriction of $x_{i} \geq 1$ first as follows-:
$\Rightarrow x_{1}^{‘}+1+x_{2}^{‘}+1+x_{3}^{‘}+1+x_{4}^{‘}+1=22$
$\Rightarrow x_{1}^{‘}+x_{2}^{‘}+x_{3}^{‘}+x_{4}^{‘}=18$
$\Rightarrow \binom{18+4-1}{18}=1330$
Now i removed restriction for $x_{i} \leq 6$ , by calculating the number of bad cases and then subtracting it from $1330$:
calculating bad combination i.e $x_{i} \geq 7$
$\Rightarrow x_{1}^{‘}+x_{2}^{‘}+x_{3}^{‘}+x_{4}^{‘}=18$
We can distribute $7$ to $2$ of $x_{1}^{‘},x_{2}^{‘},x_{3}^{‘},x_{4}^{‘}$ i.e$\binom{4}{2}$
We can distribute $7$ to $1$ of $x_{1}^{‘},x_{2}^{‘},x_{3}^{‘},x_{4}^{‘}$ i.e$\binom{4}{1}$ and then among all others .
i.e
$$\binom{4}{1} \binom{14}{11}$$
Therefore, the number of bad combinations equals $$\binom{4}{1} \binom{14}{11} – \binom{4}{2}$$
Therefore, the solution should be:
$$1330-\left( \binom{4}{1} \binom{14}{11} – \binom{4}{2}\right)$$
However, I am getting a negative value. What am I doing wrong?
EDIT
I am asking for my approach, because if the question is for a larger number of dice and if the sum is higher, then predicting the value of dice will not work.
There aren’t too many to just count.
Permutations of $6+6+6+4$: $\binom41=4$
Permutations of $6+6+5+5$: $\binom42=6$
These are the only options, so your numerator must be $4+6=10$
$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
\newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
\newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\ds}[1]{\displaystyle{#1}}
\newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
\newcommand{\ic}{\mathrm{i}}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\mrm}[1]{\mathrm{#1}}
\newcommand{\pars}[1]{\left(\,{#1}\,\right)}
\newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
\newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
\newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
\newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
The number of configurations that satisfies “the sum is $\ds{22}$” is given by:
\begin{align}
X & =
\sum_{d_{1} = 1}^{6}\sum_{d_{2} = 1}^{6}\sum_{d_{3} = 1}^{6}\sum_{d_{4} = 1}^{6}
\bracks{z^{22}}z^{d_{1} + d_{2} + d_{3} + d_{4}} =
\bracks{z^{22}}\pars{\sum_{d = 1}^{6}z^{d}}^{4} =
\bracks{z^{22}}\pars{z\,{z^{6} – 1 \over z – 1}}^{4}
\\[5mm] & =
\bracks{z^{18}}{1 – 4z^{6} + 6z^{12} – 4z^{18} + z^{24}\over \pars{1 – z}^{4}}
\\[5mm] & =
\bracks{z^{18}}\pars{1 – z}^{-4} – 4\bracks{z^{12}}\pars{1 – z}^{-4} + 6\bracks{z^{6}}\pars{1 – z}^{-4} – 4\bracks{z^{0}}\pars{1 – z}^{-4}
\\[5mm] & =
{-4 \choose 18}\pars{-1}^{18} – 4{-4 \choose 12}\pars{-1}^{12} +
6{-4 \choose 6}\pars{-1}^{6} – 4 =
{21 \choose 18} – 4{15 \choose 12} + 6{9 \choose 6} – 4
\\[5mm] & =
1330 -4 \times 455 + 6 \times 84 – 4 = \bbx{10}
\end{align}
The bad combinations criteria is atleast one $x_i \geq 7$.
The number of bad combinations when:
One of $x_i$ is forced to be greater than or equal to $7$ is $\binom{4}{1}\binom{12 + 4 – 1}{12} = 1820$.
Two of $x_i$’s are forced to be greater than or equal to $7$ is $\binom{4}{2}\binom{6+4-1}{6} = 504$.
Three of $x_i$’s are forced to be greater than or equal to $7$ is $\binom{4}{3}\binom{0+4-1}{0} = 4$.
Four of $x_i$’s are forced to be greater than or equal to $7$ is $0$.
So, total bad combinations $= 1820 – 504 + 4 – 0 = 1320$
I used $n(\cup_{i=1}^{4}A_i) = \sum_{i=1}^{4}n(A_i) – \sum_{i,j, i\neq j}n(A_i\cap A_j) + \ldots$
So, possible combinations $= 1330 – 1320 = 10$.
In order for the sum to equal 22, either three dice equal $6$ and one equals $4$, or two dice equal $6$ and two dice equal $5$. The number of valid outcomes thus equals:
$${4 \choose 1} + {4 \choose 2} = 4 + 6 = 10$$
As such, the probability of the four dice having a sum of $22$ equals:
$$\frac{{4 \choose 1} + {4 \choose 2}}{6^4} = \frac{10}{1296} = \frac{5}{648} \approx 0.00772$$
@expiTTp1z0 has addressed where you made your error.
I am going to show you how you can reduce the given problem a simpler one by using symmetry.
You wish to find the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 = 22 \tag{1}$$
in positive integers not exceeding $6$. Since $x_k$, $1 \leq k \leq 4$, is a positive integer satisfying $x_k \leq 6$, then $y_k = 7 – x_k$ is also a positive integer not exceeding $6$. Substituting $7 – y_k$ for $x_k$, $1 \leq k \leq 4$, in equation 1 yields
\begin{align*}
7 – y_1 + 7 – y_2 + 7 – y_3 + 7 – y_4 & = 22\\
-y_1 – y_2 – y_3 – y_4 & = -6\\
y_1 + y_2 + y_3 + y_4 & = 6 \tag{2}
\end{align*}
Equation 2 is an equation in the positive integers when the given restrictions are imposed. A particular solution of equation corresponds to placing an addition sign in three of the five spaces between successive ones in a row of six ones. For instance,
$$1 + 1 1 + 1 + 1 1$$
corresponds to the solution $y_1 = 1$, $y_2 = 2$, $y_3 = 1$, and $y_4 = 2$ (or $x_1 = 6$, $x_2 = 5$, $x_3 = 6$, $x_4 = 5$) while
$$1 1 1 + 1 + 1 + 1$$
corresponds to the solution $y_1 = 3$, $y_2 = y_3 = y_4 = 1$ (or $x_1 = 4$, $x_2 = x_3 = x_4 = 6$). Thus, the number of solutions of equation 2 in the positive integers is the number of ways of selecting which three of the five spaces between successive ones in a row of six ones will be filled by addition signs, which is
$$\binom{5}{3} = 10$$
Note: If you prefer to work in the nonnegative integers, then we wish to find the number of solutions of the equation
$$x_1′ + x_2′ + x_3′ + x_4′ = 18 \tag{$1’$}$$
subject to the restrictions that $x_k’ = x_k – 1 \leq 6 – 1 = 5$ for $1 \leq k \leq 4$. Since $x_k’$, $1 \leq k \leq 5$, is a nonnegative integer not exceeding $5$, so is $y_k’ = 5 – x_k’$. Substituting $5 – y_k’$ for $x_k’$ in equation 1′ and simplifying yields
$$y_1′ + y_2′ + y_3′ + y_4′ = 2 \tag{$2’$}$$
which is an equation in the nonnegative integers. A particular solution corresponds to the insertion of three addition signs in a row of two ones. For instance,
$$+ + + 1 1$$
corresponds to the solution $y_1 = y_2 = y_3 = 0$, $y_4 = 2$ (or $x_1 = x_2 = x_3 = 6$, $x_4 = 4$), while
$$1 + 1 + +$$
corresponds to the solution $y_1 = y_2 = 1$, $y_3 = y_4 = 0$ (or $x_1 = x_2 = 5$, $x_3 = x_4 = 6$). Thus, the number of solutions of equation 2 in the nonnegative integers is
$$\binom{2 + 3}{3} = \binom{5}{3}$$
since we must choose which three of the five positions (two ones and three addition signs) will be filled with addition signs.
It is the coefficient of $x^{22}$ in the expansion of the generating function $$(x^6+x^5+x^4+x^3+x^2+x^1)^4=\left(\frac{x(1-x^6)}{1-x}\right)^4$$ which is $$1\cdot{{x}^{24}}+4\cdot {{x}^{23}}+10\cdot {{x}^{22}}+20\cdot {{x}^{21}}+35\cdot {{x}^{20}}+56\cdot {{x}^{19}}+80\cdot {{x}^{18}}\\+104\cdot {{x}^{17}}+125\cdot {{x}^{16}}+140\cdot {{x}^{15}}+146\cdot {{x}^{14}}+140\cdot {{x}^{13}}+125\cdot {{x}^{12}}+104\cdot {{x}^{11}}\\+80\cdot {{x}^{10}}+56\cdot {{x}^{9}}+35\cdot {{x}^{8}}+20\cdot {{x}^{7}}+10\cdot {{x}^{6}}+4\cdot {{x}^{5}}+1\cdot{{x}^{4}}$$
so the answer is $10$.
This generalises easily to more dice or even those with different numbers of faces
This is a method similar to @GTonyJacobs and @adhg’s answers, but in this answer I use a slightly different way of thinking:
The maximum number possible is a set of six $4$’s $(6, 6, 6, 6)$, which totals $6 * 4 = 24$. To reach $22$, we need to take off $2$ in total from the set.
There are $2$ ways to do this:
– take off $1$ from $2$ numbers out of $4$.
– take off $2$ from $1$ number out of $4$.
Following this, the first method can be done in $4 \choose 2$ ways, while the second can be done in $4 \choose 1$ ways, which is $10$ ways in total.
Therefore, the probability of $4$ dice totalling $22$ is $\frac{10}{6^4}$, which is approximately $0.0077$.
On an intuitive level, simply count how many ways are there to get 22. There are 2 ways to do so:
(A) 6,6,6,4
(B) 6,6,5,5
Each way can have different permutation (example 6,6,6,4, 6,6,4,6 etc) so for the first way (A), you can have 4 ways to arrange the result because: 4!/3!=24/3=4
and for (B) there are 6 ways to arrange the result because 4!/(2!*2!)=6
.
So in total you get 10 ways to get 22. So 10/1296
We have that
$$
\eqalign{
& x_{\,1} + x_{\,2} + x_{\,3} + x_{\,4} = 22\quad \left| {\;1 \le x_{\,k} \le 6} \right.\quad \Rightarrow \cr
& \Rightarrow \quad y_{\,1} + y_{\,2} + y_{\,3} + y_{\,4} = 18\quad \left| {\;0 \le y_{\,k} \le 5} \right. \cr}
$$
and
$$
\eqalign{
& {\rm N}{\rm .}\,{\rm of}\,{\rm solutions}\,{\rm without}\,{\rm upper}\,{\rm restriction} = \cr
& = {\rm N}{\rm .}\,{\rm of}\,{\rm (strong)}\,4{\rm – elements}\,{\rm compositions}\,{\rm of}\,22 = \cr
& = {\rm N}{\rm .}\,{\rm of}\,{\rm (weak)}\,4{\rm – elements}\,{\rm compositions}\,{\rm of}\,18 = \cr
& = \left( \matrix{
22 – 1 \cr
4 – 1 \cr} \right) = 1330 \cr}
$$
Concerning bad compositions, we have that if you write for instance
$$
\eqalign{
& \overline {x_{\,1} } + x_{\,2} + x_{\,3} + x_{\,4} = 22\quad \left| \matrix{
\;7 \le \overline {x_{\,1} } \hfill \cr
\;1 \le x_{\,k} \hfill \cr} \right.\quad \times \;\left( \matrix{
4 \cr
1 \cr} \right)\quad \Rightarrow \cr
& \Rightarrow \quad x_{\,1} + x_{\,2} + x_{\,3} + x_{\,4} = 16\quad \left| {\;1 \le x_{\,k} } \right.\quad \times \;\left( \matrix{
4 \cr
1 \cr} \right) = \cr
& = 4\;\left( \matrix{
16 – 1 \cr
4 – 1 \cr} \right) = 1820 \cr}
$$
you get a number of bad compositions which is higher than the total number, and it is not the number
of compositions with a least one term $\ge 7$. That is clearly due to the fact that , when adding $6$ to $x_1$ that could be already $\ge 7$.
And if you write
$$
\overline {x_{\,1} } + x_{\,2} + x_{\,3} + x_{\,4} = 22\quad \left| \matrix{
\;7 \le \overline {x_{\,1} } \hfill \cr
\;1 \le x_{\,k} \le 6 \hfill \cr} \right.
$$
you are back to the original problem, with one element less and one sum to apply.
So that is not the right approach to this problem.
$\ds{\bbox[#dfd,5px]{\ The\ general\ formula\ }}$
for getting a sum $s$ with $m$ dices each with $r$ faces is given
in this post.
In your particular case, although, Jacob’s answer is the simplest.
Divide the dice into two pairs. The way you can get 22 is by 10 and 12, 11 and 11, and 12 and 10. The ways are 3, 4, and 3, totaling 10. Or you have looked at the dice individually and listed the winning combinations (in lexicographic order to be sure you don’t miss anything).