Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/guava/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 1.1.2025 mit Größe 128 kB image not shown  

Impressum chap7.html   Sprache: HTML

 
 products/Sources/formale Sprachen/GAP/pkg/guava/doc/chap7.html


<?xml version="1.0" encoding="UTF-8"?>

<!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>
<title>GAP (guava) - Chapter 7: 
Bounds on codes, special matrices and miscellaneous functions
</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="chap7"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap6.html">[Previous Chapter]</a>    <a href="chap8.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap7_mj.html">[MathJax on]</a></p>
<p><a id="X7A814D518460862E" name="X7A814D518460862E"></a></p>
<div class="ChapSects"><a href="chap7.html#X7A814D518460862E">7 <span class="Heading">
Bounds on codes, special matrices and miscellaneous functions
</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X87C753EB840C34D3">7.1 <span class="Heading">
Distance bounds on codes
</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8673277C7F6C04C3">7.1-1 UpperBoundSingleton</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X828095537C91FDFA">7.1-2 UpperBoundHamming</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X82EBFAAB7F5BFD4A">7.1-3 UpperBoundJohnson</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7A26E2537DFF4409">7.1-4 UpperBoundPlotkin</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X86A5A7C67F625A40">7.1-5 UpperBoundElias</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X82366C277E218130">7.1-6 UpperBoundGriesmer</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8301FA9F7C6C7445">7.1-7 IsGriesmerCode</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7A5CB74485184FEE">7.1-8 UpperBound</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7FDF54BA81115D88">7.1-9 LowerBoundMinimumDistance</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7CF15D2084499869">7.1-10 LowerBoundGilbertVarshamov</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8217D830871286D8">7.1-11 LowerBoundSpherePacking</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7C6A58327BD6B685">7.1-12 UpperBoundMinimumDistance</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7B3858B27A9E509A">7.1-13 BoundsMinimumDistance</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X817D0A647D3331EB">7.2 <span class="Heading">
Covering radius bounds on codes
</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8320D1C180A1AAAD">7.2-1 BoundsCoveringRadius</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7881E03E812140F4">7.2-2 IncreaseCoveringRadiusLowerBound</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7AD9F1D27C52BC0F">7.2-3 ExhaustiveSearchCoveringRadius</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X85D671F4824B4B0C">7.2-4 GeneralLowerBoundCoveringRadius</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8638F5A67D6E50C1">7.2-5 GeneralUpperBoundCoveringRadius</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7E7FBCC87D5562AB">7.2-6 LowerBoundCoveringRadiusSphereCovering</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X85E20C518360AB70">7.2-7 LowerBoundCoveringRadiusVanWee1</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7C72994A825228E7">7.2-8 LowerBoundCoveringRadiusVanWee2</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7F95362485759ACB">7.2-9 LowerBoundCoveringRadiusCountingExcess</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X829C14A383B5BF59">7.2-10 LowerBoundCoveringRadiusEmbedded1</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7B0C81B88604C448">7.2-11 LowerBoundCoveringRadiusEmbedded2</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7D27F6E27B9A0D35">7.2-12 LowerBoundCoveringRadiusInduction</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X80F8DFAD7D67CBEC">7.2-13 UpperBoundCoveringRadiusRedundancy</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X832847A17FD0D142">7.2-14 UpperBoundCoveringRadiusDelsarte</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X86F10D9E79AB8796">7.2-15 UpperBoundCoveringRadiusStrength</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8585C6A982489FC3">7.2-16 UpperBoundCoveringRadiusGriesmerLike</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X82A38F5F858CF3FC">7.2-17 UpperBoundCoveringRadiusCyclicCode</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X806EBEC77C16E657">7.3 <span class="Heading">
Special matrices in <strong class="pkg">GUAVA</strong>
</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X82899B64802A4BCE">7.3-1 KrawtchoukMat</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X87AFE2C078031CE4">7.3-2 GrayMat</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7E1E7C5287919CDB">7.3-3 SylvesterMat</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8014A1F181ECD8AA">7.3-4 HadamardMat</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X797F43607AD8660D">7.3-5 VandermondeMat</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7B47D82485B66F1D">7.3-6 PutStandardForm</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7D4EDA0A854EBFEF">7.3-7 IsInStandardForm</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7A97AD477E7638DE">7.3-8 PermutedCols</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7B68119F85E9EC6D">7.3-9 VerticalConversionFieldMat</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8033E9A67BA155C8">7.3-10 HorizontalConversionFieldMat</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X804AAFF2867080F7">7.3-11 MOLS</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7F34306B81DC2776">7.3-12 IsLatinSquare</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X81B9B40B7B2D97D5">7.3-13 AreMOLS</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7AB5E5CE7FDF7132">7.4 <span class="Heading">
Some functions related to the norm of a code
</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8032E53078264ABB">7.4-1 CoordinateNorm</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7ED2EF368203AF47">7.4-2 CodeNorm</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7D24F8BF7F9A7BF1">7.4-3 IsCoordinateAcceptable</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X87039FD179AD3009">7.4-4 GeneralizedCodeNorm</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X80283A2F7C8101BD">7.4-5 IsNormalCode</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X8308D685809A4E2F">7.5 <span class="Heading">
Miscellaneous functions
</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X871286437DE7A6A4">7.5-1 CodeWeightEnumerator</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X84DA928083B103A0">7.5-2 CodeDistanceEnumerator</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X84B2BE66780EFBF9">7.5-3 CodeMacWilliamsTransform</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7903286078F8051B">7.5-4 CodeDensity</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X85303BAE7BD46D81">7.5-5 SphereContent</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7ACDC5377CD17451">7.5-6 Krawtchouk</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X827E39957A87EB51">7.5-7 PrimitiveUnityRoot</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X78AEA40F7AD9D541">7.5-8 PrimitivePolynomialsNr</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7A2B54EF868AA752">7.5-9 IrreduciblePolynomialsNr</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7B50D3417F6FD7C6">7.5-10 MatrixRepresentationOfElement</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7805D2BB7CE4D455">7.5-11 ReciprocalPolynomial</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7AEA9F807E6FFEFF">7.5-12 CyclotomicCosets</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7A4EA98D794CF410">7.5-13 WeightHistogram</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X805DF25C84585FD6">7.5-14 MultiplicityInList</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8072B0DA78FBE562">7.5-15 MostCommonInList</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7C5407EF87849857">7.5-16 RotateList</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X85E526367878F72A">7.5-17 CirculantMatrix</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7969103F7A8598F9">7.6 <span class="Heading">
Miscellaneous polynomial functions
</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X84D51EBB784E7C5D">7.6-1 MatrixTransformationOnMultivariatePolynomial </a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X80433A4B792880EF">7.6-2 DegreeMultivariatePolynomial</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X83F44E397C56F2E0">7.6-3 DegreesMultivariatePolynomial</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X79E76B6F7D177E27">7.6-4 SolveLinearSystem</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X80171AA687FFDC70">7.6-5 GuavaVersion</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7EBBE86D85CC90C0">7.6-6 ZechLog</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X7C8C1E6A7E3497F0">7.6-7 CoefficientToPolynomial</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X8431985183B63BB7">7.6-8 DegreesMonomialTerm</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap7.html#X860EF39B841380A1">7.6-9 DivisorsMultivariatePolynomial</a></span>
</div></div>
</div>

