BCHCode( n, d , F )
BCHCode( n, b, d, F )
The function BCHCode
returns a Bose-Chaudhuri-Hockenghem code (or BCH
code for short). This is the largest possible cyclic code of length n
over field F, whose generator polynomial has zeros a^b,a^b+1,
..., a^b+d-2, where a is a primitive n^{th} root of unity in
the splitting field GF(q^m), b is an integer > 1 and m is the
multiplicative order of q modulo n. Default value for b is
1. The length n of the code and the size q of the field must be
relatively prime. The generator polynomial is equal to the product of the
minimal polynomials of X^{<b>}, X^{<b>+1}, ..., X^{<b>+<d>-2}.
Special cases are <b>=1 (resulting codes are called narrow-sense BCH codes), and <n>=q^m-1 (known as primitive BCH codes). GUAVA calculates the largest value of d' for which the BCH code with designed distance d' coincides with the BCH code with designed distance d. This distance is called the Bose distance of the code. The true minimum distance of the code is greater than or equal to the Bose distance.
Printed are the designed distance (to be precise, the Bose distance)
delta
, and the starting power b
.
gap> C1 := BCHCode( 15, 3, 5, GF(2) ); a cyclic [15,5,7]5 BCH code, delta=7, b=1 over GF(2) gap> C1.designedDistance; 7 gap> C2 := BCHCode( 23, 2, GF(2) ); a cyclic [23,12,5..7]3 BCH code, delta=5, b=1 over GF(2) gap> C2.designedDistance; 5 gap> MinimumDistance(C2); 7
GAP 3.4.4