Sudoku candidate probability

2.7k Views Asked by At

Supose a Sudoku puzzle row has four empty cells. The candidates for each cells is as follows:

  1. $3, 6, 9$
  2. $7, 9$
  3. $3, 6, 7$
  4. $3, 7$

Looking at the possible cells for $3$ (cells $1$, $3$ and $4$), the probability for $3$ in each cell could be:

a) $\frac13$, $\frac13$, $\frac13$: if we only look at the possible choices for $3$
b) $\frac13$, $\frac13$, $\frac12$: if we figure the total candidates for each cell.

Both the assumptions above are wrong.

What is the probability of each cell being a $3$ in cells $1, 3$ and $4$?

2

There are 2 best solutions below

2
On BEST ANSWER

Whenever you talk about the probability of an event, you have to talk about the sample space (or equivalently, the measure) with respect to which you're taking the probability; otherwise, you run into potential paradoxes such as the Bertrand Paradox. Since you're talking about a Sudoku puzzle, the (IMHO) most natural sample space for determining your probability is the space of correctly filled grids; by this measure, the probability of 3 being in e.g. the first place is just the number of correctly filled grids with 3 in that space divided by the total number of correctly-filled grids.

Unfortunately, because of the constraints involved, I don't believe there's any cleaner way of doing this than 'the hard way': enumerate all of the possibilities and then tally. For convenience, I'll write the assignments in the form abcd, where a is the value in the first cell, b is the value in the second, etc.

  1. if the first cell is a 9, then by elimination (remove 9 from the possibilities for the second cell, then 7 from the third and fourth cells, then 3 from the third) the only arrangement is 9763.
  2. If the first cell is not a 9, then the second cell must be a 9; this leaves us with (36)9(367)(37). Now, if the first cell is a 3 then the arrangement collapses (similarly to the above) into 3967; if the first cell is a 6 then we have one final ambiguity in the last two cells, giving us the configurations 6937 and 6973.

Thus, there are a total of four possible configurations for the puzzle: 9763, 3967, 6937 and 6973. This gives probabilities of $\frac14$, $0$, $\frac14$, and $\frac12$ for 3 being in each of the four cells, respectively.

3
On

I'm going to map your cells as $1 = A, 2 = B, 3 = C$ and $4 = D$ so they won't get confused with the numbers to come.

Cell $B$ can be ignored as $3$ is not a possibility there.

Cell $A$ has $3$ possibilities, one of which is $3$.

Cell $C$ has $3$ possibilities, one of which is $3$.

Cell $D$ has $2$ possibilities, one of which is $3$.

It turns out that the the second approach is on the right track. It just needs to be scaled down to $100%$, or 1 total. $\frac13 + \frac13 + \frac12 = \frac76$. To turn that into a 1 you need to multiply by $\frac67$. This is done to the probability for each cell.

Cell $A = \frac13 \cdot \frac67 = \frac{6}{21} = \frac27 \approx 28.57%$

Cell $C = \frac13 \cdot \frac67 = \frac{6}{21} = \frac27 \approx 28.57%$

Cell $D = \frac12 \cdot \frac67 = \frac{6}{14} = \frac37 \approx 42.86%$

Note that this approach works for cases where several elements can be a particular possibility, but only one of them is permitted to be. Add up the individual probabilities, then multiply each by the reciprocal of the sum.