<h3>7 <span class="Heading">
Bounds on codes, special matrices and miscellaneous functions
</span></h3>

<p>In this chapter we describe functions that determine bounds on the size and minimum distance of codes (Section <a href="chap7.html#X87C753EB840C34D3"><span class="RefLink">7.1</span></a>), functions that determine bounds on the size and covering radius of codes (Section <a href="chap7.html#X817D0A647D3331EB"><span class="RefLink">7.2</span></a>), functions that work with special matrices <strong class="pkg">GUAVA</strong> needs for several codes (see Section <a href="chap7.html#X806EBEC77C16E657"><span class="RefLink">7.3</span></a>), and constructing codes or performing calculations with codes (see Section <a href="chap7.html#X8308D685809A4E2F"><span class="RefLink">7.5</span></a>).</p>

<p><a id="X87C753EB840C34D3" name="X87C753EB840C34D3"></a></p>

<h4>7.1 <span class="Heading">
Distance bounds on codes
</span></h4>

<p>This section describes the functions that calculate estimates for upper bounds on the size and minimum distance of codes. Several algorithms are known to compute a largest number of words a code can have with given length and minimum distance. It is important however to understand that in some cases the true upper bound is unknown. A code which has a size equalto the calculated upper bound may not have been found. However, codes that have a larger size do not exist.</p>

<p>A second way to obtain bounds is a table. In <strong class="pkg">GUAVA</strong>, an extensive table is implemented for linear codes over <span class="SimpleMath">GF(2)</span>, <span class="SimpleMath">GF(3)</span> and <span class="SimpleMath">GF(4)</span>. It contains bounds on the minimum distance for given word length and dimension. It contains entries for word lengths less than or equal to <span class="SimpleMath">257</span>, <span class="SimpleMath">243</span> and <span class="SimpleMath">256</span> for codes over <span class="SimpleMath">GF(2)</span>, <span class="SimpleMath">GF(3)</span> and <span class="SimpleMath">GF(4)</span> respectively. These entries were obtained from Brouwer's tables as of 11 May 2006. For the latest information, please see A. E. Brouwer's tables <a href="chapBib.html#biBBr">[Bro06]</a> on the internet.</p>

<p>Firstly, we describe functions that compute specific upper bounds on the code size (see <code class="func">UpperBoundSingleton</code> (<a href="chap7.html#X8673277C7F6C04C3"><span class="RefLink">7.1-1</span></a>), <code class="func">UpperBoundHamming</code> (<a href="chap7.html#X828095537C91FDFA"><span class="RefLink">7.1-2</span></a>), <code class="func">UpperBoundJohnson</code> (<a href="chap7.html#X82EBFAAB7F5BFD4A"><span class="RefLink">7.1-3</span></a>), <code class="func">UpperBoundPlotkin</code> (<a href="chap7.html#X7A26E2537DFF4409"><span class="RefLink">7.1-4</span></a>), <code class="func">UpperBoundElias</code> (<a href="chap7.html#X86A5A7C67F625A40"><span class="RefLink">7.1-5</span></a>) and <code class="func">UpperBoundGriesmer</code> (<a href="chap7.html#X82366C277E218130"><span class="RefLink">7.1-6</span></a>)).</p>

<p>Next we describe a function that computes <strong class="pkg">GUAVA</strong>'s best upper bound on the code size (see UpperBound (7.1-8)).



<p>Then we describe two functions that compute a lower and upper bound on the minimum distance of a code (see <code class="func">LowerBoundMinimumDistance</code> (<a href="chap7.html#X7FDF54BA81115D88"><span class="RefLink">7.1-9</span></a>) and <code class="func">UpperBoundMinimumDistance</code> (<a href="chap7.html#X7C6A58327BD6B685"><span class="RefLink">7.1-12</span></a>)).</p>

<p>Finally, we describe a function that returns a lower and upper bound on the minimum distance with given parameters and a description of how the bounds were obtained (see <code class="func">BoundsMinimumDistance</code> (<a href="chap7.html#X7B3858B27A9E509A"><span class="RefLink">7.1-13</span></a>)).</p>

<p><a id="X8673277C7F6C04C3" name="X8673277C7F6C04C3"></a></p>

<h5>7.1-1 UpperBoundSingleton</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundSingleton</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">UpperBoundSingleton</code> returns the Singleton bound for a code of length <var class="Arg">n</var>, minimum distance <var class="Arg">d</var> over a field of size <var class="Arg">q</var>. This bound is based on the shortening of codes. By shortening an <span class="SimpleMath">(n, M, d)</spancode <span class="SimpleMath">d-1</span> times, an <span class="SimpleMath">(n-d+1,M,1)</spancode results, with <span class="SimpleMath">M ≤ q^n-d+1</span> (see <code class="func">ShortenedCode</code> (<a href="chap6.html#X81CBEAFF7B9DE6EF"><span class="RefLink">6.1-9</span></a>)). Thus</p>

