How to calculate the % chance of rolling X on 3d6 allowing for a single re-roll of 1 on one die

I'm struggling to work out the % chance of rolling any of the possible values on 3d6 ie 3 to 18 while allowing for a single re-roll on one die roll of 1.

The formula I'm using is: (number of 3d6 combinations x 1/216) + (number of 4d6 combinations $\times$ 1/1,296)

Using a 3d6 result of 6 as an example:

There is only one possible combination to get 6 on 3d6 without rolling any 1s, and that is $(2,2,2)$. This means you have one 1/216 chance of rolling 6 on 3d6 without a re-roll.

There are 9 remaining combinations that can make 6 on 3d6 but they all have at least one 1 in them which triggers a single re-roll: $$(4,1,1) \ (3,2,1) \ (3,1,2) \ (2,3,1) \ (2,1,3) \ (1,4,1) \ (1,3,2) \ (1,2,3) \ (1,1,4)$$

Each of these 9 combinations can have any one of the three dice coming up as a 1 and being re-rolled to the required number to total 6. For example, $(4,1,1)$ could be achieved by rolling: $(4,1,1[1]) \ (4,1[1],1) \ (1[4],1,1)$

This means there are three 4d6 combinations of the nine original 3d6 combinations making 27 4d6 combinations to make 6.

BUT, you can also get $(2,2,2)$ on 4d6 as a result of a re-roll (in brackets) triggered by rolling one 1. $ (2,2,1[2]) \ (2,1[2],2) \ (1[2],2,2) $

When I add it all together: (1 $\times$ 1/216) + (30 $\times$ 1/1,296) = 2.78%

When apply this method to all values 3 to 18 I end up with 111.42%. Obviously I'm adding some values I'm not supposed to but I can't figure out where I'm going wrong.


You are over counting when you double count different 1's as separate re-rolls. I think it is easier to see, if we split up into 2 cases, like you have done:

Let $(x_1,x_2,x_3,x_4)$ be 4 ordered dice roll from a d6. The 2 different cases relate to whether we rolled a 1 in the first 3 rolls or not.

\begin{align*}&(1): \ \ \text{if } \min(x_1,x_2,x_3)>1 : \sum_{i=1,2,3} x_i = X \\ &(2): \ \ \text{if } \min(x_1,x_2,x_3) = 1: \sum_{i=1,2,3,4} x_i = X +1 \end{align*}

To show how it works for $X=6$ you already found there is only 1 way to roll 6 in 3 rolls without any 1's: $(2,2,2)$ with probability $1/6^3$

There is 19 ways to roll $X = 6 +1 $ with 4 dice and at least one 1 in the first 3 rolls: $$(4,1,1,1)\ (1,4,1,1) \ (1,1,4,1) \ (1,1,1,4) \\[1em] (3,2,1,1) \ (3,1,2,1) \ (3,1,1,2) \ (2,3,1,1) \\ (2,1,3,1) \ (2,1,1,3) \ (1,3,2,1) \ (1,3,1,2) \\ (1,2,3,1) \ (1,2,1,3) \ (1,1,3,2) \ (1,1,2,3) \\[1em] (1,2,2,2) \ (2,1,2,2) \ (2,2,1,2)$$

with a total of $19/6^4$ and since the 2 cases are mutually exclusive events we can add the probabilities to find the probability of rolling a total of 6 if we re-roll a 1 is $1/6^3 + 19/6^4\approx 0.01929$

Obviously, the combinatorics in the 2. case is a bit hard to generalise. We saw there is 4 ways to end up with $\{4,1,1\}$ , 12 ways to end up with $\{3,2,1\}$ and 3 ways to end up with $\{2,2,2\}$ if we don't count the 6 ways in 4d6 when the last die can be everything. The combinatorics does get easier for larger values of $X$, since there are less 1' to deal with, and for $X= 14,15,16,17,18$ the probabilities are the same as for simple 3d6.


For the sake of completeness, the full probability table for the total $T$ is:

$$\begin{array}{c|cc} t & \text{Freq.} & \Pr[T = t] \\ \hline 3 & 1 & \frac{1}{1296} \\ 4 & 4 & \frac{1}{324} \\ 5 & 10 & \frac{5}{648} \\ 6 & 25 & \frac{25}{1296} \\ 7 & 49 & \frac{49}{1296} \\ 8 & 82 & \frac{41}{648} \\ 9 & 120 & \frac{5}{54} \\ 10 & 159 & \frac{53}{432} \\ 11 & 180 & \frac{5}{36} \\ 12 & 183 & \frac{61}{432} \\ 13 & 168 & \frac{7}{54} \\ 14 & 135 & \frac{5}{48} \\ 15 & 90 & \frac{5}{72} \\ 16 & 54 & \frac{1}{24} \\ 17 & 27 & \frac{1}{48} \\ 18 & 9 & \frac{1}{144} \\ \end{array}$$

This assumes that a reroll of a die showing a one is required whenever there is at least $1$ one.