AmalgatedDirectSumCode( c_1, c_2 [, check ] )
AmalgatedDirectSumCode
returns the amalgated direct sum of the
codes c_1 and c_2.
The amalgated direct sum code consists of all codewords of the form
(u , | ,0 , | , v)
if
(u , | , 0) in c_1
and
(0 , | , v) in c_2
and all codewords of the form
(u , | , 1 , | , v)
if
(u , | , 1) in c_1
and
(1 , | , v) in c_2.
The result is a code with length
n = n_1 + n_2 - 1
and size
M <= M_1 cdot M_2 / 2 .
If both codes are linear, they will first be standardized, with information symbols in the last and first coordinates of the first and second code, respectively.
If c_1 is a normal code with the last coordinate acceptable, and c_2 is a normal code with the first coordinate acceptable, then the covering radius of the new code is r <= r_1 + r_2 . However, checking whether a code is normal or not is a lot of work, and almost all codes seem to be normal. Therefore, an option check can be supplied. If check is true, then the codes will be checked for normality. If check is false or omitted, then the codes will not be checked. In this case it is assumed that they are normal. Acceptability of the last and first coordinate of the first and second code, respectively, is in the last case also assumed to be done by the user.
gap> c := HammingCode( 3, GF(2) ); a linear [7,4,3]1 Hamming (3,2) code over GF(2) gap> d := ReedMullerCode( 1, 4 ); a linear [16,5,8]6 Reed-Muller (1,4) code over GF(2) gap> e := DirectSumCode( c, d ); a linear [23,9,3]7 direct sum code gap> f := AmalgatedDirectSumCode( c, d );; gap> MinimumDistance( f );; gap> CoveringRadius( f );; # takes some time gap> f; a linear [22,8,3]7 amalgated direct sum code
GAP 3.4.4