Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a minefield with $c \times r$ cells. There are $n$ mines randomly placed in cells (no cell has more than one mine, just none, or one), and $n \lt c \times r$. How do I calculate the risk of exploding at least one mine by probing $m$ distinct cells? Probing does not stop if a mine explodes.

share|cite|improve this question
up vote 4 down vote accepted

The number of ways to select $m$ cells from the minefield is the binomial coefficient ${c r} \choose m$. The number of ways to select $m$ of the $c r - n$ non-mined cells is ${c r - n} \choose m$. So if the selection is random, the probability of not finding a mine is ${{c r - n} \choose m}/{{c r} \choose m}$.
The probability of finding at least one mine is $1 - $ that.

share|cite|improve this answer
Thanks! From the upvotes I can say your answer is correct, but I have no clue what ${{c r - n} \choose m}/{{c r} \choose m}$ stands for ... is there a way to use simple math functions (+,-,*,/,^) to state the formula? – Majid Fouladpour May 3 '11 at 21:47
Ah, this is the key now: – Majid Fouladpour May 3 '11 at 22:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.