Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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|improve this question

1 Answer 1

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|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: en.wikipedia.org/wiki/Binomial_coefficient –  Majid Fouladpour May 3 '11 at 22:01

Your Answer

 
discard

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.