# Chance of 2 overlapping matrices

1. Apr 9, 2008

### Theraven1982

[SOLVED] chance of 2 overlapping matrices

I have a simple problem, but I'm not sure if my answer is correct :P.
I have a matrix, like this:

0 0 0 0 1
0 1 0 0 0
0 0 0 0 0
0 0 0 1 0
0 0 0 0 0

i.e. an axb matrix, with c 'ones'. If I now take another matrix, with the same size, what's the probability that d 'ones' are on the same spot?
I thought like this:
the chance that 1 'one' is on the same spot is 1/(ab)
the chance that the 2nd 'one' is on the same spot is 1/(ab-1), etc.
the order is not important, so if the 2nd matrix also has c ones, we add a factor of c!

So the chance that a 2nd matrix has d 'ones' (d<c) on the same spot as the first matrix is
$$\frac{c!}{d!(c-d)!}\prod_{i=0}^{c-1}\frac{1}{ab-i}$$

But i'm not feeling completely comfortable with this. Say matrix 1 has 4 ones. Matrix 2 may have 6 ones, but a maximum of 4 on the same place. (in reality, approximately 99% of the matrix are zeros). Is this still a correct way then?