Counting the numbers of codewords of a given weight distribution

110 Views Asked by At

I would like to find a closed form for the number of codewords of a given weight distribution, and with 'r' coordinate positions fixed to a specific letter in the alphabet (not zero). If I didn't add the restriction of having r of the coordinate positions fixed, I could use the generalized partition weight enumerator given below.

$E(w) = (q-1){n\choose w}\sum_{j=0}^{w-d}(-1)^j{w-1\choose j}q^{w-d-j}$

Where q is the alphabet size, d is the minimum hamming distance, n is the length of the code and w is the minimum weight. I am interested in codes that have $d=n - k +1$, where k is the dimension of the code. But, since I also want to fix the first r coordinates (each non-zero), the count will be less than that returned by the partition weight enumerator. This basically amounts to arranging n-r letters such that d-r are non-zero, and each rearrangement is dissimilar to all of the other arrangements in at least d positions. Obviously, the only catch to this is the dissimilarity in at least d coordinates, otherwise it is utterly trivial. Any hints as to how to start this would be greatly appreciated.