Calculate the distribution of the Hamming-distances of (q, M, n) algebraic codes.