| products/Sources/formale Sprachen/GAP/pkg/guava/doc/chap6_mj.html |
 |
<?xml,62,
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html xmlns= "http://www.w3.org/1999/xhtml" xml:lang= "en">
< head>
< script type= "text/javascript"
src= "https://cdn.jsdelivr.net/npm/mathjax@2/ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 17, 20, 21, 31, 38, 39 43,47
</ script>
< title>GAP (guava) - Chapter 6: Manipulating Codes</ title>
< meta http-equiv= "content-type" content= "text/html; charset=UTF-8" />
< meta name= "generator" content= "GAPDoc2HTML" />
< link rel= "stylesheet" type= "text/css" href= "manual.css" />
< script src= "manual.js" type= "text/javascript"></ script>
< script type= "text/javascript">overwriteStyle();</ script>
</ head>
< body class= "chap6" onload= "jscontent()">
< div class= "chlinktop">< span class= "chlink1">Goto Chapter: </ span>< a href= "chap0_mj.html">Top< /a> <a href="chap1_mj.html">1</a> <a href="chap2_mj.html">2</a> <a href="chap3_mj.html">3</a> <a href="chap4_mj.html">4</a> <a href="chap5_mj.html">5</a> <a href="chap6_mj.html">6</a> <a href="chap7_mj.html">7</a> <a href="chap8_mj.html">8</a> <a href=" 52 57, 58 59 60,62 ]
<div class="chlinkprevnexttop"> <a href="chap0_mj.html">[Top of Book]</a>&java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 31
<p id="mathjaxlink" class="pcenter"><a href="chap6.html">[MathJax off]</a></p>
<><a id=X866FC1117814B64D"name"X866FC1117814B64D"/a>/
<div class="ChapSects"><a href="chap6_mj.html#X866FC1117814B64D">6 <span class="Heading">Manipulating Codes</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap6_mj.html#X8271A4697FDA97B2">6.1 <span class="Heading">
Functions that Generate a New Code from a Given Code
</span></a>
</span>
<div class="43, 46, 48, 53, 58 61,63 ]
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X794679BE7F9EB5C1">6.1-1 ExtendedCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7E6E4DDA79574FDB">6.1-2 PuncturedCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X87691AB67FF5621B">6.1-3 EvenWeightSubcode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X79577EB27BE8524B">6.1-4 PermutedCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X87E5849784BC60D2">6.1-5 ExpurgatedCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X8134BE2B8478BE8A">6.1-6 AugmentedCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7B0A6E1F82686B43">6.1-7 RemovedElementsCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X784E1255874FCA8A">6.1-8 AddedElementsCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X81CBEAFF7B9DE6EF">6.1-9 ShortenedCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7A5D5419846FC867">6.1-10 LengthenedCode</a></span>
<span [1,2 ,45 ,,8 9,10,15 ,21 22 , 29 30, 32, 36, 37, 39,
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X809376187C1525AA">6.1-12 ResidueCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7E92DC9581F96594">6.1-13 ConstructionBCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X799B12F085ACB609">6.1-14 DualCode41 , ,58596063]
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X81FE1F387DFCCB22">6.1-15 ConversionFieldCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X82D18907800FE3D9">6.1-16 TraceCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 77
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X873EA5EE85699832">6.1-18 ConstantWeightSubcode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7AA203A380BC4C79">6.1-19 StandardFormCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7EF49A257D6DB53B">6.1-20 PiecewiseConstantCode</java.lang.StringIndexOutOfBoundsException: Index 139 out of bounds for length 31
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap6_mj.html#X7964BF0081CC8352">6.2 <span class="Heading">
Functions that Generate a New Code from Two or More Given Codes
</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X79E00D3A8367D65A">6.2-1 DirectSumCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X86E9D6DE7F1A07E6">6.2-2 UUVCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7BFBBA5784C293C1">6.2-3 DirectProductCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X78F0B1BC81FB109C">6.2-4 IntersectionCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X8228A1F57A29B8F4">6.2-5 UnionCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7A85F8AF8154D387">6.2-6 ExtendedDirectSumCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7E17107686A845DB">6.2-7 AmalgamatedDirectSumCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7D8981AF7DFE9814">6.2-8 BlockwiseDirectSumCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7C37D467791CE99B">6.2-9 ConstructionXCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X7B50943B8014134F">6.2-10 ConstructionXXCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X790C614985BFAE16">6.2-11 BZCode</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap6_mj.html#X820327D6854A50B5">6.2-12 BZCodeNC</a>< 47, ,57 ,,6264,
</div></div>
</div>
<h3>6 <span class="Heading">Manipulating Codes</span></h3>
<p>In this chapter we describe several functions <strong class="pkg">GUAVA</strong> uses to manipulate codes. Some of the best codes are obtained by java.lang.StringIndexOutOfBoundsException: Index 156 out of bounds for length 77
<p>In some cases, it is faster to perform calculations with a manipulated code than to use the original code. For example, if the dimension of the code is larger than half the word length, it is generally faster to compute the weight distribution by first calculating the weight distribution of the dual code than by directly calculating the weight, ,48 ,50, ,62,
<p>Because <strong class="pkg">GUAVA</strong> keeps all information in a code record, in some cases the information can be preserved after manipulations. Therefore, computations do not always have to start from scratch.</p>
<p>In Section <a href="chap6_mj.html#X8271A4697FDA97B2"><span class="RefLink">6.1</span></a>, we describe functions that take a code with certain parameters, modify it in some way and return a different code (see <code class="func">ExtendedCode</code> (<a href="chap6_mj.html ,, 51 , ,5764 ,
<p><a id="X8271A4697FDA97B2" name="X8271A4697FDA97B2"></a></p>
<h4>6.1 <span class="[ 1, 2, 3, 4, 5, 6, 7, 8, 9,10 15,18 , , 24, , 35 37,38, 40, 42,
Functions that Generate a New Code from a Given Code
</span></h4>
<p><a id="X794679BE7F9EB5C1" name="X794679BE7F9EB5C1"></a></p>
<h5>6.1-1 ExtendedCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ExtendedCode</code>( <var class="Arg">C</var>[, <var class="Arg">i</var>] )</td><td class="tdright">( function&,46 ,51,53 ,64,
<p><code class="code">ExtendedCode</code> extends the code <var class="Arg">C</var> <var class="Arg">i</var> times and returns the result. <var class="Arg">i</var> is equal to <span class="SimpleMath">\(1\)</span> by default. Extending is[ 1, 2,3,4 5, 6 7,8,9, 10 15,18 , , ,35 37 3839,, 44,
<p>The word length increases by <var class="Arg">i</var>. The size of the code remains the same. In the binary case, the minimum distance increases by one if it was odd. In other cases, that is not always true.</p>
<p>A cyclic code in general is no longer cyclic after extending.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := HammingCode( 3, GF(2) );</span>
a linear [7,4,3]1 Hamming (3,2) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := ExtendedCode( C1 );</span>
a linear [8,4,4]2 extended code
<span class="GAPprompt">gap></span> <span class="GAPinput">IsEquivalent( C2, ReedMullerCode( 1, 3 ) );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">List( AsSSortedList( C2 ), WeightCodeword );</span>
[ 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">C3 := EvenWeightSubcode( C1 );</span>
a linear [7,3,4]2..3 even weight subcode
</pre></div>
<p>To undo extending, call <code class="code">PuncturedCode</code> (see <code class="func">PuncturedCode</code> (<a href="chap6_mj.[1, 2 ,4,5 ,7 ,9 ,15 ,19,26 ,35 , ,39 ,44
<p><a id="X7E6E4DDA79574FDB" name="X7E6E4DDA79574FDB"></a></p>
<h5>6.1-2 PuncturedCode</h5>
<div class="func"><table class="func" width[1 ,3 4 ,6,7 ,9 ,18,20 22 23 24 26 32 45 47 49
<p><code class="code">PuncturedCode</code> punctures <var class="Arg">C</var> in the last column, and returns the result. Puncturing is done simply by cutting off the last column from each codeword. This means the word50 51, 52, 54 58
<p>This command can also be called[ 1,2,3 ,5, 6, 7, 8,9 10,,18,20 22,java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<Puncturing acyclic in general results in the codeispuncturedin the columnswhere of weight unequalto dimension oftheresulting code decreases.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := BCHCode( 15, 5, GF(2) );</span>
a cyclic [15,7,5]3..5 BCH code, delta=5, b=1 over GF(2)
<span class="GAPprompt">gap>,15 18 ,22,,27,29,32 ,46 ,
a linear [14,7,4]3..5 punctured code
<span class="GAPprompt">gap></span> <span class="GAPinput">ExtendedCode( C2 ) = C1;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Range [0, 75) out of bounds for length 31
a linear [8,7,1]1 punctured code
<span [ 1, 2, 3, 4 5, 6,7 ,9 10 ,18,20,22 23 ,32,43,45 46 47
a linear [3,3,1]0 punctured code
</pre></div>
<p><code class="code">ExtendedCode</code> extends the code again (see <code class="func">ExtendedCode</code> (<a href="chap6_mj.html#X794679BE7F9EB5C1"><span class="RefLink">6.1-1</span></a>)), although in general this does not result in the old code.</p>
<p><a id="X87691AB67FF5621B" name="X87691AB67FF5621B"></a></p 48,49,52,,59,62,63 ],
<h5>6.1-3 EvenWeightSubcode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; EvenWeightSubcode</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">EvenWeightSubcode</code> returns the even weight subcode of <var class="Arg">C</var>, consisting of all codewords of <var class="Arg">C</var> with even weight. If <var class="Arg">C</var> is a linear code and contains words of odd weight, the resulting code has a dimension of one less. The minimum distance always increases with one if it was odd. If <var class="Arg">C</var> is a binary cyclic code, and <span class="SimpleMath">\(g(x)\)</span> is its generator polynomial, the even weight subcode either has generator polynomial <span class="SimpleMath">\(g(x)\)</span> (if <span class="SimpleMath">\(g(x)\)</span> is divisible by <span class="SimpleMath">\(x-1\)</span>) or <span class="SimpleMath">\(g(x)\cdot (x-1)\)</span> (if no factor <span class="SimpleMath">\(x-1\)</span> was present in <span class="SimpleMath">\(g(x)\)</span>). So the even weight subcode is again cyclic.</p>
<p>Of course, if all codewords of <var class="Arg">C</var> are already of even weight, the returned code is equal to <var class="Arg">C</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := EvenWeightSubcode( BCHCode( 8, 4, GF(3) ) );</span>
an (8,33,4..8)3..8 even weight subcode
<span class="GAPprompt">gap></span> <span class="GAPinput">List( AsSSortedList( C1 ), WeightCodeword );</span>
[ 0, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 6, 4, 4, 6, 4, 4, 8, 6, 4, 6, 8, 4, 4,
4, 6, 4, 6, 8, 4, 6, 8 ]
<span class="GAPprompt< 1, ,3 4, 5 ,7 8 9 10 15 18 ,22 24 26 , ,43 44 45
a linear [8,4,4]2 Reed-Muller (1,3) code over GF(2)
</pre></div>
<p><code class="code">ExtendedCode</code> also returns a related code of only even weights, but without reducing its dimension (see <code class="func">ExtendedCode</code> (<a href="chap6_mj.html#X794679BE7F9EB5C1"><span class="RefLink">6.1-1</span></a>)).</p>
<p><a id="X79577EB27BE8524B" name="X79577EB27BE8524B"></a></p>
<h5>6.1-4 1, 2, 3, 4, 5, 62,3 ,5 ,7,8 9 ,15 18 , 23 ,26,29,30 ,42,43
<div java.lang.StringIndexOutOfBoundsException: Range [31, 12) out of bounds for length 31
<p><code class="code">PermutedCode</code> returns <var class="Arg">C</var> after column permutations. <var class="Arg">L</var> (in GAP disjoint cycle notation) is the permutation to be executed on the columns of <var class="Arg">C</var>. If <var class="Arg">C</var> is cyclic, the result in general is no longer cyclic. If a permutation results in the same code as <var class="Arg">C</var>, this permutation belongs to the automorphism group of <var class="Arg">C</var> java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := PuncturedCode( ReedMullerCode( 1, 4 ) );</span>
a linear [15,5,7]5 punctured code
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := BCHCode( 15, 7, GF(2) );</span>
a cyclic [15,5,7]5 BCH code, delta=7, b=1 over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 = C1;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">p := CodeIsomorphism( C1, C2 );</span>
( 2, 4,14, 9,13, 45,47,49 59,62 63 64]
<span class="GAPprompt">gap></span> <span class="GAPinput">C3 := PermutedCode( C1, p );</span>
a linear [15,5,7]5 permuted code
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 = C3;</span>
true
</pre></div>
<p><a id="X87E5849784BC60D2" name="X87E5849784BC60D2"></a></p>
<h5>6.1-5 ExpurgatedCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ExpurgatedCode</code>( <var class="Arg">C</var>, <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">ExpurgatedCode</code> expurgates the code <var class="Arg">C</var>&[le='color: green'>1 ,3 ,5 6 ,8,9,10, 15, 19, 20, 22, 23, 27, 29, 32, 33, 44, 46,
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := HammingCode( 4 );; WeightDistribution( C1 );</span>
[ 1, 0, 0, 35, 105, 168, 280, 435, 435, 280, 168, 105, 35, 0, 0, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">L := Filtered( AsSSortedList(C1), i -> WeightCodeword(i) = 3 );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := ExpurgatedCode( C1, L );</span>
a linear [15,4,3..4][1,2,,,5, ,7,8,9, ,15,19,20 22 23,,29 32,43,44, 46
<span class="GAPprompt">gap></span> <span class="GAPinput">WeightDistribution( C2 );</span>
[ 1, 0, 0, 0, 14, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
<pre></div
<p>This function does not work on non-linear codes. For removing words from a non-linear code, use <code class="code">RemovedElementsCode</code> (see <code class="func">RemovedElementsCode</code> (<a href="chap6_mj.html#X7B0A6E1F82686B43"><span class="RefLink">6.1-7</span></a>)). For expurgating a code of all words of odd weight, use `EvenWeightSubcode' (see <code class="func">EvenWeightSubcode</code> (<a href="chap6_mj.html#X87691AB67FF5621B"><span class="RefLink">6.1-3</span></a>)).</p>
<p><a id="X8134BE2B8478BE8A" name="X8134BE2B8478BE8A"></a></p>
<h5>6.1-6 AugmentedCode</h5>
<iv class=func"< class="func"width100"<tr>td =tdleft>codeclass=func>8227;</(var ""C<var>,var ""L<var </td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">AugmentedCode</code> returns <var class="Arg">C</var> after augmenting. <var class="Arg">C</var> must be a linear code, <var class="Arg">L</var> must be a list of codeword inputs. The generator matrix of the new code is a basis for the codewords specified by <var class="Arg">L</var> as well as the words that were already in code <var class="Arg">C</var>. Note that the new code in general will consist of more words than only the codewords of <var class="Arg">C</var> and the words <var class="Arg">L</var>. The returned code is also a linear code.</p>
<p>This command can also be called with the syntax <code class="code">AugmentedCode(C)</code>. When called without a list of codewords, <code class="code">AugmentedCode</code> returns <var class="Arg">C</var> after adding the all-ones vector to the generator matrix. <var class="Arg">C</var> must be a linear code. If the all-ones vector was already in the code, nothing happens and a copy of the argument is java.lang.StringIndexOutOfBoundsException: Index 414 out of bounds for length 77
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C31 := ReedMullerCode( 1, 3 );</span>
a linear [8,4,4]2 Reed-Muller (1,3) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">C32 := AugmentedCode(C31,["00000011","00000101","00010001"]);</span>
a linear [8,7,1..2]1 code, augmented with 3 word(s)
<span class="GAPprompt">gap></span> <span class="GAPinput">C32 = ReedMullerCode( 2, 3 );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := CordaroWagnerCode(6);</span>
a linear [6,244 48 , 52,53, 57 62]
<span class="GAPprompt">gap></span> <span class="GAPinput">Codeword( [0,0,1,1,1,1] ) in C1;</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := AugmentedCode( C1 );</span>
linear[,,.22. code, augmented with 1 word(s)
<span class="GAPprompt">gap></span> <span class="GAPinput">Codeword( [1,1,0,0,0,0] ) in C2;</span>
true
</pre></div>
<p>The function <code class="code">AddedElementsCode</code> adds elements to the codewords instead of ,57,59 ,62 64 ,
<p><a id="X7B0A6E1F82686B43" name="X7B0A6E1F82686B43"></a></p>
<h5>6.1-7 RemovedElementsCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; RemovedElementsCode</code>( <var class="Arg">C</var>, <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></java.lang.StringIndexOutOfBoundsException: Range [0, 245) out of bounds for length 77
<p><code class="code">RemovedElementsCode</code> returns code <var class="Arg">C</var> after removing a list of codewords <var class="Arg">L</var> from its elements. <var class="Arg">L</var> must be a list of codeword input. The result is an unrestricted code.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := HammingCode( 4 );; WeightDistribution( C1 );</span>
[ 1, 0, 0, 35, 105, 168, 280, 435, 435, 280, 168, 105, 35, 0, 0, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">L := Filtered< 48,49,51 53 ,60,62]
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := RemovedElementsCode( C1, L );</span>
a (15,2013,3..15)2..15 code with 35 word(s) removed
<span class="GAPprompt">gap></span> <span class="GAPinput">WeightDistribution( C2 );</span>
[ 1, 0, 0, 0, 105, 168, 280, 435, 435, 280, 168, 105, 35, 0, 0, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimumDistance( C2 ); # C2 is not linear, so the minimum weight does not have to be equal to the minimum distance </span>
3
</pre></div>
<p>Adding elements to a code is done by the function <code class="code">AddedElementsCode</code> (see <code class="func">AddedElementsCode</code> (<a href="chap6_mj.html#X784E1255874FCA8A">< 46 47,53,55,56,61,62 ,
<p><a id="X784E1255874FCA8A" name="X784E1255874FCA8A"></a></p>
<h5>6.1-8 AddedElementsCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; AddedElementsCode</code>( <var class="Arg">C</var>, <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">AddedElementsCode</code> returns code <var class="Arg">C</var> after adding a list of codewords <var class="Arg">L</var> to its elements. <var class="Arg">L</var> must be a list of codeword input. The result is an unrestricted code.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := NullCode( 6, GF(2) );</span>
a cyclic [6,0,6]6 nullcode over GF(2)
<pan class=GAPprompt"gap&t</> span class="GAPinput">C2 := AddedElementsCode( C1, [ "111111" ] );</span>
a (6,2,1..6)3 code with 1 word(s) added
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCyclicCode( C2 );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">C3 := AddedElementsCode( C2, [ "101010", "010101" ] );</span>
a (6,4,1..6)2 code with 2 word(s) added
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCyclicCode( C3 );</span>
true
</pre></div>
<p>To remove elements from a code, use <code class="code">RemovedElementsCode</code> (see <code class="func">RemovedElementsCode</code> (<a href="chap6_mj.html#X7B0A6E1F82686B43"><span class="RefLink">6.1-7</span></a>)). To add elements to the base of a linear code, use <code class="code">AugmentedCode</code> (see <code class="func">AugmentedCode</code> (<a href="chap6_mj.html#X8134BE2B8478BE8A"><span class="RefLink">6.1-6</span></a>)).</p>
<p><a id="X81CBEAFF7B9DE6EF" name="X81CBEAFF7B9DE6EF"></a></p>
<h5>6.1-9 ShortenedCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ShortenedCode</code>( <var class="java.lang.StringIndexOutOfBoundsException: Range [0, 138) out of bounds for length 31
<p><code class="code">ShortenedCode( C )</code> returns the code <var class="Arg">C</var> shortened 1 2,,4 5,6,7 8 ,10,16, ,18,23,28,29,38 40,41 43 ,
<p>If <var class="Arg">C</var> is a non-linear code, <code class="code">ShortenedCode</code> first checks which finite field element occurs most often in the first column of the codewords. The codewords not starting java.lang.StringIndexOutOfBoundsException: Range [0, 220) out of bounds for length 31
<p>This command can also be called using the syntax <code class="code">ShortenedCode(C,L)</code[,2,3 4,,,7 ,9,10,16,17,19,20 ,,38, 41,
< classexample"<>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := HammingCode( 4 );</span>
a linear [15,11,3]1 Hamming (4,2) code over GF(2)
<span class="GAPprompt">gap></span42, 44, 48, 54, 58,63 64 ,
a linear [14,10,3]2 shortened code
<span class="GAPprompt">gap></span> <span class="GAPinput">C3 := ElementsCode( ["1000", "1101", "0011" ], GF(2) );</span>
(,3,.4)2user defined overGF(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimumDistance( C3 );</span>
2
<apg</><pan class="APinput"C4 :=ShortenedCode( C3 );</span>
a (3,2,2..3)1..2 shortened code
<span class="GAPprompt">gap></span> <span class="GAPinput">AsSSortedList( C4 );</span>
[ [ 0 0 0 ], [ 1 0 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">C5 := HammingCode( 5, GF(2) );</span>
a linear [31,26,3]1 Hamming (5,2) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">C6 := ShortenedCode( C5, [ 1, 2, 3 ] );</span>
a linear [28,23,3],1 2,3,4, 5 6 ,8 ,10,16,,19,23 ,30 ,34 ,37,38,
<span class="GAPprompt">gap></span> <span class="GAPinput">OptimalityLinearCode( C6 );</span>
0
</pre></div>
<p>The function <code class41 , 51,54,56 62, ]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
<p><a id="X7A5D5419846FC867" name="X7A5D5419846FC867"></a></p>
<56.-0 </h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; LengthenedCode</code>( <var class="Arg">C</var>[, <var class="Arg">i</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">LengthenedCode( C )</code> returns the code <var class="Arg">C</var> lengthened. <var class="Arg">C</var> must be a linear code. First, the all-ones vector is added to the generator matrix (see <code class="func">AugmentedCode</code> (<a href="chap6_mj.html#X8134BE2B8478BE8A"><span class="RefLink">6.1-6</span></a>)). If the all-ones vector was already a codeword, nothing happens to the code. Then, the code is extended <var class="Arg">i</var> times (see <code class="func">ExtendedCode</code> (<a href="chap6_mj.html#java.lang.StringIndexOutOfBoundsException: Range [0, 560) out of bounds for length 31
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := CordaroWagnerCode( 5 );</span>
alinear [5,2,3]2 Cordaro-Wagner code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := LengthenedCode( C1 );</span>
a linear [6,3,2]2..3 code, lengthened with 1 column(s)
</pre></div>
<p><code class="code">ShortenedCode</code>' shortens the code, see <code class="func">ShortenedCode</code> (<a href="chap6_mj.html#X81CBEAFF7B9DE6EF"><span class="RefLink">6.1-9</span></a>). In general, this is not exactly the inverse function.</p>
<p><a id="X7982D699803ECD0F" name="X7982D699803ECD0F"></a></p>
<h5>6.1-11 SubCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; SubCode</code>( <var class="Arg">C</var>[, <var class="Arg">s</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function <code class="code">SubCode</code> returns a subcode of <var class="Arg">C</var> by taking the first <span class="SimpleMath">\(k - s\)</span> rows of the generator matrix of <var class="Arg">C</var>, where <span class="SimpleMath">\(k\)</span> is the dimension of <var class="Arg">C</var>. The integer <var class="Arg">s</var> may be omitted and in this case it is assumed as 1.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C := BCHCode(31,11);</span>
a cyclic [31,11,11]7..11 BCH code, delta=11, b=1 over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">S1:= SubCode(C);</span>
a linear [31,10,11]7..13 subcode
<span class="GAPprompt">gap></span> <span class="GAPinput">WeightDistribution(S1);</span>
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 190, 0, 0, 272, 255, 0, 0, 120, 66,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">S2:= SubCode(C, 8);</span>
a linear [31,3,11]14..20 subcode
<span class="GAPprompt">gap></span> <span class="GAPinput">History(S2);</span>
[ "a linear [31,3,11]14..20 subcode of",
"a cyclic [31,11,11]7..11 BCH code, delta=11, b=1 over GF(2)" ]
<span class="GAPprompt">gap></span> <span class="GAPinput">WeightDistribution(S2);</span>
[ 1 ,0 0 ,0,,0,0,0,0,,1 0 ,0,, ,0 ,0 ,0,0,,
0, 0, 0, 0, 0, 0, 0 ]
</pre></div>
<p><a id="X809376187C1525AA" name="X809376187C1525AA"></a></p>
<h5>6.1-12 ResidueCode</h5>
<div class="func"><table class="func" width="100%"><tr><td java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 31
<p>The ,2, 3,4,5,6,7 ,9,10,16, 18, 19, 27 28 ,35,38,44 46,,java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := BCHCode( 15, 7 );</span>
a cyclic [15,5,51, 53 54,56 57,62,64],
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := ResidueCode( C1 );</span>
a linear [8,4,4]2 residue code
<span class="[ 1, 2, 3, 4, 5, 6, 7 8, 9, 10, 16, 18 20,21,23, 24, 29,34 38,40,41,
<span class="GAPprompt">gap></span> <span class="GAPinput">C3 := ResidueCode( C1, c );</span>
a linear [7,4,3]1 residue code
</pre></div>
<p><a id="X7E92DC9581F96594" name="X7E92DC9581F96594"></a></p>
<h5>6.1-13 ConstructionBCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ConstructionBCode</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The function <code class="code">ConstructionBCode</code> takes a binary linear code <var class="Arg">C</var> and calculates the minimum distance of the dual of <var class="Arg">C</var> (see <code class="func">DualCode</code> (<a href="chap6_mj.html#X799B12F085ACB609"><span class="RefLink">6.1-14</span></a>)). It then removes the columns of the parity check matrix of <var class="Arg">C</var> where a codeword of the dual code of minimal weight has coordinates java.lang.StringIndexOutOfBoundsException: Range [0, 472) out of bounds for length 31
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 31
a linear [32,16,8]6 Reed-Muller (2,5) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := ConstructionBCode( C1 );</span>
a linear Construction (8 )
<span class="GAPprompt">gap></span> <span class="GAPinput">BoundsMinimumDistance( 24, 9, GF(2) ); # so C2 is optimal</span>
rec( n := 24, k := 9, q := 2, references := rec( ),
construction := [ [ Operation "UUVCode" ],
[ [ [ Operation "UUVCode" ], [ [ [ Operation "DualCode" ],
[ [ [ Operation "RepetitionCode" ], [ 6, 2 ] ] ] ],
[ [ Operation "CordaroWagnerCode" ], [ 6 ] ] ] ],
[ [ Operation "CordaroWagnerCode 1 2, 3,4 5,6 7,8 ,10, 16,19 ,22 23 ,25 27 28,32 47
lowerBoundExplanation := [ "Lb(24,9)=8, u u+v construction of C1 and C2:",
"Lb(12,7)=4, u u+v construction of C1 and C2:",
"Lb(6,5)=2, dual of the repetition code",
"Lb(6,2)=4, Cordaro-Wagner code", "Lb(12,2)=8, Cordaro-Wagner code" ],
upperBound := 8,
upperBoundExplanation := [ "Ub(24,9)=8, otherwise construction B would
contradict:", "Ub(18,4)=8, Griesmer bound" ] )
</pre></div>
<p><a, 52 54,58, ,60, 63 ,
<h5>6.1-14 DualCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; DualCode</code>( <var class="Arg">C</var> )</td><td class="tdright 1 2, , ,5, , 7 8, 9,10, 16,19, 20, 22, 23, 24, 25, 28, 32, 33, 47,
<p><code class="code">DualCode</code> returns the dual code of <var class="Arg">C</var>. The dual code consists of all codewords that are orthogonal to the codewords of <var class="Arg">C</var>. If <var class="49 52,53 58,59, 60 ],
<p>The dual code is always a linear code, even if <var class="Arg">C</var> is non-linear.</p>
<p>If a code <var class="Arg"[1, 2,3,4 ,6 ,89 10,,19 , 43,
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := ReedMullerCode( 1, 3 );</span>
a linear 8,42 Reed-Muller (,) over GF()
<span class="GAPprompt">gap></span> <span class="GAPinput">RD := DualCode( R );</span>
a linear [8,4,4]2 dual code
<span class="GAPprompt">gap></span> <span class="GAPinput">R = RD;</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">N := WholeSpaceCode( 7, GF(4) );</span>
a cyclic [7,7,1]0 whole space code over GF(4)
<span class="GAPprompt">gap></span> <span class="GAPinput">DualCode( N ) = NullCode( 7, GF(4) );</span>
true
</pre></div>
<p><a id="X81FE1F387DFCCB22" name="X81FE1F387DFCCB22"></a></p>
<h5>6.1-15 ConversionFieldCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ConversionFieldCode</code>( <var class="Arg">C</var> )</[1,2, 3 4,5, 6, 7, 8, 9, 10, 16, 19, 20, 22, 24, 25, 28, 32, 33, 43, 44,
<p><code class="code"45, 47,49,,53 62, ]
<p>See also <code class="func">HorizontalConversionFieldMat</code> (<a href="chap7_mj.html#X8033E9A67BA155C8"><span class="RefLink">7.3-10</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := RepetitionCode( 4, GF(4) );</span>
a cyclic [4,1,4]3 repetition code over GF(4)
<span class="GAPprompt">gap></span> <span class="GAPinput">R2 := ConversionFieldCode( R );</span>
a linear [8,2,4]3..4 code, converted to basefield GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size( R ) = Size( R2 );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">GeneratorMat( R );</span>
[ [Z(2)0 Z()^0, Z(2^0,Z)^0]]
<span class="GAPprompt">gap></span> <span class="GAPinput">GeneratorMat( R2 );</span>
[ [ Z(2)^0, 0*Z(2), Z(2)^0, 0*Z(2), Z(2)^0, 0*Z(2), Z(2)^0, 0*Z(2) ],
[ *(2,Z(2)^, 0*Z(2,Z()0, 0*Z() ()0 0Z2) (2^ ]java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
</pre></div>
<p><a id="X82D18907800FE3D9" name="X82D18907800FE3D9"></a></p>
<h5>6.1-16 TraceCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; TraceCode</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Input: <var class="Arg">C</var> is a linear code defined over an extension <span class="SimpleMath">\(E\)</span> of <var class="Arg">F</var> (<var class="Arg">F</var> is the ``base field'')</p>
<p>Output: The linear code generated by <span class="SimpleMath">\(Tr_{E/F}(c)\)</span>, for all <span class="SimpleMath">\(c \in C\)</span>.</p>
<>< class=""/>returns the image the <var class=Arg"C/ar>under trace . If the field ""Cvar <spanclass="">(F(q^))/pan,the code field<spanclass="SimpleMath">(GFq\)/pan><p>
<p>Very slow. It does not seem to be easy to related the parameters of the trace code to the original except in the ``Galois closed'' case.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span44 45 47, 50,59,,64 ,
a [10,4,?] randomly generated code over GF(4)
5
<span class="GAPprompt">gap></span> <span class="GAPinput">trC:=TraceCode(C,GF(2)); MinimumDistance(trC);</span>
a linear [10,7,1]1..3 user defined unrestricted code over GF(2)
1
</pre></div>
<p><a id="X8799F4BF81B0842B" name="X8799F4BF81B0842B"></a></p>
<h5>6.1-17 CosetCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; CosetCode</code>( <var class="Arg">C</var>, <var class="Arg">w</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">CosetCode</code> returns the coset of a code <var class="Arg">C</var> with respect to word <var class="Arg">w</var>. <var class="Arg">w</var> must be of the codeword type. Then, <var class="Arg">w</var> is added to each codeword of <var class="Arg">C</var>, yielding the elements of the new code. If <var class="Arg">C</var> is linear and <var class="Arg">w</var> is an element of <var class="Arg">C</var>, the new code is equal to <var class="Arg">C</var>, otherwise the new code is an unrestricted code.</p>
<p>Generating a coset is also possible by simply adding the word <var class="Arg">w</var> to <var class= 50,52 53 , 59 62,63],
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">H := HammingCode(3, GF(2));</span>
a linear [7,4,3]1 Hamming (3,2) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">c := Codeword("1011011");; c in H;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">C := CosetCode(H, c);</span>
a (7,631coset
<span class="GAPprompt">gap></span> <span class="GAPinput">List(AsSSortedList(C), el-> Syndrome(H, el)); # All elements of the coset have the same syndrome in H </span>
[[11 ,[111],[ 1 1 1] [1 11 1 1 ] [ 1 ]
[ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ],
[ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ], [ 1 1 1 ] ]
</pre></div>
<p><a id="X873EA5EE85699832" name="X873EA5EE85699832"></a></p>
<h5>6.1-18 ConstantWeightSubcode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ConstantWeightSubcode</code>( <var class="Arg">C</var>, <var class="Arg">w</var> )</td><td class="tdright">( function )[1 2 3 ,5 6 7 , 10,17,18 20, 21,23 26,31 34, 35, 36,41
<p><code class="code">ConstantWeightSubcode</code> returns the subcode of <var class="Arg">C</var> that only has codewords of weight <var class="Arg">w</var>. The resulting code is a non-linear code, because it does not contain the all-zero vector.</p>
<p>This command also can be called with the syntax <code class="code">ConstantWeightSubcode(C)</code> In this format, <code class="code">ConstantWeightSubcode</code> returns the subcode of <var class="Arg">C</var> consisting of all minimum weight codewords of <var class="Arg">C</var>.</p>
<p><code class="code">ConstantWeightSubcode</code> first checks if Leon's binary <code class="code">wtdist</code> exists on your computer (java.lang.StringIndexOutOfBoundsException: Index 141 out of bounds for length 31
<div class="example"><<div class="example"><pre,10,17 18,20 21,25 31,34 ,36,41,,java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<span class="GAPprompt">gap></span> <span class="GAPinput">N := NordstromRobinsonCode();; WeightDistribution(N);</span>
[ 1, 0, 0, 0, 0, 0, 112, 0, 30, 0, 112, 0, 0, 0, 0, 0, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">C := ConstantWeightSubcode(N, 8);</span>
a(,,.16).8code with codewords of weight 8
<span class="GAPprompt">gap></span> <span class="GAPinput">WeightDistribution(C);</span>
[ 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">eg := ExtendedTernaryGolayCode();; WeightDistribution(eg);</span>
[ 1, 0, 0, 0, 0, 0, 264, 0, 0, 440, 0, 0, 24 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">C := ConstantWeightSubcode(eg);</span>
a (12,264,6..12)3..6 code with codewords of weight 6
<span class="GAPprompt">gap></span> <span class="GAPinput">WeightDistribution(C);</span>
[ 0, 0, 0, 0, 0, 0, 264, 0, 0, 0, 0, 0, 0 ]
</pre></div>
<p><a id="X7AA203A380BC4C79" name="X7AA203A380BC4C79"></a></p>
<h5>6.1-19 StandardFormCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; StandardFormCode</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">StandardFormCode</code> returns <var class="Arg">C</var> after putting it in standard form. If <var class="Arg">C</var> is a non-linear code, this means the elements are organized using lexicographical order. This means they form a legal GAP `Set'.</p>
<p>If <var class="Arg">C</var> is a linear code, the generator matrix and parity check matrix are put in standard form. The generator matrix then has an identity matrix in its left part, the parity check matrix has an identity matrix in its right part. Although <strong class="pkg">GUAVA</strong> always puts both matrices [1,2,3,4,5,6 7 ,910 ,18,21 23, ,31,34 ,41,42,43,
<p>If <var class="Arg">C</var> is a cyclic code, its generator matrix cannot be put in the usual upper triangular form, because then it would be inconsistent with the generator polynomial. The reason [ 1, 2, , , 5 6,7,8 9,10,17 ,2125,26,29 ,36 37, 41,42
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := GeneratorMatCode( Z(2) * [ [0,1,1,0], [0,1,0,1], [0,0,1,1] ], </span>
<span [ , 2,3 4, 5,6, 7,8 9,10 17, , 21, 25, ,30 ,34,35 ,41
a linear [4,2,1..2]1..2 random form code over GF(2)
<
[ [ 0 1 0 1 ], [ 0 0 1 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">Codeword( GeneratorMat( StandardFormCode( G ) ) );</span>
[[ ,[ 01]]
</pre></div>
<p><a id="X7EF49A257D6DB53B" name="X7EF49A257D6DB53B"></a></p>
<h5>6.1-20 PiecewiseConstantCode45 47,
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; PiecewiseConstantCode</code>( <var class="Arg">part</var>, <var java.lang.StringIndexOutOfBoundsException: Range [0, 170) out of bounds for length 77
<p><code class="code">PiecewiseConstantCode</code> returns a code with length <span class="SimpleMath">\(n = \sum n_i\)</span>, where <var class="Arg">part</var>=<span class="SimpleMath">\([ n_1, \dots, n_k ]\)</span>. <var class="Arg">wts</var> is a list of <var class="Arg">constraints</var> <span class="SimpleMath">\(w=(w_1,...,w_k)\)</span>, each [ 1, , 3 4, 5, 6, 7, 8, 9, 10, 17, 18, 23, 24, 26, 28, 29, 31, 36, 41, 46,
<p>A constraint is a list of integers, and a word <span class="SimpleMath">\(c = ( c_1, \dots, c_k )\)</span> (according to <var class="Arg">part</var>, i.e., each <span class="SimpleMath">\(c_i\)</span> is a subword of length <span class="SimpleMath">\(n_i\)</span>) is in the resulting code if and only if, for some constraint <span class="SimpleMath">\53 55, 57 59 ,62,63],
<p>An example might make things clearer:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PiecewiseConstantCode( [ 2, 3 ],</span>
[ [ 0, 0 ], [ 0, 3 ], [ 1, 0 ], [ 2, 2 ] ],GF(2) );
the C 2 ,4 , 6 7,, 9 10,17,18,24,25 28,29 31 35 36, 41, 43,
the C code programs are compiled, so using Leon's binary....
the C code programs are compiled, so using Leon's binary....
the C code programs are compiled, so using Leon's binary....
a (5,,.51. constant over GF()
<span class="GAPprompt">gap></span> <span class="GAPinput">AsSSortedList(last);</span>
00 0][0 ,[01 0 0 ,[10 0 ,
[ 1 1 0 1 1 ], [ 1 1 1 0 1 ], [ 1 1 1 1 0 ] ]
</pre></div>
<p>The first constraint is satisfied by codeword 1, the second by codeword 2, the third by codewords 3 and 4, and the fourth by codewords 5, 6 and 7.</p>
<p><a id="X7964BF0081CC8352" name="X7964BF0081CC8352"></a></p>
<h4>6.2 <span class="Heading">
Functions that Generate a New Code from Two or More Given Codes
</span></h4>
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
<h5>6.2-1 DirectSumCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; DirectSumCode</code>( <var class="Arg">C1</var>, <var class="Arg">C2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">DirectSumCode</code> returns the direct sum of codes <var class="Arg">C1</var> and <var class="Arg">C2</var>. The direct sum code consists of every codeword of <var class="Arg">C1</var> concatenated by every codeword of <var class="Arg">C2</var>. Therefore, if <var class="Arg">Ci</var> was a <span class="SimpleMath">\((n_i,M_i,d_i)\)</span> code, the result is a <span class="SimpleMath">\((n_1+n_2,M_1*M_2,min(d_1,d_2))\)</span> code.</p>
<p>If both <var class="Arg">C1</var> and <var class="Arg">C2</var> are , ,
<p>Performing a direct sum can also be done by adding two codes (see Section <a href="chap4_mj.html#X832DA51986A3882C"><span class="RefLink">4.2</span></a>). Another often used method is the `u, u+v'-construction, described in <code class="func">UUVCode<47, ,54,58,61,, 64 ],
<div class=" , 2,3 4,5 6,7 8, , 10,17 19,21, 25,26 28,34 36, 37, ,42
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := ElementsCode( [ [1,0], [4,5] ], GF(7) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := ElementsCode( [ [0,0,0], [3,3,3] ], GF(7) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">D := DirectSumCode(C1, C2);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">AsSSortedList(D);</span>
[ [ 1 0 0 0 0 ], [ 1 0 3 3 3 ], [ 4 5 0 0 0 ], [ 4 5 3 3 3 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">D = C1 + C2; # addition = direct sum</span>
true
</pre></div>
<p><a id="X86E9D6DE7F1A07E6" name="X86E9D6DE7F1A07E6"></a></p>
<5>6.2-2 UUVCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; UUVCode</code>( <var class="Arg">C1</var>, <var class="Arg">C2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">UUVCode</code> returns the so-called <span class="SimpleMath">\((u\|u+v)\)</span> construction applied to <var class="Arg">C1</var> and <var class="Arg">C2</var>. The resulting code consists of every codeword <span class="SimpleMath">\(u\)</span> of <var java.lang.StringIndexOutOfBoundsException: Range [0, 282) out of bounds for length 31
<p>If both <var class="Arg">C1</var> and <var class="Arg">C2</var> are linear codes, the result is also a linear code. If one of them is non-linear, the UUV sum is non-linear too. In general, a UUV sum code is not cyclic.</p>
<p>The function <code class="code">DirectSumCode</code> returns another sum of codes (see <code class="func">DirectSumCode</code> (<a href="chap6_mj.html#X79E00D3A8367D65A"><span class="RefLink">6.2-1</span></a>)).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := EvenWeightSubcode(WholeSpaceCode(4, GF(2)));</span>
a cyclic [4,3,2]1 even weight subcode
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := RepetitionCode(4, GF(2));</span>
a cyclic [4,1,4]2 repetition code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">R := UUVCode(C1, C2);</span>
a linear [8,4,4]2 U|U+V construction code
<span class="GAPprompt">gap></span> <span class="GAPinput">R = ReedMullerCode(1,3);</span>
true
</pre></div>
<p><a id="X7BFBBA5784C293C1" name=" 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 17, 20, 25, 2640 ,43
<h5>6.2-3 DirectProductCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; DirectProductCode</code>( <var class="Arg">C1</var>, <var class="Arg">C2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">DirectProductCode</code> returns the direct product of codes <var class="Arg">C1</var> and <var class="Arg">C2</var>. Both must be linear codes. Suppose <var class="Arg">Ci</var> has generator matrix <span class="SimpleMath">\(G_i\)</span>. The direct product of <var class="Arg">C1</var> and <var class="Arg">C2<44, ,46 ,56 ,64 ,
<p ,3 ,5 6 7 8 9 10, 17, 21, 23, 25, 26, 28, 30, 31, 33, 36, 42java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L1 := LexiCode(10, 4, GF(2));</span>
a linear [10542.4 lexicode overGF()
<span class="GAPprompt">gap></span> <span class="GAPinput">L2 := LexiCode(8, 3, GF(2));</span>
a linear [8,4,3]2..3 lexicode over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">D := DirectProductCode(L1, L2);</span>
a linear [80,20,12]20..45 direct product code
</1 ,3, 4 ,6,7,8 , 10 ,21,23,25 28 ,31 34 ,42,43,
<p><a id="X78F0B1BC81FB109C" name="X78F0B1BC81FB109C"></a></p>
<h5>6.2-4 IntersectionCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; IntersectionCode</code>( <var class
<p><code class="code">IntersectionCode</code> returns the intersection of codes <var class="Arg">C1</var> and <var class="Arg">C2</var>. This code consists of all codewords that are both in <var class="Arg">C1</var> and <var class="Arg">C2</var>. If both codes are linear, the result is also linear. If both are cyclic, the result is also cyclic.</p>
< class=example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C := CyclicCodes(7, GF(2));</span>
[ a cyclic [7,7,1]0 enumerated code over GF(2),
a cyclic [7,6,1..2]1 enumerated code over GF(2),
a cyclic [7,3,1..4]2..3 enumerated code over GF(2),
a cyclic [7,0,7]7 enumerated code over GF(2),
a cyclic [7,3,1..4]2..3 enumerated code over GF(2),
a cyclic [7,4java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
a cyclic [7,1,7]3 enumerated code over GF(2),
a cyclic [7,4,1..3]1 enumerated code over GF(2) ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IntersectionCode(C[6
true
/><div>
<p>The <em>hull</em> of a linear code is the intersection of the code with its dual code. In other words, the hull of <span class="SimpleMath">\(C\)</span> is <code class="code">IntersectionCode(C, DualCode(C))</code>.</p>
<p><a id="X8228A1F57A29B8F4" name="X8228A1F57A29B8F4"></a></p>
<h5>6.2-5 UnionCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; UnionCode</code>( <var class="Arg">C1</var>, <var class="Arg">C2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">UnionCode</code> returns the union of codes <var class="Arg">C1</var> and <var class="Arg">C2</var>. This code consists of the union of all codewords of <var class="Arg">C1</var> java.lang.StringIndexOutOfBoundsException: Range [0, 204) out of bounds for length 77
< class=""><>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := GeneratorMatCode([[1,0,1],[0,1,1]]*Z(2)^0, GF(2));</span>
a linear [,2,.21code defined by generator (java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
<span class="GAPprompt">gap></span> <span class="GAPinput">H := GeneratorMatCode([[1,1,1]]*Z(2)^0, GF(2));</span>
a linear [3,1,3]1 code defined by generator matrix over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">U := UnionCode(G,
a linear [3,3,1]0 union code
<span class="GAPprompt">gap></span> <span class="GAPinput">c := Codeword("010");; c in G;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">c in H;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">c in U;</span>
true
</pre></div>
<p><a id="X7A85F8AF8154D387" name="X7A85F8AF8154D387"></a></p>
<h5>6.2-6 ExtendedDirectSumCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ExtendedDirectSumCode</code>( <var class="Arg">L</var>, <var class="Arg">B</var>, <var class="Arg">m</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The extended direct sum construction is described in section V of Graham and Sloane <a href="chapBib_mj.html#biBGS85">[GS85]</a>. ,51 ,55 59 61, ,
<p>Suppose <var class="Arg">L</var> is an <span class="SimpleMath">\([n_L, k_L]r_L\)</span> code, and <var class="Arg">B</var> is [ 1 , 3 ,5,,7 ,9,10, 18 ,24 ,28 ,33,36,40 ,
<class="center">[
\Psi( L, B ) = \max_{u \in F_2^{n_L}} \frac{1}{2^{k_B}}
\sum_{v \in B} {\rm d}( L, v + u ).
\]</p>
<p>However, this computation will not be executed, because it may be too time consuming for large codes.</p>
<p>If <span class="SimpleMath">\(L \subseteq B\)</span>, and <span class="SimpleMath">\(L\)</span> and <span class="SimpleMath">\(B\)</span> are linear codes, the last copy of <var class="Arg">L</var> is omitted. In this case the dimension is <span class="SimpleMath">\(k = m k_L + (k_B - k_L)\)</span>.</p>
<div class="example"><pre>
<span
a linear [7,4,3]1 Hamming (3,2) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">d := WholeSpaceCode( 7, GF(2) );</span>
a cyclic [7,7,1]0 whole space code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">e := ExtendedDirectSumCode( c, d, 3 );</span>
a linear [21,15,1..3]2 3-fold extended direct sum code
</pre></div>
<p><a id="X7E17107686A845DB" name="X7E17107686A845DB"></a></p>
<h5>6.2-7 AmalgamatedDirectSumCode</h5>
<div class="func"><table java.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 31
<p><code class="code">AmalgamatedDirectSumCode</code> returns the amalgamated direct sum of the codes <var class="Arg">c1</var> and <var class="Arg">c2</var>. The amalgamated direct sum code consists of all codewords of the form <span class="SimpleMath">\((u \, \| \,0 \, \| \, v)\)</span> if <span class="SimpleMath">\((u \, \| \, 0) \in c_1\)</span> and <span class="SimpleMath">\((0 \, \| \, v) \in c_2\)</span> and all codewords of the form <span class="SimpleMath">\((u \, \| \, 1 \, \| \, v)\)</span> if <span class="SimpleMath">\((u \, \| \, 48,50, 51, 52 ,61
<>If both codes arelinear first standardized withinformationsymbols the and first of thefirst second , respectively.<p
<p>If <var class="Arg">c1</var> is a normal code (see <code class="func">IsNormalCode</code> (<a href="chap7_mj.html#X80283A2F7C8101BD"><span class="RefLink">7.4-5</span></a>)) with the last coordinate acceptable (see <code class="func">IsCoordinateAcceptable</code> (<a href="chap7_mj.html#X7D24F8BF7F9A7BF1"><span class="RefLink">7.4-3</span></[, ,,4 5,6, 7 8 , ,18 ,java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">c := HammingCode( 3, GF(2) );</span>
a linear [7,4,3]1 Hamming (3,2) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">d := ReedMullerCode( 1, 4 );</span>
a linear 165,]6 Reed-Muller (14 code overGF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">e := DirectSumCode( c, d );</span>
a linear [23,9,3]7 direct sum code
<span class="GAPprompt">gap></span> <span class="GAPinput">f := AmalgamatedDirectSumCode( c, d );;</span>
<span class>&;</span>< class=">(f ;<span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius( f );; </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f;</span>
a linear [22,8,3]7 amalgamated direct sum code
</pre></div>
<p><a id="X7D8981AF7DFE9814" name="X7D8981AF7DFE9814"></a></p>
<h5>6.2-8 BlockwiseDirectSumCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; BlockwiseDirectSumCode</code>( <var class="Arg">C1</var>, <var class="Arg">L1</var>, <var class="Arg">C2</var>, <var class="Arg">L2</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">BlockwiseDirectSumCode</code> returns a subcode of the direct sum of <var class="Arg">C1</var> and <var class="Arg">C2< 45,50,53 59,61,63,64 ]
<p>In the first case,
<p class="center">\[
bds = \bigcup_{1 \leq i \leq \ell} ( C_1 + (L_1)_i ) \oplus ( C_2 + (L_2)_i ),
\]</p>
<p>where <span class="SimpleMath">\(\ell\)</span> is the length of <var class="Arg">L1</var> and <var class="Arg">L2</var>, and <span class="SimpleMath">\(\oplus\)</span> is the direct sum.</p>
<p>In the second case, is <p
<p class="center">\[
bds = \bigcup_{1 \leq i \leq \ell} ( (L_1)_i \oplus (L_2)_i ).
\]</p>
<p>The length of the new code is <span class="SimpleMath">\(n = n_1 + n_2\)</span>.</p>
<div class=""><>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := HammingCode( 3, GF(2) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := EvenWeightSubcode( WholeSpaceCode( 6, GF(2) ) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">BlockwiseDirectSumCode( C1, [[ 0,0,0,0,0,0,0 ],[ 1,0,1,0,1,0,0 ]],</span>
<1 , ,4, 5 ,7,8 ,10 20,,23,25,27,28,31,34,,44 47
a (13,1024,1..13)1..2 blockwise direct sum code
</pre></div>
<p><a id="X7C37D467791CE99B" name="X7C37D467791CE99B"></a></p>
<h5>6.2-9 ConstructionXCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ConstructionXCode</code>( <var class="Arg">C</var>, <var class="Arg">A</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Consider a list of <span class="SimpleMath">\(j\)</span> linear codes of the same length <span class="SimpleMath">\(N\)</span> over the same field <span class="SimpleMath">\(F\)</span>, <span class="SimpleMath">\(C = \{ C_1, C_2java.lang.StringIndexOutOfBoundsException: Index 231 out of bounds for length 77
<p>For more information on Construction X, refer to <a href="chapBib_mj.html#biBSloane72">[SRC72]</a>.</p>
<iv class""<>
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := BCHCode(127, 43);</span>
a cyclic [127,29,43]31..59 BCH code, delta=43, b=1 over GF(2)
<span class="GAPprompt">>/span span =APinput">C2 = BCHCode(127, 47;/java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
a cyclic [127,22,47..51]36..63 BCH code, delta=47, b=1 over GF(2[1, ,3 4,5,6,7,8,,10 20,21,25,26, 28,31 35 ,39,44,45
<span class="GAPprompt">gap></span> <span class="GAPinput">C3 := BCHCode(127, 55);</span>
a cyclic [127,15,55]41..62 BCH code, delta=55, b=1 over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">G1 := ShallowCopy( GeneratorMat(C2) );;</span>
<span class="[ 1, 2, 3, 4, 5, 6, 78 , , 12,13,14 15 16,23 27 28 ,36,37,java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := GeneratorMatCode(G1, GF(2));</span>
a [,23,1.43]5.63code defined java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 73
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimumDistance(C1);</span>
43
<span class="GAPprompt">gap></span> <span class="GAPinput">C[1,2 3 4,5 6, 7, 8, ,11 12, ,14 15, 16, 23,27 28, 29,43,46
[ a linear [127,23,43]35..63 code defined by generator matrix over GF(2),
a cyclic [127,22,47..51]36..63 BCH code, delta=47, b=1 over GF(2),
a cyclic [127,15,55]41..62 BCH code, delta=55, b=1 over GF(2) ]
< class="APprompt">gap&t</> span="GAPinput">C1,C2]);/>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSubset(C[2], C[3]);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">A := [ RepetitionCode(4, GF(2)), EvenWeightSubcode( QRCode(17, GF(2)) ) ];</span>
[ a cyclic [4,1,4]2 repetition code over GF(2),
a [17,8,6]3.6 even weight subcode ]
<span class="GAPprompt">gap></span> <span class="GAPinput">CX := ConstructionXCode(C, A);</span>
a linear [148,23,53]43..74 Construction X code
<span class="GAPprompt">gap></span> <span class="GAPinput">History(CX);</span>
[ "a linear [148,23,53]43..74 Construction X code of",
"Base codes: [ a cyclic [127,15,55]41..62 BCH code, delta=55, b=1 over GF(2)\
, a cyclic [127,22,47..51]36..63 BCH code, delta=47, b=1 over GF(2), a linear \
[127,23,43]35..63 code defined by generator matrix over GF(2) ]",
"Auxiliary codes: [ a cyclic [4,1,4]2 repetition code over GF(2), a cyclic [\
17,8,6]3..6 even weight subcode ]" ]
</pre></div>
<p><a id="X7B50943B8014134F" name="X7B50943B8014134F"></a></p>
<[1,13, 14 ,20,23 26,31 35 39,40
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; ConstructionXXCode</code>( <var class="Arg">C1</var>, <var class="Arg">C2</var>, <var class="Arg">C3</var>, <var class="Arg">A1</var>, <var class=,46 ,55 ,62, 63 ]
<p>Consider a set of linear codes over field <span class="SimpleMath">\(F\)</span> of the same length, <span class="SimpleMath">\(n\)</span>, <span class="SimpleMath">\(C_1=[n, k_1, d_1]\)</span>, <span class="SimpleMath">\(C_2=[n, k_2, d_2]\)</span> and <span class="SimpleMath">\(C_3=[n, k_3, 42, 49, 51,55, 59, 61 ]
<p>The codewords of <span class="SimpleMath">\(C_{XX}\)</span> can be partitioned into three sections <span class="SimpleMath">\(( v\;\|\;a\;\|\;b )\)</span> where <span class="SimpleMath">\(v\)</span> has length <span class="SimpleMath">\(n\)</span>, <span class="SimpleMath">\(a\)</span> has length <span class="SimpleMath">\(n_1\)</span> and <span class="SimpleMath">\(b\)</span> has length <span class="SimpleMath">\(n_2\)</span>. A codeword from Construction XX takes the following form:</p>
<ul>
<li><p><span class="SimpleMath">\(( v \; \| \; 0 \; \| \; 0 )\)</span> if <span class="SimpleMath">\(v \in C_4\)</span></p>
</li>
<li><p><span class="SimpleMath">\(( v \; \| \; a_1 \; \| \; 0 )\)</span> if <span class="SimpleMath">\(v \in C_3 \backslash C_4\)</span></p>
</li>
<li><p><span class="SimpleMath">\(( v \; \| \; 0 \; \| \; a_2 )\)</span> if <span class="SimpleMath">\(v \in C_2 \backslash C_4\)</java.lang.StringIndexOutOfBoundsException: Index 134 out of bounds for length 77
</li>
<li><p><span class="SimpleMath">\(( v \; \| \; a_1 \; \| \; a_2 )\)</span> otherwise</p>
</li>
</ul>
<p>For more information on Construction XX, refer to <a href="chapBib_mj.html#biBAlltop84">[All84]</a>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">a := PrimitiveRoot(GF(32));</span>
Z(2^5)
<span class="GAPprompt">gap></span> <span class="GAPinput">f0 := MinimalPolynomial( GF(2), a^0 );</span>
x_1+Z(2)^0
<span class="GAPprompt">gap></span> <span class="GAPinput">f1 := MinimalPolynomial( GF(2), a^1 );</span>
x_1^5+x_1^2+Z(2)^0
<( () a );<span
x_1^5+x_1^4+x_1^2+x_1+Z(2)^0
<span class="GAPprompt">gap></span> <span class="GAPinput">C2 := CheckPolCode( f0 * f1, 31, GF(2) );; MinimumDistance(C2);; Display(C2);</span>
a cyclic [31,6,15]10..13 code defined by check polynomial over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">C3 := CheckPolCode( f0 * f5, 31, GF(2) );; MinimumDistance(C3);; Display(C3);</span>
a cyclic [31,6,15]10..13 code defined [1,, 3,4,5,6 7, 8,,11 12,13,14 ,23,, ,35,37,40,42,
<span class="GAPprompt">gap></span> <span class="GAPinput">C1 := UnionCode(C2, C3);; MinimumDistance(C1);; Display(C1);</span>
a linear [31,11,11]7..11 union code of
U: a cyclic [31,6,15]10..13 code defined by check polynomial over GF(2)
V: a cyclic [31,6,15]10..13 code defined by check polynomial over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">A1 := BestKnownLinearCode( 10, 5, GF(2) );</span>
a linear [10,5,4]2..4 shortened code
<span class="GAPprompt4651 55 56 58 60 63],
a cyclic [6,5,2]1 dual code
<span class="GAPprompt">gap></span> <span class="GAPinput">CXX:= ConstructionXXCode(C1, C2, C3, A1, A2 );</span>
a linear [47,11,15..17]13..23 Construction XX code
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimumDistance(CXX);</span>
17
<span class="GAPprompt">gap></span> <span class="GAPinput">History(CXX); </span>
[ "a linear [47,11,17]13..23 Construction XX code of",
"C1: a cyclic [31,11,11]7..11 union code",
C2:java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 78
"C3: a cyclic [31,6,15]10..13 code defined by check polynomial over GF(2)",
"A1: a linear [10,5,4]2..4 shortened code",
"A2: a cyclic [6,5,2]1 dual code" ]
</pre></div>
<p><a id="X790C614985BFAE16" name="X790C614985BFAE16"></a,,62, 63 ,
<h5>6.2-11 BZCode</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; BZCode</code>( <var class="Arg">O</var>, <var class="Arg">I</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Given a set of[1,2 ,4 ,6,7,8 9 ,12 ,15
<p>Note that the set of inner codes must satisfy chain condition, i.e. <span class="SimpleMath">\(I_1 = 37, 39,40 52
<p>For more information on Blokh-Zyablov multilevel concatenated code, refer to <a href="chapBib_mj.html#biBBrouwer98">[Bro98[1,2 ,4 ,6 7 ,9,11 12,, 15,16 23 ,27, ,29,33 46
<p><a id="X820327D6854A50B5" name="X820327D6854A50B5"></a></p>
<h5>6.2-12 BZCodeNC</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; BZCodeNC</code>( <var class="Arg">O</var>, <var class="Arg">I</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function is the same as <code class="code">BZCode</code>, except this version is faster as it does not estimate the covering radius of the code. Users are[ 1,2 ,4, ,6, , 8,9,11,12,13,15,16 ,24 ,33 36,, 44
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># Binary code</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">O := [ CyclicMDSCode(2,3,7), BestKnownLinearCode(9,5,GF(2)), CyclicMDSCode(2,3,4) ];</span>
[ a cyclic [9,7,3]1 MDS code over GF(8), a linear [9,5,3]2..3 shortened code,
a cyclic [9,4,6]4..5 MDS code over GF(8) ]
<span class="GAPprompt">gap></span> <span class="GAPinput">A 51 52,54 57, 61, 62 64],
<span class="GAPprompt">gap></span> <span class="GAPinput">I := [ SubCode(A), A[1 2, 3,4,5,6 ,8,9 , 12,,15,16,24,27,,36,37,43,45,
[ a linear [8,3,4]3..4 subcode, a linear [8,4,4]2 extended code,
e]
<span class="GAPprompt">gap></span> <span class="GAPinput">C := BZCodeNC(O, I);</span>
a linear [72,38,12]0..72 Blokh Zyablov concatenated code
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># Non binary code</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">O2 := ExtendedCode(GoppaCode(ConwayPolynomial(5,2), Elements(GF(5))));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">O3 := ExtendedCode(GoppaCode(ConwayPolynomial(5,3), Elements(GF(5))) 1 ,,4 ,6, ,,9,11,12,13,16 17 20 2331,37 ,,
<span class="GAPprompt">gap></span> <span class="GAPinput">O1 := DualCode( O3 );;</span>
<span class="GAPprompt">gap></span> <span 45
<span class="GAPprompt">gap></span> <span class="GAPinput">Cy := CyclicCodes(5, GF(5));;</span>
<pan ="GAPprompt""gapgt;/span><span class="APinput"for i [, 5]do;(Cy[i]);; od</>
<span class="GAPprompt">gap></span> <span class="GAPinput">O := [ O1, O2, O3 ];</span>
[ a linear [6,4,3]150, 51,53,58,,61,63 ,
a linear [6,2,5]3..4 extended code ]
<span class="GAPprompt">gap></span> <span class="GAPinput">I := [ Cy[5], Cy[4], Cy[3] ];</span>
[ a cyclic [5,1,5]3..4 enumerated code over GF(5),
a cyclic [5,2,4]2..3 enumerated code over GF(5),
a cyclic [5,3,1..3]2 enumerated code over GF(5) ]
<span class="GAPprompt">gap></span> <span class="GAPinput">C := BZCodeNC( O, I );</span>
a linear [,,.150.30Blokh Zyablov code
<span class="GAPprompt">gap></span> <span class="GAPinput">MinimumDistance(C);</span>
15
<span class="GAPprompt">gap></span> <span class="GAPinput">History(C);</span>
[ "a linear [30,9,15]0..30 Blokh Zyablov concatenated code of",
"Inner codes: [ a cyclic [5,1,5]3..4 enumerated code over GF(5), a cyclic [5\
,2,4]2..3 enumerated code over GF(5), a cyclic [5,3,1..3]2 enumerated code ove\
r GF(5) ]",
"Outer codes: [ a linear [6,4,3]1 dual code, a linear [6,3,4]2..3 extended c\
ode, a linear [6,2,5]3..4 extended code ]" ]
</[ 1, ,3 ,5,6,7 8 , ,12,13 16 24 28,30,31, ,36 38,43
<div class="chlinkprevnextbot"> 49,51,52 57 58 59,60]
<div class , ,3,4 ,6,, 8, 9, 11, 12 ,16,27,,29,37 38, 45,46, 47,java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<hr />
<p class="foot">generated by <a href="https://www.math.[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 16, 27, 28, 30, 31,51,java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
</body>
</html>
¤ Dauer der Verarbeitung: 0.64 Sekunden
¤
*© Formatika GbR, Deutschland
|
|