<p class="pcenter">
M \leq q^{n-d+1}.
</p>

<p>Codes that meet this bound are called <em>maximum distance separable</em> (see <code class="func">IsMDSCode</code> (<a href="chap4.html#X789380D28018EC3F"><span class="RefLink">4.3-7</span></a>)).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundSingleton(4, 3, 5);</span>
25
<span class="GAPprompt">gap></span> <span class="GAPinput">C := ReedSolomonCode(4,3);; Size(C);</span>
25
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMDSCode(C);</span>
true
</pre></div>

<p><a id="X828095537C91FDFA" name="X828095537C91FDFA"></a></p>

<h5>7.1-2 UpperBoundHamming</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundHamming</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The Hamming bound (also known as the <em>sphere packing bound</em>) returns an upper bound on the size of a code of length <var class="Arg">n</var>, minimum distance <var class="Arg">d</var>, over a field of size <var class="Arg">q</var>. The Hamming bound is obtained by dividing the contents of the entire space <span class="SimpleMath">GF(q)^n</span> by the contents of a ball with radius <span class="SimpleMath">⌊(d-1) / 2⌋</span>. As all these balls are disjoint, they can never contain more than the whole vector space.</p>

<p class="pcenter">
M \leq {q^n \over V(n,e)},
</p>

<p>where <span class="SimpleMath">M</span> is the maximum number of codewords and <span class="SimpleMath">V(n,e)</span> is equal to the contents of a ball of radius <span class="SimpleMath">e</span> (see <code class="func">SphereContent</code> (<a href="chap7.html#X85303BAE7BD46D81"><span class="RefLink">7.5-5</span></a>)). This bound is useful for small values of <var class="Arg">d</var>. Codes for which equality holds are called <em>perfect</em> (see <code class="func">IsPerfectCode</code> (<a href="chap4.html#X85E3BD26856424F7"><span class="RefLink">4.3-6</span></a>)).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundHamming( 15, 3, 2 );</span>
2048
<span class="GAPprompt">gap></span> <span class="GAPinput">C := HammingCode( 4, GF(2) );</span>
a linear [15,11,3]1 Hamming (4,2) code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size( C );</span>
2048 
</pre></div>

<p><a id="X82EBFAAB7F5BFD4A" name="X82EBFAAB7F5BFD4A"></a></p>

<h5>7.1-3 UpperBoundJohnson</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundJohnson</code>( <var class="Arg">n</var>, <var class="Arg">d</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The Johnson bound is an improved version of the Hamming bound (see <code class="func">UpperBoundHamming</code> (<a href="chap7.html#X828095537C91FDFA"><span class="RefLink">7.1-2</span></a>)). In addition to the Hamming bound, it takes into account the elements of the space outside the balls of radius <span class="SimpleMath">e</span> around the elements of the code. The Johnson bound only works for binary codes.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundJohnson( 13, 5 );</span>
77
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundHamming( 13, 5, 2);    # in this case the Johnson bound is better</span>
89 
</pre></div>

<p><a id="X7A26E2537DFF4409" name="X7A26E2537DFF4409"></a></p>

<h5>7.1-4 UpperBoundPlotkin</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundPlotkin</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The function <code class="code">UpperBoundPlotkin</code> 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:</p>

<p class="pcenter">
M \leq {d \over {d-(1-1/q)n}},
</p>

<p>where <span class="SimpleMath">M</span> is the maximum number of codewords. In this case, <var class="Arg">d</var> must be larger than <span class="SimpleMath">(1-1/q)n</span>, but by shortening the code, the case <span class="SimpleMath">d ⟨ (1-1/q)n</span> is covered.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundPlotkin( 15, 7, 2 );</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">C := 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">Size(C);</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">WeightDistribution(C);</span>
[ 1, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 1 ]
</pre></div>

<p><a id="X86A5A7C67F625A40" name="X86A5A7C67F625A40"></a></p>

<h5>7.1-5 UpperBoundElias</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundElias</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The Elias bound is an improvement of the Plotkin bound (see <code class="func">UpperBoundPlotkin</code> (<a href="chap7.html#X7A26E2537DFF4409"><span class="RefLink">7.1-4</span></a>)) for large codes. Subcodes are used to decrease the size of the code, in this case the subcode of all codewords within a certain ball. This bound is useful for large codes with relatively small minimum distances.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundPlotkin( 16, 3, 2 );</span>
12288
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundElias( 16, 3, 2 );</span>
10280
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundElias( 20, 10, 3 );</span>
16255
</pre></div>

<p><a id="X82366C277E218130" name="X82366C277E218130"></a></p>

<h5>7.1-6 UpperBoundGriesmer</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundGriesmer</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var)</td><td class="tdright">( function )</td></tr></table></div>
<p>The Griesmer bound is valid only for linear codes. It is obtained by counting the number of equal symbols in each row of the generator matrix of the code. By omitting the coordinates in which all rows have a zero, a smaller code results. The Griesmer bound is obtained by repeating this process until a trivial code is left in the end.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundGriesmer( 13, 5, 2 );</span>
64
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundGriesmer( 18, 9, 2 );       # the maximum number of words for a linear code is 8</span>
8
<span class="GAPprompt">gap></span> <span class="GAPinput">Size( PuncturedCode( HadamardCode( 20, 1 ) ) );       # this non-linear code has 20 elements </span>
20
</pre></div>

<p><a id="X8301FA9F7C6C7445" name="X8301FA9F7C6C7445"></a></p>

<h5>7.1-7 IsGriesmerCode</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGriesmerCode</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">IsGriesmerCode</code> returns `true' if a linear code C is a Griesmer code, and `false' otherwise. A code is called <em>Griesmer</em> if its length satisfies</p>

