The total number of pairs of records
among n records is:
n(n-1)/2n^2/2n2n2n^2n \log nn!n!/2n(n+1)/2There are n ways to pick the first record in
the pair.
This leaves n-1 ways to pick the second
record.
We consider pair (A, B) to be the same as pair (B, A).