A method for efficiently computing the number of codewords of fixed weights in linear codes
The problem of computing the number of codewords of weights not exceeding a given integer in linear codes over a finite field is considered. An efficient method for solving this problem is proposed and discussed in detail. It builds and uses a sequence of different generator matrices, as many as possible, so that the identity matrix takes disjoint places in them. The efficiency of the method is achieved by optimizations in three main directions: (1) the number of the generated codewords, (2) the check whether a given codeword is generated more than once, and (3) the operations for generating and computing these codewords. Since the considered problem generalizes the well-known problems Weight Distribution and Minimum Distance, their efficient solutions are considered as applications of the algorithms from the method.
linear code codewords generating weight spectrum algorithm minimum distance algorithm