<p class="pcenter">
n = g[k,d] = \sum_{i=0}^{k-1} \lceil \frac{d}{q^i} \rceil.
</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGriesmerCode( HammingCode( 3, GF(2) ) );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGriesmerCode( BCHCode( 17, 2, GF(2) ) );</span>
false
</pre></div>

<p><a id="X7A5CB74485184FEE" name="X7A5CB74485184FEE"></a></p>

<h5>7.1-8 UpperBound</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBound</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">UpperBound</code> returns the best known upper bound <span class="SimpleMath">A(n,d)</span> for the size of a code of length <var class="Arg">n</var>, minimum distance <var class="Arg">d</var> over a field of size <var class="Arg">q</var>. The function <code class="code">UpperBound</code> first checks for trivial cases (like <span class="SimpleMath">d=1</span> or <span class="SimpleMath">n=d</span>), and if the value is in the built-in table. Then it calculates the minimum value of the upper bound using the methods of Singleton (see <code class="func">UpperBoundSingleton</code> (<a href="chap7.html#X8673277C7F6C04C3"><span class="RefLink">7.1-1</span></a>)), Hamming (see <code class="func">UpperBoundHamming</code> (<a href="chap7.html#X828095537C91FDFA"><span class="RefLink">7.1-2</span></a>)), Johnson (see <code class="func">UpperBoundJohnson</code> (<a href="chap7.html#X82EBFAAB7F5BFD4A"><span class="RefLink">7.1-3</span></a>)), Plotkin (see <code class="func">UpperBoundPlotkin</code> (<a href="chap7.html#X7A26E2537DFF4409"><span class="RefLink">7.1-4</span></a>)) and Elias (see <code class="func">UpperBoundElias</code> (<a href="chap7.html#X86A5A7C67F625A40"><span class="RefLink">7.1-5</span></a>)). If the code is binary, <span class="SimpleMath">A(n, 2⋅ ℓ-1) = A(n+1,2⋅ ℓ)</span>, so the <code class="code">UpperBound</code> takes the minimum of the values obtained from all methods for the parameters <span class="SimpleMath">(n, 2⋅ℓ-1)</span> and <span class="SimpleMath">(n+1, 2⋅ ℓ)</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBound( 10, 3, 2 );</span>
85
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBound( 25, 9, 8 );</span>
1211778792827540
</pre></div>

<p><a id="X7FDF54BA81115D88" name="X7FDF54BA81115D88"></a></p>

<h5>7.1-9 LowerBoundMinimumDistance</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundMinimumDistance</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>In this form, <code class="code">LowerBoundMinimumDistance</code> returns a lower bound for the minimum distance of code <var class="Arg">C</var>.</p>

<p>This command can also be called using the syntax <code class="code">LowerBoundMinimumDistance( n, k, F )</code>. In this form, <code class="code">LowerBoundMinimumDistance</code> returns a lower bound for the minimum distance of the best known linear code of length <var class="Arg">n</var>, dimension <var class="Arg">k</var> over field <var class="Arg">F</var>. It uses the mechanism explained in section <a href="chap7.html#X7B3858B27A9E509A"><span class="RefLink">7.1-13</span></a>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C := BCHCode( 45, 7 );</span>
a cyclic [45,23,7..9]6..16 BCH code, delta=7, b=1 over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundMinimumDistance( C );     # designed distance is lower bound for minimum distance </span>
7
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundMinimumDistance( 45, 23, GF(2) );</span>
10
</pre></div>

<p><a id="X7CF15D2084499869" name="X7CF15D2084499869"></a></p>

<h5>7.1-10 LowerBoundGilbertVarshamov</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundGilbertVarshamov</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This is the lower bound on the size of a linear code due (independently) to Gilbert and Varshamov. It says that for each <var class="Arg">n</var> and <var class="Arg">d</var>, there exists a linear code having length <span class="SimpleMath">n</span> and minimum distance <span class="SimpleMath">d</span> at least of size <span class="SimpleMath">q^k</span>, where <span class="SimpleMath">k</span> is the largest integer such that <span class="SimpleMath">q^k < q^n/</span><code class="code">SphereContent</code><span class="SimpleMath">(n-1,d-2,GF(q))</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundGilbertVarshamov(24,8,2);</span>
64
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundGilbertVarshamov(7,3,2);</span>
16
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundMinimumDistance(7,4,2);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundGilbertVarshamov(3,3,2);</span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundMinimumDistance(3,3,2);</span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundGilbertVarshamov(25,10,2);</span>
16
</pre></div>

<p><a id="X8217D830871286D8" name="X8217D830871286D8"></a></p>

