UpperBoundPlotkin( n, d, q )
The function UpperBoundPlotkin
calculates the sum of the distances of
all ordered pairs of different codewords. It is based on the fact that
the minimum distance is at most equal to the average distance. It is a
good bound if the weights of the codewords do not differ much. It results
in: M leq d over d-(1-1/q)n M is the maximum number
of codewords. In this case, d must be larger than (1-1/<q>)<n>, but
by shortening the code, the case <d> < (1-1/<q>)<n> is covered.
gap> UpperBoundPlotkin( 15, 7, 2 ); 32 gap> C := BCHCode( 15, 7, GF(2) ); a cyclic [15,5,7]5 BCH code, delta=7, b=1 over GF(2) gap> Size(C); 32 gap> WeightDistribution(C); [ 1, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 1 ]
GAP 3.4.4