(N)(log(N))(X*(1/T) + 1*((T-1)/T)) where X = (M-N+2)/2, T = (N choose 2)