The total number of different relative distances rij is N(N−1)/2. In a matrix storage format, the relative distances form a strictly upper triangular matrix
r≡(0r1,2r1,3⋯r1,N⋮0r2,3⋯r2,N⋮⋮0⋱⋮⋮⋮⋮⋱rN−1,N000⋯0).This applies to g=g(rij) as well.
In our algorithm we will move one particle at the time, say the kth-particle. This sampling will be seen to be particularly efficient when we are going to compute a Slater determinant.