21

Let's say you have a $30$ by $16$ grid and $99$ mines. What is the probability of having at least one empty block surrounded by exactly $7$ mines?

example

For the sake of this question, assume that the mines are generated randomly.

Harsh Kumar
  • 2,846
Paul
  • 1,125

1 Answers1

12

The average number of $7's$, which is slightly different.

There are $14\times28 =392$ places to put a $7$.
There are eight places to put the non-mine.
There are $9$ squares involved with the $7$, so $480-9=471$ other squares.
These other squares contain the $92$ other mines. So the number of grids with a $7$ at a particular spot is $$8\times {471\choose 92}.$$ That is out of a total of $(480$ choose $99)$ different grids.
The chance of a $7$ in any one of those is $$\frac{{8\choose1}{480-9\choose 92}}{480\choose99}\approx 0.00006928$$ so the average number of $7$s is $392$ times that, or approximately $$0.02716$$ The average number of $8s$ would be $$\frac{392{471\choose91}}{480\choose99}\approx 0.0008219$$

Harsh Kumar
  • 2,846
Empy2
  • 50,853
  • 5
    By applying Markov's Inequality, this shows that the probability of getting a $7$ on a randomly generated board is less than or equal to $0.02716\ldots$. – JimmyK4542 Jun 11 '16 at 22:26
  • @JimmyK4542 The interesting question becomes is having one 7 highly correlated, or highly anti-correlated, with more 7s. If we presume they are uncorrelated, then 2.7% is going to be really close to the chance of getting a 7, as the second order effect will be fractions of a percent. – Yakk Jun 11 '16 at 22:38
  • Most 7s will be uncorrelated, because their 9 squares won't overlap. So I think the approximation provided by @JimmyK4542 is extremely close to the correct answer. – Stephen Montgomery-Smith Jun 11 '16 at 23:18