520 THE BELL SYSTEM TECHNICAL JOURNAL, MARCH 1957 



consists of the 7i- words which are ^-neighbors of some (not specified) 

 code word ; let us refer to these 7i-words simply as j-neighbors. Denote by 

 ifj,, the number of ^'-neighbors which are of weight s (with vo.s = j^s , as 

 above). Applying (3) to the n-words of weight s, we see that 



Ps + P1.S + • • • + Pe,s = r\ ^ s ^ n (4) 



is the total number of n-words of weight s. If we multiply (4) by x' and 

 sum on s, we ha^'e 



G(x) + G,(x) + • • • + Ge(x) = (1 + xy (5) 



where 



n 



GA^) = 2 yj.^^' (6) 



s=0 



is the generating function (with respect to s) for the numbers Vj,s . 



We now express Gj(x), ^ j ^ e, in terms of G{x). Suppose code 

 word w is of weight s; that is, w consists of s ones and n — s zeros in 

 some order. A j-neighbor of iv is obtained by choosing J places out of n 

 and changing the letters of w in these places, O's to I's and I's to O's. If, 

 in this procedure, q of the I's of iv are changed to O's, so that j — q of 

 the O's are changed to I's, then the resulting ^-neighbor of iv is of weight 



s — q -{- (j — q). Xow, there are ( 1 ways of choosing q places among 



(11 — s \ 

 . _ 1 



ways of choosing j — q places among the n — s where the letters of ic 



are 0. Thus, of the ( . j different j-neighbors of w, the number ( j 



• _ ) ^^^ ^^ weight s + J — 2q. We may regard each of these as con- 

 tributing l-.r^'^"'"^' to the generating function Gj(x) of (6) (provided 

 ^ j ^ e, so that there is no overlap) ; hence, summing over all j-neigh- 

 bors of a code word and then over all code words, 



Gj(x) =±v.t (')h " ') x^^--'^ Q^j^e* (7) 



s=0 9=0 V?/ V "~ f// 



From the easily verified polynomial identitj' 



j=o Q=o \Q/\J ~ Q 



f] - S)^«+/-27 



* The limits (0, x) on the q summation are merely for convenience; the bi- 

 nomial coefficients vanish outside the proper range, under the usual convention. 



