I am looking for an exact or approximate solution to a statistical lattice-particle problem:

Given a lattice of size $L\times L$ where $\rho\cdot L^2$ particles are randomly distributed, calculate the probability distribution function for $M$ defined as number of pair interactions, i.e. number of edges between adjacent occupied cells. Interactions can be horizontal or vertical, and system has open boundaries (i.e. particle on the edge only has 3 or 2 neighbors to interact with).

My final aim is to design an [$H\_0$](http://en.wikipedia.org/wiki/Null_hypothesis) statistics, given a single realization of the $L\times L$ lattice, and estimate the probability this is a non-random distributed set of particles.