<h5>7.1-11 LowerBoundSpherePacking</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundSpherePacking</code>( <var class="Arg">n</var>, <var class="Arg">d</var>, <var class="Arg">q</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This is the (weaker) Gilbert-Varshamov bound valid for unrestricted codes over an alphabet of size <var class="Arg">q</var> (where <var class="Arg">q</var> is an integer > 1). It says that for each <var class="Arg">n</var> and <var class="Arg">r</var>, there exists an unrestricted code at least of size <span class="SimpleMath">q^n/</span><code class="code">SphereContent</code><span class="SimpleMath">(n,d,GF(q))</span> minimum distance <span class="SimpleMath">d</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundSpherePacking(3,2,2);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundSpherePacking(3,3,2);</span>
1
</pre></div>

<p><a id="X7C6A58327BD6B685" name="X7C6A58327BD6B685"></a></p>

<h5>7.1-12 UpperBoundMinimumDistance</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundMinimumDistance</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>In this form, <code class="code">UpperBoundMinimumDistance</code> returns an upper bound for the minimum distance of code <var class="Arg">C</var>. For unrestricted codes, it just returns the word length. For linear codes, it takes the minimum of the possibly known value from the method of construction, the weight of the generators, and the value from the table (see <a href="chap7.html#X7B3858B27A9E509A"><span class="RefLink">7.1-13</span></a>).</p>

<p>This command can also be called using the syntax <code class="code">UpperBoundMinimumDistance( n, k, F )</code>. In this form, <code class="code">UpperBoundMinimumDistance</code> returns an upper bound for the minimum distance of the best known linear code of length <var class="Arg">n</var>, dimension <var class="Arg">k</var> over field <var class="Arg">F</var>. It uses the mechanism explained in section <a href="chap7.html#X7B3858B27A9E509A"><span class="RefLink">7.1-13</span></a>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C := BCHCode( 45, 7 );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundMinimumDistance( C );</span>
9
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundMinimumDistance( 45, 23, GF(2) );</span>
11
</pre></div>

<p><a id="X7B3858B27A9E509A" name="X7B3858B27A9E509A"></a></p>

<h5>7.1-13 BoundsMinimumDistance</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BoundsMinimumDistance</code>( <var class="Arg">n</var>, <var class="Arg">k</var>, <var class="Arg">F</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The function <code class="code">BoundsMinimumDistance</code> calculates a lower and upper bound for the minimum distance of an optimal linear code with word length <var class="Arg">n</var>, dimension <var class="Arg">k</var> over field <var class="Arg">F</var>. The function returns a record with the two bounds and an explanation for each bound. The function <code class="code">Display</code> can be used to show the explanations.</p>

<p>The values for the lower and upper bound are obtained from a table. <strong class="pkg">GUAVA</strong> has tables containing lower and upper bounds for <span class="SimpleMath">q=2 (n ≤ 257), 3 (n ≤ 243), 4 (n ≤ 256)</span>. (Current as of 11 May 2006.) These tables were derived from the table of Brouwer. (See <a href="chapBib.html#biBBr">[Bro06]</a>, <span class="URL"><a href="https://www.codetables.de">https://www.codetables.de</a></span> for the most recent data.) For codes over other fields and for larger word lengths, trivial bounds are used.</p>

<p>The resulting record can be used in the function <code class="code">BestKnownLinearCode</code> (see <code class="func">BestKnownLinearCode</code> (<a href="chap5.html#X871508567CB34D96"><span class="RefLink">5.2-14</span></a>)) to construct a code with minimum distance equal to the lower bound.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">bounds := BoundsMinimumDistance( 7, 3 );; DisplayBoundsInfo( bounds ); # The lower bound is equal to the upper bound, so a code with these parameters is optimal.</span>
an optimal linear [7,3,d] code over GF(2) has d=4
------------------------------------------------------------------------------
Lb(7,3)=4, by shortening of:
Lb(8,4)=4, by the u|u+v construction applied to C1 [4,3,2] and C2 [4,1,4]: 
Lb(4,3)=2, dual of the repetition code
Lb(4,1)=4, repetition code
------------------------------------------------------------------------------
Ub(7,3)=4, by the Griesmer bound
<span class="GAPprompt">gap></span> <span class="GAPinput">C := BestKnownLinearCode( bounds );; Display( C );</span>
a linear [7,3,4]2..3 shortened code of
a linear [8,4,4]2 U|U+V construction code of
U: a cyclic [4,3,2]1 dual code of
   a cyclic [4,1,4]2 repetition code over GF(2)
V: a cyclic [4,1,4]2 repetition code over GF(2)
</pre></div>

<p><a id="X817D0A647D3331EB" name="X817D0A647D3331EB"></a></p>

<h4>7.2 <span class="Heading">
Covering radius bounds on codes
</span></h4>

<p><a id="X8320D1C180A1AAAD" name="X8320D1C180A1AAAD"></a></p>

<h5>7.2-1 BoundsCoveringRadius</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BoundsCoveringRadius</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">BoundsCoveringRadius</code> returns a list of integers. The first entry of this list is the maximum of some lower bounds for the covering radius of <var class="Arg">C</var>, the last entry the minimum of some upper bounds of <var class="Arg">C</var>.</p>

<p>If the covering radius of <var class="Arg">C</var> is known, a list of length 1 is returned. <code class="code">BoundsCoveringRadius</code> makes use of the functions <code class="code">GeneralLowerBoundCoveringRadius</code> and <code class="code">GeneralUpperBoundCoveringRadius</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">BoundsCoveringRadius( BCHCode( 17, 3, GF(2) ) );</span>
[ 3, 4 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">BoundsCoveringRadius( HammingCode( 5, GF(2) ) );</span>
[ 1 ]
</pre></div>

<p><a id="X7881E03E812140F4" name="X7881E03E812140F4"></a></p>

<h5>7.2-2 IncreaseCoveringRadiusLowerBound</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IncreaseCoveringRadiusLowerBound</code>( <var class="Arg">C</var>[, <var class="Arg">stopdist</var>][, <var class="Arg">startword</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">IncreaseCoveringRadiusLowerBound</code> tries to increase the lower bound of the covering radius of <var class="Arg">C</var>. It does this by means of a probabilistic algorithm. This algorithm takes a random word in <span class="SimpleMath">GF(q)^n</span> (or <var class="Arg">startword</var> if it is specified), and, by changing random coordinates, tries to get as far from <var class="Arg">C</var> as possible. If changing a coordinate finds a word that has a larger distance to the code than the previous one, the change is made permanent, and the algorithm starts all over again. If changing a coordinate does not find a coset leader that is further away from thcode, then the change is made permanent with a chance of 1 in 100, if it gets the word closer to the code, or with a chance of 1 in 10, if the word stays at the same distance. Otherwise, the algorithm starts again with the same word as before.</p>

<p>If the algorithm did not allow changes that decrease the distance to the code, it might get stuck in a sub-optimal situation (the coset leader corresponding to such a situation - i.e. no coordinate of this coset leader can be changed in such a way that we get at a larger distance from the code - is called an <em>orphan</em>).</p>

<p>If the algorithm finds a word that has distance <var class="Arg">stopdist</var> to the code, it ends and returns that word, which can be used for further investigations.</p>

<p>The variable <var class="Arg">InfoCoveringRadius</var> can be set to <var class="Arg">Print</var> to print the maximum distance reached so far every 1000 runs. The algorithm can be interrupted with <strong class="button">ctrl-C</strong>, allowing the user to look at the word that is currently being examined (called `current'), or to change the chances that the new word is made permanent (these are called `staychance' and `downchance'). If one of these variables is i, then it corresponds with a i in 100 chance.



<p>At the moment, the algorithm is only useful for codes with small dimension, where small means that the elements of the code fit in the memory. It works with larger codes, however, but when you use it for codes with large dimension, you should be <em>very</em> patient. If running the algorithm quits GAP (due to memory problems), you can change the global variable <var class="Arg">CRMemSize</var> to a lower value. This might cause the algorithm to run slower, but without quitting GAP. The only way to find out the best value of <var class="Arg">CRMemSize</var> is by experimenting.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">IncreaseCoveringRadiusLowerBound(C,10);</span>
Number of runs: 1000  best distance so far: 3
Number of runs: 2000  best distance so far: 3
Number of changes: 100
Number of runs: 3000  best distance so far: 3
Number of runs: 4000  best distance so far: 3
Number of runs: 5000  best distance so far: 3
Number of runs: 6000  best distance so far: 3
Number of runs: 7000  best distance so far: 3
Number of changes: 200
Number of runs: 8000  best distance so far: 3
Number of runs: 9000  best distance so far: 3
Number of runs: 10000  best distance so far: 3
Number of changes: 300
Number of runs: 11000  best distance so far: 3
Number of runs: 12000  best distance so far: 3
Number of runs: 13000  best distance so far: 3
Number of changes: 400
Number of runs: 14000  best distance so far: 3
user interrupt at... 
#
# used ctrl-c to break out of execution
#
... called from 
IncreaseCoveringRadiusLowerBound( code, -1, current ) called from
 function( arguments ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
<span class="GAPbrkprompt">brk></span> <span class="GAPinput">current;</span>
[ Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, 0*Z(2), Z(2)^0, 0*Z(2), Z(2)^0 ]
<span class="GAPbrkprompt">brk></span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
</pre></div>

<p><a id="X7AD9F1D27C52BC0F" name="X7AD9F1D27C52BC0F"></a></p>

<h5>7.2-3 ExhaustiveSearchCoveringRadius</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ExhaustiveSearchCoveringRadius</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">ExhaustiveSearchCoveringRadius</code> does an exhaustive search to find the covering radius of <var class="Arg">C</var>. Every time a coset leader of a coset with weight <span class="SimpleMath">w</span> is found, the function tries to find a coset leader of a coset with weight <span class="SimpleMath">w+1</span>. It does this by enumerating all words of weight <span class="SimpleMath">w+1</span>, and checking whether a word is a coset leader. The start weight is the current known lower bound on the covering radius.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">ExhaustiveSearchCoveringRadius(C);</span>
Trying 3 ...
[ 3 .. 5 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
</pre></div>

<p><a id="X85D671F4824B4B0C" name="X85D671F4824B4B0C"></a></p>

<h5>7.2-4 GeneralLowerBoundCoveringRadius</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneralLowerBoundCoveringRadius</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">GeneralLowerBoundCoveringRadius</code> returns a lower bound on the covering radius of <var class="Arg">C</var>. It uses as many functions which names start with <code class="code">LowerBoundCoveringRadius</code> as possible to find the best known lower bound (at least that <strong class="pkg">GUAVA</strong> knows of) together with tables for the covering radius of binary linear codes with length not greater than <span class="SimpleMath">64</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">GeneralLowerBoundCoveringRadius(C);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
</pre></div>

<p><a id="X8638F5A67D6E50C1" name="X8638F5A67D6E50C1"></a></p>

<h5>7.2-5 GeneralUpperBoundCoveringRadius</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneralUpperBoundCoveringRadius</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">GeneralUpperBoundCoveringRadius</code> returns an upper bound on the covering radius of <var class="Arg">C</var>. It uses as many functions which names start with <code class="code">UpperBoundCoveringRadius</code> as possible to find the best known upper bound (at least that <strong class="pkg">GUAVA</strong> knows of).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">GeneralUpperBoundCoveringRadius(C);</span>
4
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
</pre></div>

<p><a id="X7E7FBCC87D5562AB" name="X7E7FBCC87D5562AB"></a></p>

<h5>7.2-6 LowerBoundCoveringRadiusSphereCovering</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundCoveringRadiusSphereCovering</code>( <var class="Arg">n</var>, <var class="Arg">M</var>[, <var class="Arg">F</var>], <var class="Arg">false</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command can also be called using the syntax <code class="code">LowerBoundCoveringRadiusSphereCovering( n, r, [F,] true )</code>. If the last argument of <code class="code">LowerBoundCoveringRadiusSphereCovering</code> is <var class="Arg">false</var>, then it returns a lower bound for the covering radius of a code of size <var class="Arg">M</var> and length <var class="Arg">n</var>. Otherwise, it returns a lower bound for the size of a code of length <var class="Arg">n</var> and covering radius <var class="Arg">r</var>.</p>

<p><var class="Arg">F</var> is the field over which the code is defined. If <var class="Arg">F</var> is omitted, it is assumed that the code is over <span class="SimpleMath">GF(2)</span>. The bound is computed according to the sphere covering bound:</p>

<p class="pcenter">
M \cdot V_q(n,r) \geq q^n
</p>

<p>where <span class="SimpleMath">V_q(n,r)</span> is the size of a sphere of radius <span class="SimpleMath">r</span> in <span class="SimpleMath">GF(q)^n</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(C);</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusSphereCovering(10,32,GF(2),false);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusSphereCovering(10,3,GF(2),true);</span>
6
</pre></div>

<p><a id="X85E20C518360AB70" name="X85E20C518360AB70"></a></p>

<h5>7.2-7 LowerBoundCoveringRadiusVanWee1</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundCoveringRadiusVanWee1</code>( <var class="Arg">n</var>, <var class="Arg">M</var>[, <var class="Arg">F</var>], <var class="Arg">false</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command can also be called using the syntax <code class="code">LowerBoundCoveringRadiusVanWee1( n, r, [F,] true )</code>. If the last argument of <code class="code">LowerBoundCoveringRadiusVanWee1</code> is <var class="Arg">false</var>, then it returns a lower bound for the covering radius of a code of size <var class="Arg">M</var> and length <var class="Arg">n</var>. Otherwise, it returns a lower bound for the size of a code of length <var class="Arg">n</var> and covering radius <var class="Arg">r</var>.</p>

<p><var class="Arg">F</var> is the field over which the code is defined. If <var class="Arg">F</var> is omitted, it is assumed that the code is over <span class="SimpleMath">GF(2)</span>.</p>

<p>The Van Wee bound is an improvement of the sphere covering bound:</p>

<p class="pcenter">
M \cdot \left\{ V_q(n,r) -
\frac{{n \choose r}}{\lceil\frac{n-r}{r+1}\rceil}
\left(\left\lceil\frac{n+1}{r+1}\right\rceil - \frac{n+1}{r+1}\right)
\right\} \geq q^n
</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(C);</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusVanWee1(10,32,GF(2),false);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusVanWee1(10,3,GF(2),true);</span>
6
</pre></div>

<p><a id="X7C72994A825228E7" name="X7C72994A825228E7"></a></p>

<h5>7.2-8 LowerBoundCoveringRadiusVanWee2</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundCoveringRadiusVanWee2</code>( <var class="Arg">n</var>, <var class="Arg">M</var>, <var class="Arg">false</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command can also be called using the syntax <code class="code">LowerBoundCoveringRadiusVanWee2( n, r [,true] )</code>. If the last argument of <code class="code">LowerBoundCoveringRadiusVanWee2</code> is <var class="Arg">false</var>, then it returns a lower bound for the covering radius of a code of size <var class="Arg">M</var> and length <var class="Arg">n</var>. Otherwise, it returns a lower bound for the size of a code of length <var class="Arg">n</var> and covering radius <var class="Arg">r</var>.</p>

<p>This bound only works for binary codes. It is based on the following inequality:</p>

<p class="pcenter">
M \cdot \frac{\left( \left( V_2(n,2) - \frac{1}{2}(r+2)(r-1) \right)
V_2(n,r) + \varepsilon
V_2(n,r-2) \right)}
{(V_2(n,2) - \frac{1}{2}(r+2)(r-1) + \varepsilon)}
\geq 2^n,
</p>

<p>where</p>

<p class="pcenter">
\varepsilon = {r+2 \choose 2} \left\lceil
{n-r+1 \choose 2} / {r+2 \choose 2} \right\rceil
- {n-r+1 \choose 2}.
</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(C);</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusVanWee2(10,32,false);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusVanWee2(10,3,true);</span>
7
</pre></div>

<p><a id="X7F95362485759ACB" name="X7F95362485759ACB"></a></p>

<h5>7.2-9 LowerBoundCoveringRadiusCountingExcess</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundCoveringRadiusCountingExcess</code>( <var class="Arg">n</var>, <var class="Arg">M</var>, <var class="Arg">false</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command can also be called with <code class="code">LowerBoundCoveringRadiusCountingExcess( n, r [,true] )</code>. If the last argument of <code class="code">LowerBoundCoveringRadiusCountingExcess</code> is <var class="Arg">false</var>, then it returns a lower bound for the covering radius of a code of size <var class="Arg">M</var> and length <var class="Arg">n</var>. Otherwise, it returns a lower bound for the size of a code of length <var class="Arg">n</var> and covering radius <var class="Arg">r</var>.</p>

<p>This bound only works for binary codes. It is based on the following inequality:</p>

<p class="pcenter">
M \cdot \left( \rho V_2(n,r) + \varepsilon V_2(n,r-1) \right) \geq
(\rho + \varepsilon) 2^n,
</p>

<p>where</p>

<p class="pcenter">
\varepsilon = (r+1) \left\lceil\frac{n+1}{r+1}\right\rceil - (n+1)
</p>

<p>and</p>

<p class="pcenter">
\rho = \left\{
\begin{array}{l}
n-3+\frac{2}{n}, \ \ \  \ \ \  {\rm if}\   r = 2\\
n-r-1  ,        \ \ \  \ \ \   {\rm if}\   r \geq 3 .
\end{array}
\right.
</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(C);</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusCountingExcess(10,32,false);</span>
0
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusCountingExcess(10,3,true);</span>
7
</pre></div>

<p><a id="X829C14A383B5BF59" name="X829C14A383B5BF59"></a></p>

<h5>7.2-10 LowerBoundCoveringRadiusEmbedded1</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundCoveringRadiusEmbedded1</code>( <var class="Arg">n</var>, <var class="Arg">M</var>, <var class="Arg">false</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command can also be called with <code class="code">LowerBoundCoveringRadiusEmbedded1( n, r [,true] )</code>. If the last argument of <code class="code">LowerBoundCoveringRadiusEmbedded1</code> is 'false', then it returns a lower bound for the covering radius of a code of size <var class="Arg">M</var> and length <var class="Arg">n</var>. Otherwise, it returns a lower bound for the size of a code of length <var class="Arg">n</var> and covering radius <var class="Arg">r</var>.</p>

<p>This bound only works for binary codes. It is based on the following inequality:</p>

<p class="pcenter">
M \cdot \left( V_2(n,r) - {2r \choose r} \right) \geq
2^n - A( n, 2r+1 ) {2r \choose r},
</p>

<p>where <span class="SimpleMath">A(n,d)</span> denotes the maximal cardinality of a (binary) code of length <span class="SimpleMath">n</span> and minimum distance <span class="SimpleMath">d</span>. The function <code class="code">UpperBound</code> is used to compute this value.</p>

<p>Sometimes <code class="code">LowerBoundCoveringRadiusEmbedded1</code> is better than <code class="code">LowerBoundCoveringRadiusEmbedded2</code>, sometimes it is the other way around.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(10,5,GF(2));</span>
a  [10,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(C);</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusEmbedded1(10,32,false);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusEmbedded1(10,3,true);</span>
7
</pre></div>

<p><a id="X7B0C81B88604C448" name="X7B0C81B88604C448"></a></p>

<h5>7.2-11 LowerBoundCoveringRadiusEmbedded2</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundCoveringRadiusEmbedded2</code>( <var class="Arg">n</var>, <var class="Arg">M</var>, <var class="Arg">false</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command can also be called with <code class="code">LowerBoundCoveringRadiusEmbedded2( n, r [,true] )</code>. If the last argument of <code class="code">LowerBoundCoveringRadiusEmbedded2</code> is 'false', then it returns a lower bound for the covering radius of a code of size <var class="Arg">M</var> and length <var class="Arg">n</var>. Otherwise, it returns a lower bound for the size of a code of length <var class="Arg">n</var> and covering radius <var class="Arg">r</var>.</p>

<p>This bound only works for binary codes. It is based on the following inequality:</p>

<p class="pcenter">
M \cdot \left( V_2(n,r) - \frac{3}{2} {2r \choose r} \right) \geq
2^n - 2A( n, 2r+1 ) {2r \choose r},
</p>

<p>where <span class="SimpleMath">A(n,d)</span> denotes the maximal cardinality of a (binary) code of length <span class="SimpleMath">n</span> and minimum distance <span class="SimpleMath">d</span>. The function <code class="code">UpperBound</code> is used to compute this value.</p>

<p>Sometimes <code class="code">LowerBoundCoveringRadiusEmbedded1</code> is better than <code class="code">LowerBoundCoveringRadiusEmbedded2</code>, sometimes it is the other way around.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(15,5,GF(2));</span>
a  [15,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(C);</span>
32
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
6
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusEmbedded2(10,32,false);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusEmbedded2(10,3,true);</span>
7
</pre></div>

<p><a id="X7D27F6E27B9A0D35" name="X7D27F6E27B9A0D35"></a></p>

<h5>7.2-12 LowerBoundCoveringRadiusInduction</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LowerBoundCoveringRadiusInduction</code>( <var class="Arg">n</var>, <var class="Arg">r</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">LowerBoundCoveringRadiusInduction</code> returns a lower bound for the size of a code with length <var class="Arg">n</var> and covering radius <var class="Arg">r</var>.</p>

<p>If <span class="SimpleMath">n = 2r+2</span> and <span class="SimpleMath">r ≥ 1</span>, the returned value is <span class="SimpleMath">4</span>.</p>

<p>If <span class="SimpleMath">n = 2r+3</span> and <span class="SimpleMath">r ≥ 1</span>, the returned value is <span class="SimpleMath">7</span>.</p>

<p>If <span class="SimpleMath">n = 2r+4</span> and <span class="SimpleMath">r ≥ 4</span>, the returned value is <span class="SimpleMath">8</span>.</p>

<p>Otherwise, <span class="SimpleMath">0</span> is returned.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(15,5,GF(2));</span>
a  [15,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
5
<span class="GAPprompt">gap></span> <span class="GAPinput">LowerBoundCoveringRadiusInduction(15,6);</span>
7
</pre></div>

<p><a id="X80F8DFAD7D67CBEC" name="X80F8DFAD7D67CBEC"></a></p>

<h5>7.2-13 UpperBoundCoveringRadiusRedundancy</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundCoveringRadiusRedundancy</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">UpperBoundCoveringRadiusRedundancy</code> returns the redundancy of <var class="Arg">C</var> as an upper bound for the covering radius of <var class="Arg">C</var>. <var class="Arg">C</var> must be a linear code.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(15,5,GF(2));</span>
a  [15,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
5
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundCoveringRadiusRedundancy(C);</span>
10
</pre></div>

<p><a id="X832847A17FD0D142" name="X832847A17FD0D142"></a></p>

<h5>7.2-14 UpperBoundCoveringRadiusDelsarte</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundCoveringRadiusDelsarte</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">UpperBoundCoveringRadiusDelsarte</code> returns an upper bound for the covering radius of <var class="Arg">C</var>. This upper bound is equal to the external distance of <var class="Arg">C</var>, this is the minimum distance of the dual code, if <var class="Arg">C</var> is a linear code.</p>

<p>This is described in Theorem 11.3.3 of <a href="chapBib.html#biBHP03">[HP03]</a>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(15,5,GF(2));</span>
a  [15,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
5
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundCoveringRadiusDelsarte(C);</span>
13
</pre></div>

<p><a id="X86F10D9E79AB8796" name="X86F10D9E79AB8796"></a></p>

<h5>7.2-15 UpperBoundCoveringRadiusStrength</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundCoveringRadiusStrength</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">UpperBoundCoveringRadiusStrength</code> returns an upper bound for the covering radius of <var class="Arg">C</var>.</p>

<p>First the code is punctured at the zero coordinates (i.e. the coordinates where all codewords have a zero). If the remaining code has <em>strength</em> 1 (i.e. each coordinate contains each element of the field an equal number of times), then it returns <span class="SimpleMath">fracq-1qm + (n-m)</span> (where <span class="SimpleMath">q</span> is the size of the field and <span class="SimpleMath">m</span> is the length of punctured code), otherwise it returns <span class="SimpleMath">n</span>. This bound works for all codes.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">C:=RandomLinearCode(15,5,GF(2));</span>
a  [15,5,?] randomly generated code over GF(2)
<span class="GAPprompt">gap></span> <span class="GAPinput">CoveringRadius(C);</span>
5
<span class="GAPprompt">gap></span> <span class="GAPinput">UpperBoundCoveringRadiusStrength(C);</span>
7
</pre></div>

<p><a id="X8585C6A982489FC3" name="X8585C6A982489FC3"></a></p>

<h5>7.2-16 UpperBoundCoveringRadiusGriesmerLike</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UpperBoundCoveringRadiusGriesmerLike</code>( <var class="Arg">C</var> )</td><td class="tdright">( function )</td></tr></table></div>
--> --------------------

--> maximum size reached

--> --------------------

100%


¤ Dauer der Verarbeitung: 0.46 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.