Originally Posted by

**Plato** **You really need to learn to model the outcome space.**

For part (b) the desired outcomes are rearrangements of the string $\displaystyle 111222XXXX$.

Where each $\displaystyle X$ can be $\displaystyle 3,4,5,\text{ or }6$.

The string can be arranged in $\displaystyle \frac{10!}{(3!)^2(4!)}$ ways.

But each $\displaystyle X$ can be replaced in four ways that gives $\displaystyle \frac{(10!)(4^4)}{(3!)^2(4!)}$.

Now each of those strings has probability $\displaystyle \frac{1}{6^{10}}$.

I don't know if this post will be of value to anyone, but here is another method which is much more complicated than Plato's and gives the same result. I outlined it originally because I was having trouble following Plato's reasoning, even though it seems really easy to follow now.

Consider each possible type of string, by which I mean:

111222XXXX {4}

111222XXXY {1,3}

111222XXYY {2,2}

111222XYZZ {1,1,2}

111222XYZW {1,1,1,1}

where X, Y, Z, and W can be 3, 4, 5, or 6.

This corresponds with the ways 4 can be partitioned as a sum of positive integers. (For partition function P, P(4) = 5.)

Then you count the ways to get each one and multiply by the corresponding ways to arrange the string.

4 ways to get {4} resulting in $\displaystyle \frac{(4)(10!)}{(3!)^2(4!)^1}$.

$\displaystyle \binom{4}{2}\cdot2$ ways to get {1,3} resulting in $\displaystyle \frac{(12)(10!)}{(3!)^3(1!)^1}$.

$\displaystyle \binom{4}{2}$ ways to get {2,2} resulting in $\displaystyle \frac{(6)(10!)}{(3!)^2(2!)^2}$.

$\displaystyle \binom{4}{3}\cdot3$ ways to get {1,1,2} resulting in $\displaystyle \frac{(12)(10!)}{(3!)^2(1!)^2(2!)^1}$.

1 way to get {1,1,1,1} resulting in $\displaystyle \frac{(1)(10!)}{(3!)^2(1!)^4}$.

Which can be summarized as

$\displaystyle P=\left(\frac{10!}{(3!)^2 6^{10}}\right)\left(\frac{4}{(4!)^1}+\frac{12}{(1! )^1(3!)^1} + \frac{6}{(2!)^2} + \frac{12}{(1!)^2(2!)^1} + \frac{1}{(1!)^4}\right)$

We get $\displaystyle P=\frac{350}{19683} \approx 0.01778$.

By the way, I also programmed a Monte Carlo to verify the result. (Because initially there was a discrepancy between the two answers, due to my writing a 12 instead of a 6 in one spot.)

Code:

import java.util.Random;
public class diceRollsProblem() {
Random g = new Random();
public void monteCarlo() {
int successes = 0;
for (int i = 0; i < Integer.MAX_VALUE; i++) {
if (i % 500 == 0)
System.out.println(i + " " + successes/(double)i);
int[] rolls = new int[10];
for (int j = 0; j < 10; j++)
rolls[j] = g.nextInt(6)+1;
int num1s = 0, num2s = 0;
for (int j = 0; j < 10; j++) {
if (rolls[j] == 1) num1s++;
if (rolls[j] == 2) num2s++;
}
if (num1s == 3 && num2s == 3) successes++;
}
}
}

Edit: This program's a bit better.

Code:

import java.util.Random;
public class diceRollsProblem() {
Random g = new Random();
public void monteCarlo() {
int successes = 0;
for (int i = 0; i < Integer.MAX_VALUE; i++) {
if (i % 100000 == 0)
System.out.println(i + " " + successes/(double)i);
int[] distr = new int[6];
for (int j = 0; j < 10; j++)
distr[g.nextInt(6)]++;
if (distr[0] == 3 && distr[1] == 3) successes++;
}
}
}