The Minesweeper Page - Why don't I get 1 second?

The gamefield is 30*24 squares, with 10 mines in them. We want to calculate, how possible a spontaneous opening is:

There are two situations that prevent such an opening:

  • A mine sits near the edge of the field.
  • Two mines are located near the other.

We will not compute other effects here, like more than two mines preventing a full opening.

Mines near the edge:

If there is exactly one square between a mine and the edge, the field will not completely pop open (This is an approximation: If the square also is occupied by a mine, there is no need to open it). The number of squares, with a distance of 2 from the border is 2*(24-2 + 30-2 -2) = 96 squares. The full number of squares in the field is 30*24 = 720 squares. The possibility, that one mine is not located near the border, is (1 - 96/720). The probability, that all 10 mines are not near the border is (1-96/720)^10 (This is another approximation, correct would be: (1-96/720)*(1-96/719)*...*(1-96/711) ).

Computed: Taking in account mines near the border, the possibility of a field popping completely open is only at 0.239 = 23.9 %.

Two mines near each other:

Around a mine, there are 8 positions, where a second mine would prevent a complete opening (just count all bad positions to get the '8').

The probability, that the first mine does not have any of the other 9 mines on one of these squares, is (1-8/720)^9.

The probability, that the second mine does not have any of the remaining 8 mines on one of these squares, is (1-8/711)^8. Note, that there are only 720-8-1 = 711 places to position the second mine.

Going on, you see, that the probability, that the ninth mine does not have the remaining mine on one of these squares, is (1-8/(720-8*9))^1.

Taking all these together:

The probability, that all mines have a good distance, is:

(1-8/720)^9 * (1-8/711)^8 * ... * (1-8/(720-8*9))^1 = 0.594 = 59.4 %

We may approximate, that both effects are independant, and so we get the probability of a complete field opening by just multiplicating both probabilities: 0.239*0.594 = 0.142. We get:

The field will open completely in 14% of all tries. I tried it a few times, numerated the results and got a probability of 10%. Both probabilities are nearly the same (paying attention to the faults in these probabilities), so Minesweeper seems to work correctly.

Back to the Minesweeper Probability Page.

The purpose of these lines is to adjust the look of this page. They are filling the surrounding table, so that the text begins directly right of the backgroundpicture. If you are reading this text, you are either doing strange copy /paste-actions, reading the HTML-Sourcecode or you are using a textbrowser. Whatever is right, you can simply ignore this paragraph.