A combinatorial method for calculating the weight polynomial of MDS codes
MDS code is a good code and satisfy the Singleton bound.Nowadays,MDS code has been widely used in practice due to its excellent decoding ability.The weight polynomial of MDS code is completely deter-mined by its parameters[n,k,d].In this paper,by using the inclusion-exclusion principle,we calculate the number of code words with fixed Hamming weights in MDS code and gives a new proof of MDS code weight polynomial.Let d≤w≤n and choose d positions from n positions to form set S.We prove that the number of code words in the MDS code with support set S and element 1 at the first position of S is ∑w-dj=0(-1)j(w-1j)qw-d-j.The key of proof is to apply the inclusion-exclusion principle for the set of code words with support set contained in S and element 1 at the first position of S,and to use the linear independence of any d-1 columns in the MDS code parity check matrix.The proof intuitively reveals the combinatorial meaning of the coefficients in MDS code weight polynomial.In contrast to the proof in textbook,our proof does not use the MacWilliams identity.