<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Yet Another Mathblog &#187; sage</title>
	<atom:link href="http://wdjoyner.wordpress.com/tag/sage/feed" rel="self" type="application/rss+xml" />
	<link>http://wdjoyner.wordpress.com</link>
	<description></description>
	<pubDate>Fri, 04 Jul 2008 12:27:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>The Assmus-Mattson Theorem, Golay codes, and Mathieu groups</title>
		<link>http://wdjoyner.wordpress.com/2008/05/25/the-assmus-mattson-theorem-golay-codes-and-mathieu-groups/</link>
		<comments>http://wdjoyner.wordpress.com/2008/05/25/the-assmus-mattson-theorem-golay-codes-and-mathieu-groups/#comments</comments>
		<pubDate>Sun, 25 May 2008 20:50:07 +0000</pubDate>
		<dc:creator>wdjoyner</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[coding theory]]></category>

		<category><![CDATA[math]]></category>

		<category><![CDATA[sage]]></category>

		<guid isPermaLink="false">http://wdjoyner.wordpress.com/?p=22</guid>
		<description><![CDATA[A block design is a pair , where  is a non-empty finite set of  elements called points, and  is a non-empty finite multiset of size  whose elements are called blocks, such that each block is a non-empty finite multiset of  points. A design without repeated blocks is called a simple [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A <strong>block design</strong> is a pair <img src='http://l.wordpress.com/latex.php?latex=%28X%2CB%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(X,B)' title='(X,B)' class='latex' />, where <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' /> is a non-empty finite set of <img src='http://l.wordpress.com/latex.php?latex=v%3E0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='v&gt;0' title='v&gt;0' class='latex' /> elements called <strong>points</strong>, and <img src='http://l.wordpress.com/latex.php?latex=B&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='B' title='B' class='latex' /> is a non-empty finite multiset of size <img src='http://l.wordpress.com/latex.php?latex=b&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='b' title='b' class='latex' /> whose elements are called <strong>blocks</strong>, such that each block is a non-empty finite multiset of <img src='http://l.wordpress.com/latex.php?latex=k&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k' title='k' class='latex' /> points. A design without repeated blocks is called a <strong>simple block design</strong>. If every subset of points of size <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' /> is contained in exactly <img src='http://l.wordpress.com/latex.php?latex=%5Clambda&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\lambda' title='\lambda' class='latex' /> blocks the the block design is called a  <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' />&#8211;<img src='http://l.wordpress.com/latex.php?latex=%28v%2Ck%2C%5Clambda%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(v,k,\lambda)' title='(v,k,\lambda)' class='latex' /><strong> design</strong> (or simply a <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' /><strong>-design</strong> when the parameters are not specfied). When <img src='http://l.wordpress.com/latex.php?latex=%5Clambda+%3D+1&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\lambda = 1' title='\lambda = 1' class='latex' /> then the block design is called a <img src='http://l.wordpress.com/latex.php?latex=S%28t%2Ck%2Cv%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='S(t,k,v)' title='S(t,k,v)' class='latex' /><strong> Steiner system</strong>.</p>
<p>Let <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' /> be an [<img src='http://l.wordpress.com/latex.php?latex=n%2Ck%2Cd&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n,k,d' title='n,k,d' class='latex' />] code and let <img src='http://l.wordpress.com/latex.php?latex=C_i+%3D+%5C%7B+c+%5Cin+C%5C+%7C%5C+wt%28c%29+%3D+i%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C_i = \{ c \in C\ |\ wt(c) = i\}' title='C_i = \{ c \in C\ |\ wt(c) = i\}' class='latex' /> denote the <strong>weight <img src='http://l.wordpress.com/latex.php?latex=i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i' title='i' class='latex' /> subset</strong> of codewords of weight <img src='http://l.wordpress.com/latex.php?latex=i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i' title='i' class='latex' />. For each codeword <img src='http://l.wordpress.com/latex.php?latex=c%5Cin+C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='c\in C' title='c\in C' class='latex' />, let <img src='http://l.wordpress.com/latex.php?latex=supp%28c%29%3D%5C%7Bi%5C+%7C%5C+c_i%5Cnot%3D+0%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='supp(c)=\{i\ |\ c_i\not= 0\}' title='supp(c)=\{i\ |\ c_i\not= 0\}' class='latex' /> denote the <strong>support</strong> of the codeword.</p>
<p>The first example below means that the binary [<img src='http://l.wordpress.com/latex.php?latex=24%2C12%2C8&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='24,12,8' title='24,12,8' class='latex' />]-code <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' /> has the property that the (support of the) codewords of weight 8 (resp, 12, 16) form a 5-design.</p>
<p>Example: Let $C$ denote the extended binary <a href="http://en.wikipedia.org/wiki/Marcel_J._E._Golay">Golay</a> code of length <img src='http://l.wordpress.com/latex.php?latex=24&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='24' title='24' class='latex' />. This is a self-dual [<img src='http://l.wordpress.com/latex.php?latex=24%2C12%2C8&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='24,12,8' title='24,12,8' class='latex' />]-code. The set <img src='http://l.wordpress.com/latex.php?latex=X_8+%3D+%5C%7Bsupp%28c%29%5C+%7C%5C+c+%5Cin+C_8%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X_8 = \{supp(c)\ |\ c \in C_8\}' title='X_8 = \{supp(c)\ |\ c \in C_8\}' class='latex' /> is a <img src='http://l.wordpress.com/latex.php?latex=5-%2824%2C+8%2C+1%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='5-(24, 8, 1)' title='5-(24, 8, 1)' class='latex' /> design; <img src='http://l.wordpress.com/latex.php?latex=X_%7B12%7D+%3D+%5C%7Bsupp%28c%29%5C+%7C%5C+c+%5Cin+C_%7B12%7D%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X_{12} = \{supp(c)\ |\ c \in C_{12}\}' title='X_{12} = \{supp(c)\ |\ c \in C_{12}\}' class='latex' /> is a <img src='http://l.wordpress.com/latex.php?latex=5-%2824%2C+12%2C+48%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='5-(24, 12, 48)' title='5-(24, 12, 48)' class='latex' /> design;and, <img src='http://l.wordpress.com/latex.php?latex=X_%7B16%7D+%3D+%5C%7Bsupp%28c%29%5C+%7C%5C+c+%5Cin+C_%7B16%7D%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X_{16} = \{supp(c)\ |\ c \in C_{16}\}' title='X_{16} = \{supp(c)\ |\ c \in C_{16}\}' class='latex' /> is a <img src='http://l.wordpress.com/latex.php?latex=5-%2824%2C+16%2C+78%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='5-(24, 16, 78)' title='5-(24, 16, 78)' class='latex' /> design.</p>
<p>This is a consequence of the following theorem of Assmus and Mattson.</p>
<p><strong>Assmus and Mattson Theorem</strong> (section 8.4, page 303 of [HP]):</p>
<p><em> Let <img src='http://l.wordpress.com/latex.php?latex=A_0%2C+A_1%2C+...%2C+A_n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='A_0, A_1, ..., A_n' title='A_0, A_1, ..., A_n' class='latex' /> be the weight distribution of the codewords in a binary linear [<img src='http://l.wordpress.com/latex.php?latex=n+%2C+k%2C+d&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n , k, d' title='n , k, d' class='latex' />] code <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' />, and let <img src='http://l.wordpress.com/latex.php?latex=A_0%5E%5Cperp%2C+A_1%5E%5Cperp%2C+...%2C+A_n%5E%5Cperp&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='A_0^\perp, A_1^\perp, ..., A_n^\perp' title='A_0^\perp, A_1^\perp, ..., A_n^\perp' class='latex' /> be the weight distribution of the codewords in its dual [<img src='http://l.wordpress.com/latex.php?latex=n%2Cn-k%2C+d%5E%5Cperp&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n,n-k, d^\perp' title='n,n-k, d^\perp' class='latex' />] code <img src='http://l.wordpress.com/latex.php?latex=C%5E%5Cperp&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C^\perp' title='C^\perp' class='latex' />. Fix a <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' />, <img src='http://l.wordpress.com/latex.php?latex=0%3Ct%3Cd&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='0&lt;t&lt;d' title='0&lt;t&lt;d' class='latex' />, and let <img src='http://l.wordpress.com/latex.php?latex=s+%3D+%7C%5C%7B+i%5C+%7C%5C+A_i%5E%5Cperp+%5Cnot%3D+0%2C+0%3Ci%5Cleq+n-t%5C%2C+%5C%7D%7C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='s = |\{ i\ |\ A_i^\perp \not= 0, 0&lt;i\leq n-t\, \}|' title='s = |\{ i\ |\ A_i^\perp \not= 0, 0&lt;i\leq n-t\, \}|' class='latex' />.<br />
Assume <img src='http://l.wordpress.com/latex.php?latex=s%5Cleq+d-t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='s\leq d-t' title='s\leq d-t' class='latex' />.<br />
</em></p>
<ul>
<li><em>If <img src='http://l.wordpress.com/latex.php?latex=A_i%5Cnot%3D+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='A_i\not= 0' title='A_i\not= 0' class='latex' /> and <img src='http://l.wordpress.com/latex.php?latex=d%5Cleq+i%5Cleq+n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='d\leq i\leq n' title='d\leq i\leq n' class='latex' /> then <img src='http://l.wordpress.com/latex.php?latex=C_i+%3D+%5C%7B+c+%5Cin+C%5C+%7C%5C+wt%28c%29+%3D+i%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C_i = \{ c \in C\ |\ wt(c) = i\}' title='C_i = \{ c \in C\ |\ wt(c) = i\}' class='latex' /> holds a simple <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' />-design.</em></li>
<li><em>If <img src='http://l.wordpress.com/latex.php?latex=A_i%5E%5Cperp%5Cnot%3D+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='A_i^\perp\not= 0' title='A_i^\perp\not= 0' class='latex' /> and <img src='http://l.wordpress.com/latex.php?latex=d%5E%5Cperp%5Cleq+i%5Cleq+n-t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='d^\perp\leq i\leq n-t' title='d^\perp\leq i\leq n-t' class='latex' /> then <img src='http://l.wordpress.com/latex.php?latex=C_i%5E%5Cperp+%3D+%5C%7B+c+%5Cin+C%5E%5Cperp+%5C+%7C%5C+wt%28c%29+%3D+i%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C_i^\perp = \{ c \in C^\perp \ |\ wt(c) = i\}' title='C_i^\perp = \{ c \in C^\perp \ |\ wt(c) = i\}' class='latex' /> holds a simple <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' />&#8211;design.</em></li>
<li><em>If <img src='http://l.wordpress.com/latex.php?latex=A_i%5E%5Cperp%5Cnot%3D+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='A_i^\perp\not= 0' title='A_i^\perp\not= 0' class='latex' /> and <img src='http://l.wordpress.com/latex.php?latex=d%5E%5Cperp%5Cleq+i%5Cleq+n-t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='d^\perp\leq i\leq n-t' title='d^\perp\leq i\leq n-t' class='latex' /> then <img src='http://l.wordpress.com/latex.php?latex=C_i%5E%5Cperp+%3D+%5C%7B+c+%5Cin+C%5E%5Cperp+%5C+%7C%5C+wt%28c%29+%3D+i%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C_i^\perp = \{ c \in C^\perp \ |\ wt(c) = i\}' title='C_i^\perp = \{ c \in C^\perp \ |\ wt(c) = i\}' class='latex' /> holds a simple <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' />&#8211;design.</em></li>
</ul>
<p>In the Assmus and Mattson Theorem, <img src='http://l.wordpress.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X' title='X' class='latex' /> is the set <img src='http://l.wordpress.com/latex.php?latex=%5C%7B1%2C2%2C...%2Cn%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\{1,2,...,n\}' title='\{1,2,...,n\}' class='latex' /> of coordinate locations and <img src='http://l.wordpress.com/latex.php?latex=B+%3D+%5C%7Bsupp%28c%29%5C+%7C%5C+c+%5Cin+C_i%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='B = \{supp(c)\ |\ c \in C_i\}' title='B = \{supp(c)\ |\ c \in C_i\}' class='latex' /> is the set of supports of the codewords of <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' /> of weight <img src='http://l.wordpress.com/latex.php?latex=i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i' title='i' class='latex' />. Therefore, the parameters of the <img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' />-design for <img src='http://l.wordpress.com/latex.php?latex=C_i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C_i' title='C_i' class='latex' /> are</p>
<ul>
<li><img src='http://l.wordpress.com/latex.php?latex=t&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='t' title='t' class='latex' /> =   given,</li>
<li><img src='http://l.wordpress.com/latex.php?latex=v+%3D+n&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='v = n' title='v = n' class='latex' />,</li>
<li><img src='http://l.wordpress.com/latex.php?latex=k+%3D+i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k = i' title='k = i' class='latex' />,    (this k is not to be confused with dim(C)!),</li>
<li><img src='http://l.wordpress.com/latex.php?latex=b+%3D+A_i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='b = A_i' title='b = A_i' class='latex' />,</li>
<li><img src='http://l.wordpress.com/latex.php?latex=%5Clambda+%3D+b%2Abinomial%28k%2Ct%29%2Fbinomial%28v%2Ct%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\lambda = b*binomial(k,t)/binomial(v,t)' title='\lambda = b*binomial(k,t)/binomial(v,t)' class='latex' /></li>
</ul>
<p>(by Theorem 8.1.6, p. 294, in \cite{HP}). Here is a SAGE example.</p>
<p><code><br />
sage: C = ExtendedBinaryGolayCode()<br />
sage: C.assmus_mattson_designs(5)<br />
['weights from C: ',<br />
[8, 12, 16, 24],<br />
&#8216;designs from C: &#8216;,<br />
[[5, (24, 8, 1)], [5, (24, 12, 48)], [5, (24, 16, 78)], [5, (24, 24, 1)]],<br />
&#8216;weights from C*: &#8216;,<br />
[8, 12, 16],<br />
&#8216;designs from C*: &#8216;,<br />
[[5, (24, 8, 1)], [5, (24, 12, 48)], [5, (24, 16, 78)]]]<br />
sage: C.assmus_mattson_designs(6)<br />
0<br />
</code></p>
<p>The automorphism group of the extended binary Golay code is the <a href="http://en.wikipedia.org/wiki/Mathieu_group">Mathieu group</a> <img src='http://l.wordpress.com/latex.php?latex=M_%7B24%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='M_{24}' title='M_{24}' class='latex' />. Moreover, the code is spanned by the codewords of weight 8.</p>
<p>References:<br />
[HP] W. C. Huffman, V. Pless, <b>Fundamentals of error-correcting codes</b>, Cambridge Univ. Press, 2003.<br />
[CvL] P. Cameron, J. van Lint, <b>Graphs, codes and designs</b>, Cambridge Univ. Press, 1980.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/wdjoyner.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/wdjoyner.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wdjoyner.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wdjoyner.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wdjoyner.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wdjoyner.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wdjoyner.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wdjoyner.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wdjoyner.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wdjoyner.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wdjoyner.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wdjoyner.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wdjoyner.wordpress.com&blog=3527098&post=22&subd=wdjoyner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wdjoyner.wordpress.com/2008/05/25/the-assmus-mattson-theorem-golay-codes-and-mathieu-groups/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/wdjoyner-128.jpg" medium="image">
			<media:title type="html">wdjoyner</media:title>
		</media:content>
	</item>
		<item>
		<title>On a conjecture of Goppa on codes and counting points hyperelliptic curves</title>
		<link>http://wdjoyner.wordpress.com/2008/04/26/on-a-conjecture-of-goppa-on-codes-and-counting-points-hyperelliptic-curves/</link>
		<comments>http://wdjoyner.wordpress.com/2008/04/26/on-a-conjecture-of-goppa-on-codes-and-counting-points-hyperelliptic-curves/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 05:27:43 +0000</pubDate>
		<dc:creator>wdjoyner</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[error-corrected codes]]></category>

		<category><![CDATA[goppa]]></category>

		<category><![CDATA[math]]></category>

		<category><![CDATA[sage]]></category>

		<guid isPermaLink="false">http://wdjoyner.wordpress.com/?p=18</guid>
		<description><![CDATA[What is the best code of a given length? This natural, but very hard, question motivates the following definition.
Definition: Let  denote the largest  such that there exists a []-code in .
Determining  is one of the main problems in the theory of error-correcting codes.
Let  be a sequence of linear codes with parameters [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>What is the <em>best</em> code of a given length? This natural, but very hard, question motivates the following definition.</p>
<p><strong>Definition</strong>: Let <img src='http://l.wordpress.com/latex.php?latex=B_q%28n%2Cd%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='B_q(n,d)' title='B_q(n,d)' class='latex' /> denote the largest <img src='http://l.wordpress.com/latex.php?latex=k&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='k' title='k' class='latex' /> such that there exists a [<img src='http://l.wordpress.com/latex.php?latex=n%2Ck%2Cd&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n,k,d' title='n,k,d' class='latex' />]-code in <img src='http://l.wordpress.com/latex.php?latex=GF%28q%29%5En&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='GF(q)^n' title='GF(q)^n' class='latex' />.</p>
<p>Determining <img src='http://l.wordpress.com/latex.php?latex=B_q%28n%2Cd%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='B_q(n,d)' title='B_q(n,d)' class='latex' /> is one of the main problems in the theory of error-correcting codes.</p>
<p>Let <img src='http://l.wordpress.com/latex.php?latex=C_i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C_i' title='C_i' class='latex' /> be a sequence of linear codes with parameters [<img src='http://l.wordpress.com/latex.php?latex=n_i%2Ck_i%2Cd_i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n_i,k_i,d_i' title='n_i,k_i,d_i' class='latex' />] such that <img src='http://l.wordpress.com/latex.php?latex=n_i%5Crightarrow+%5Cinfty&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n_i\rightarrow \infty' title='n_i\rightarrow \infty' class='latex' /> as <img src='http://l.wordpress.com/latex.php?latex=i+%5Cto+%5Cinfty&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i \to \infty' title='i \to \infty' class='latex' />, and such that both the limits <img src='http://l.wordpress.com/latex.php?latex=R%3D%5Clim_%7Bi%5Cto+%5Cinfty%7D%5Cfrac%7Bk_i%7D%7Bn_i%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='R=\lim_{i\to \infty}\frac{k_i}{n_i}' title='R=\lim_{i\to \infty}\frac{k_i}{n_i}' class='latex' /> and <img src='http://l.wordpress.com/latex.php?latex=%5Cdelta%3D%5Clim_%7Bi%5Crightarrow+%5Cinfty%7D%5Cfrac%7Bd_i%7D%7Bn_i%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\delta=\lim_{i\rightarrow \infty}\frac{d_i}{n_i}' title='\delta=\lim_{i\rightarrow \infty}\frac{d_i}{n_i}' class='latex' /> exist. The <strong>Singleton (upper) bound</strong> implies <img src='http://l.wordpress.com/latex.php?latex=R%2B%5Cdelta%5Cleq+1&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='R+\delta\leq 1' title='R+\delta\leq 1' class='latex' />.</p>
<p>Let <img src='http://l.wordpress.com/latex.php?latex=%5CSigma_q&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\Sigma_q' title='\Sigma_q' class='latex' /> denote the set of all <img src='http://l.wordpress.com/latex.php?latex=%28%5Cdelta%2CR%29%5Cin+%5B0%2C1%5D%5E2&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(\delta,R)\in [0,1]^2' title='(\delta,R)\in [0,1]^2' class='latex' /> such that there exists a sequence <img src='http://l.wordpress.com/latex.php?latex=C_i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C_i' title='C_i' class='latex' />, <img src='http://l.wordpress.com/latex.php?latex=i%3D1%2C2%2C...&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i=1,2,...' title='i=1,2,...' class='latex' />, of [<img src='http://l.wordpress.com/latex.php?latex=n_i%2Ck_i%2Cd_i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n_i,k_i,d_i' title='n_i,k_i,d_i' class='latex' />]-codes for which <img src='http://l.wordpress.com/latex.php?latex=%5Clim_%7Bi%5Cto+%5Cinfty%7D+d_i%2Fn_1%3D%5Cdelta&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\lim_{i\to \infty} d_i/n_1=\delta' title='\lim_{i\to \infty} d_i/n_1=\delta' class='latex' /> and <img src='http://l.wordpress.com/latex.php?latex=%5Clim_%7Bi%5Crightarrow+%5Cinfty%7D+k_i%2Fn_i%3DR&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\lim_{i\rightarrow \infty} k_i/n_i=R' title='\lim_{i\rightarrow \infty} k_i/n_i=R' class='latex' />.</p>
<p><strong>Theorem</strong> (Manin [SS]): There exists a continuous decreasing function <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q%3A%5B0%2C1%5D%5Cto+%5B0%2C1%5D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q:[0,1]\to [0,1]' title='\alpha_q:[0,1]\to [0,1]' class='latex' />, such that</p>
<ol>
<li> <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q' title='\alpha_q' class='latex' /> is strictly decreasing on [<img src='http://l.wordpress.com/latex.php?latex=0%2C%5Cfrac%7Bq-1%7D%7Bq%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='0,\frac{q-1}{q}' title='0,\frac{q-1}{q}' class='latex' />],</li>
<li> <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q%280%29%3D1&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q(0)=1' title='\alpha_q(0)=1' class='latex' />,</li>
<li> if <img src='http://l.wordpress.com/latex.php?latex=%7B%5Cfrac%7Bq-1%7D%7Bq%7D%7D%5Cleq+x%5Cleq+1&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='{\frac{q-1}{q}}\leq x\leq 1' title='{\frac{q-1}{q}}\leq x\leq 1' class='latex' /> then <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q%28x%29%3D0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q(x)=0' title='\alpha_q(x)=0' class='latex' />,</li>
<li> <img src='http://l.wordpress.com/latex.php?latex=%5CSigma_q%3D%5C%7B%28%5Cdelta%2CR%29%5Cin+%5B0%2C1%5D%5E2%5C+%7C%5C+0%5Cleq+R%5Cleq+%5Calpha_q%28%5Cdelta%29%5C%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\Sigma_q=\{(\delta,R)\in [0,1]^2\ |\ 0\leq R\leq \alpha_q(\delta)\}' title='\Sigma_q=\{(\delta,R)\in [0,1]^2\ |\ 0\leq R\leq \alpha_q(\delta)\}' class='latex' />.</li>
</ol>
<p><strong>Theorem</strong> (Gilbert-Varshamov): We have <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q%28x%29%5Cgeq+1-+x%5Clog_q%28q-1%29-x%5Clog_q%28x%29-%281-x%29%5Clog_q%281-x%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q(x)\geq 1- x\log_q(q-1)-x\log_q(x)-(1-x)\log_q(1-x)' title='\alpha_q(x)\geq 1- x\log_q(q-1)-x\log_q(x)-(1-x)\log_q(1-x)' class='latex' />. In other words, for each fixed <img src='http://l.wordpress.com/latex.php?latex=%5Cepsilon+%3E0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\epsilon &gt;0' title='\epsilon &gt;0' class='latex' />, there exists an [<img src='http://l.wordpress.com/latex.php?latex=n%2Ck%2Cd&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n,k,d' title='n,k,d' class='latex' />]-code <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' /> (which may depend on <img src='http://l.wordpress.com/latex.php?latex=%5Cepsilon&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\epsilon' title='\epsilon' class='latex' />) with <img src='http://l.wordpress.com/latex.php?latex=R%28C%29%2B%5Cdelta%28C%29%5Cgeq+1-+%5Cdelta%28C%29%5Clog_q%28%7B%5Cfrac%7Bq-1%7D%7Bq%7D%7D%29-%5Cdelta%28C%29%5Clog_q%28%5Cdelta%28C%29%29-%281-%5Cdelta%28C%29%29%5Clog_q%281-%5Cdelta%28C%29%29-%5Cepsilon&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='R(C)+\delta(C)\geq 1- \delta(C)\log_q({\frac{q-1}{q}})-\delta(C)\log_q(\delta(C))-(1-\delta(C))\log_q(1-\delta(C))-\epsilon' title='R(C)+\delta(C)\geq 1- \delta(C)\log_q({\frac{q-1}{q}})-\delta(C)\log_q(\delta(C))-(1-\delta(C))\log_q(1-\delta(C))-\epsilon' class='latex' />. In particular, in the case <img src='http://l.wordpress.com/latex.php?latex=q%3D2&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='q=2' title='q=2' class='latex' />, <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q%28x%29%5Cgeq1-H_2%28%5Cdelta%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q(x)\geq1-H_2(\delta)' title='\alpha_q(x)\geq1-H_2(\delta)' class='latex' />, where <img src='http://l.wordpress.com/latex.php?latex=H_q%28%5Cdelta%29%3D%5Cdelta%5Ccdot+%5Clog_q%28q-1%29-%5Cdelta%5Clog_q%28%5Cdelta%29-%281-%5Cdelta%29%5Clog_q%281-%5Cdelta%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='H_q(\delta)=\delta\cdot \log_q(q-1)-\delta\log_q(\delta)-(1-\delta)\log_q(1-\delta)' title='H_q(\delta)=\delta\cdot \log_q(q-1)-\delta\log_q(\delta)-(1-\delta)\log_q(1-\delta)' class='latex' /> is the entropy function (for a q-ary channel).</p>
<p>Plot of the Gilbert-Varshamov (dotted), Elias (red), Plotkin (dashed), Singleton (dash-dotted), Hamming (green), and MRRW (stepped) curves using <a href="http://sagemath.org/">SAGE</a>:</p>
<p><a href="http://wdjoyner.files.wordpress.com/2008/04/all-bounds-asymp.png"><img class="aligncenter size-full wp-image-19" src="http://wdjoyner.files.wordpress.com/2008/04/all-bounds-asymp.png?w=363&h=231" alt="asymptotic coding theory bounds" width="363" height="231" /></a><br />
Not a single value of <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q%28x%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q(x)' title='\alpha_q(x)' class='latex' /> is known for <img src='http://l.wordpress.com/latex.php?latex=0%3Cx%3C%7B%5Cfrac%7Bq-1%7D%7Bq%7D%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='0&lt;x&lt;{\frac{q-1}{q}}' title='0&lt;x&lt;{\frac{q-1}{q}}' class='latex' />!</p>
<p><strong>Goppa&#8217;s conjecture</strong>: <img src='http://l.wordpress.com/latex.php?latex=%5Calpha_q%28x%29+%3D+1-H_2%28%5Cdelta%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\alpha_q(x) = 1-H_2(\delta)' title='\alpha_q(x) = 1-H_2(\delta)' class='latex' />. (In other words, the Gilbert-Varshamov lower bound is actually attained in the case <img src='http://l.wordpress.com/latex.php?latex=q%3D2&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='q=2' title='q=2' class='latex' />.)</p>
<p>Though my guess is that Goppa&#8217;s conjecture is true, it is known (thanks to work of Zink, Vladut and Varshamov) that the q-ary analog of Goppa&#8217;s conjecture is false for <img src='http://l.wordpress.com/latex.php?latex=q%3E49&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='q&gt;49' title='q&gt;49' class='latex' />. On the other hand, we have the following theorem [J].</p>
<p><strong>Theorem</strong>: If <img src='http://l.wordpress.com/latex.php?latex=B%281.77%2Cp%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='B(1.77,p)' title='B(1.77,p)' class='latex' /> is true for infinitely many primes p with <img src='http://l.wordpress.com/latex.php?latex=p%5Cequiv+1%5Cpmod+4&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='p\equiv 1\pmod 4' title='p\equiv 1\pmod 4' class='latex' /> then Goppa&#8217;s conjecture is false.</p>
<p>The rest of this post will be devoted to explaining the notation in this Theorem. The notation <img src='http://l.wordpress.com/latex.php?latex=B%28c%2Cp%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='B(c,p)' title='B(c,p)' class='latex' /> means: &#8220;For all subsets <img src='http://l.wordpress.com/latex.php?latex=S%5Csubset+GF%28p%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='S\subset GF(p)' title='S\subset GF(p)' class='latex' />, <img src='http://l.wordpress.com/latex.php?latex=%7CX_S%28GF%28p%29%29%7C+%5Cleq++c%5Ccdot+p&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='|X_S(GF(p))| \leq  c\cdot p' title='|X_S(GF(p))| \leq  c\cdot p' class='latex' /> holds.&#8221; The notation <img src='http://l.wordpress.com/latex.php?latex=X_S&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X_S' title='X_S' class='latex' /> means: For each non-empty subset <img src='http://l.wordpress.com/latex.php?latex=S%5Csubset+GF%28p%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='S\subset GF(p)' title='S\subset GF(p)' class='latex' />, define the <a href="http://en.wikipedia.org/wiki/Hyperelliptic_curve">hyperelliptic</a> curve <img src='http://l.wordpress.com/latex.php?latex=X_S&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='X_S' title='X_S' class='latex' /> by <img src='http://l.wordpress.com/latex.php?latex=y%5E2%3Df_S%28x%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='y^2=f_S(x)' title='y^2=f_S(x)' class='latex' />, where <img src='http://l.wordpress.com/latex.php?latex=f_S%28x%29+%3D+%5Cprod_%7Ba%5Cin+S%7D%28x-a%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='f_S(x) = \prod_{a\in S}(x-a)' title='f_S(x) = \prod_{a\in S}(x-a)' class='latex' />.</p>
<p>It may seem strange that a statement about the asymptotic bounds of error-correcting curves is related to the number of points on hyperelliptic curves, but for details see [J]. Unfortunately, it appears much more needs to be known about hyperelliptic curves over finite fields if one is to try to use this connection to prove or disprove Goppa&#8217;s conjecture.</p>
<p>References:<br />
[J] D. Joyner, <em>On quadratic residue codes and hyperelliptic curves</em>. Discrete Mathematics &amp; Theoretical Computer Science, Vol 10, No 1 (2008).<br />
[SS] S. Shokranian and M.A. Shokrollahi, <strong>Coding theory and bilinear complexity</strong>, Scientific Series of the International Bureau, KFA Julich Vol. 21, 1994.</p>
<hr />Here&#8217;s how the above plot is constructed using SAGE:</p>
<p><code><br />
sage: f1 = lambda x: gv_bound_asymp(x,2)<br />
sage: P1 = plot(f1,0,1/2,linestyle=&#8221;:&#8221;)<br />
sage: f2 = lambda x: plotkin_bound_asymp(x,2)<br />
sage: P2 = plot(f2,0,1/2,linestyle=&#8221;&#8211;&#8221;)<br />
sage: f3 = lambda x: elias_bound_asymp(x,2)<br />
sage: P3 = plot(f3,0,1/2,rgbcolor=(1,0,0))<br />
sage: f4 = lambda x: singleton_bound_asymp(x,2)<br />
sage: P4 = plot(f4,0,1/2,linestyle=&#8221;-.&#8221;)<br />
sage: f5 = lambda x: mrrw1_bound_asymp(x,2)<br />
sage: P5 = plot(f5,0,1/2,linestyle=&#8221;steps&#8221;)<br />
sage: f6 = lambda x: hamming_bound_asymp(x,2)<br />
sage: P6 = plot(f6,0,1/2,rgbcolor=(0,1,0))<br />
sage: show(P1+P2+P3+P4+P5+P6)<br />
</code></p>
<hr />
If you are interested in computing what c might be in the above statement B(c,p), the following SAGE code may help.<br />
First, the Python function below will return a random list of elements without repetition, if desired) from an object. </p>
<p><font color="blue"></p>
<pre>
def random_elements(F,n,allow_repetition=True):
    """
    F is a SAGE object for which random_element is a method
    and having &gt;n elements. For example, a finite field. Here
    n&gt;1 is an integer. The output is to have no repetitions
    if allow_repetion=False.
    EXAMPLES:
        sage: p = nth_prime(100)
        sage: K = GF(p)
        sage: random_elements(K,2,allow_repetition=False)
        [336, 186]
    The command random_elements(K,p+1,allow_repetition=False)
    triggers a ValueError.
    """
    if (n&gt;F.order()-2 and allow_repetition==False):
        raise ValueError("Parameters are not well-choosen.")
    L = []
    while len(L)&lt;n:
        c = F.random_element()
        if allow_repetition==False:
            if not(c in L):
                L = L+[c]
        else:
            L = L+[c]
    return L
</pre>
<p></font></p>
<p>Next, the SAGE code computes <img src='http://l.wordpress.com/latex.php?latex=%7CX_S%28GF%28p%29%29%7C%2Fp&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='|X_S(GF(p))|/p' title='|X_S(GF(p))|/p' class='latex' /> for a particular choice of the parameters. This gives a lower bound for c.</p>
<p><code><br />
sage: p = nth_prime(100)<br />
sage: K = GF(p)<br />
sage: R. = PolynomialRing(K, &#8220;x&#8221;)<br />
sage: S = random_elements(K,ZZ((p+1)/2),allow_repetition=False)<br />
sage: fS = prod([x - a for a in S])<br />
sage: XS = HyperellipticCurve(fS)<br />
sage: RR(len(XS.points())/p)<br />
0.975970425138632<br />
</code><br />
Based on experiments with this code, it appears that for &#8220;random&#8221; chices of S, and p &#8220;large&#8221;, the quotient <img src='http://l.wordpress.com/latex.php?latex=%7CX_S%28GF%28p%29%29%7C%2Fp&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='|X_S(GF(p))|/p' title='|X_S(GF(p))|/p' class='latex' /> is very close to 1.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/wdjoyner.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/wdjoyner.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wdjoyner.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wdjoyner.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wdjoyner.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wdjoyner.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wdjoyner.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wdjoyner.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wdjoyner.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wdjoyner.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wdjoyner.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wdjoyner.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wdjoyner.wordpress.com&blog=3527098&post=18&subd=wdjoyner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wdjoyner.wordpress.com/2008/04/26/on-a-conjecture-of-goppa-on-codes-and-counting-points-hyperelliptic-curves/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/wdjoyner-128.jpg" medium="image">
			<media:title type="html">wdjoyner</media:title>
		</media:content>

		<media:content url="http://wdjoyner.files.wordpress.com/2008/04/all-bounds-asymp.png" medium="image">
			<media:title type="html">asymptotic coding theory bounds</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Circle decoding&#8221; of the [7,4,3] Hamming code</title>
		<link>http://wdjoyner.wordpress.com/2008/04/24/circle-decoding-of-the-743-hamming-code/</link>
		<comments>http://wdjoyner.wordpress.com/2008/04/24/circle-decoding-of-the-743-hamming-code/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 14:51:08 +0000</pubDate>
		<dc:creator>wdjoyner</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[desauto]]></category>

		<category><![CDATA[gap]]></category>

		<category><![CDATA[guava]]></category>

		<category><![CDATA[Hamming code]]></category>

		<category><![CDATA[math]]></category>

		<category><![CDATA[sage]]></category>

		<category><![CDATA[Ulam's problem]]></category>

		<guid isPermaLink="false">http://wdjoyner.wordpress.com/?p=16</guid>
		<description><![CDATA[This is a well-known trick but I&#8217;m posting it here since I often have a hard time tracking it down when I need it for an introductory coding theory talk or something. Hopefully someone else will find it amusing too!
Let  and let  be the set of all vectors in the third column below [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a well-known trick but I&#8217;m posting it here since I often have a hard time tracking it down when I need it for an introductory coding theory talk or something. Hopefully someone else will find it amusing too!</p>
<p>Let <img src='http://l.wordpress.com/latex.php?latex=F+%3D+GF%282%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F = GF(2)' title='F = GF(2)' class='latex' /> and let <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' /> be the set of all vectors in the third column below (for simplicity, we omit commas and parentheses, so <img src='http://l.wordpress.com/latex.php?latex=0000000&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='0000000' title='0000000' class='latex' /> is written instead of <img src='http://l.wordpress.com/latex.php?latex=%280%2C0%2C0%2C0%2C0%2C0%2C0%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(0,0,0,0,0,0,0)' title='(0,0,0,0,0,0,0)' class='latex' />, for example).</p>
<table border="2" cellpadding="10">
<caption>The [7,4,3] Hamming code</caption>
<tr>
<th scope="col" align="center">&nbsp; decimal &nbsp; </th>
<th scope="col" align="center"> &nbsp; binary &nbsp; </th>
<th scope="col" align="center"> &nbsp; Hamming [7,4]&nbsp; </th>
</tr>
<tbody>
<tr align="center">
<td>0 </td>
<td> 0000 </td>
<td> 0000000 </td>
</tr>
<tr align="center">
<td>1 </td>
<td> 0001 </td>
<td> 0001110 </td>
</tr>
<tr align="center">
<td>2 </td>
<td> 0010 </td>
<td> 0010101 </td>
</tr>
<tr align="center">
<td>3 </td>
<td> 0011 </td>
<td> 0011011 </td>
</tr>
<tr align="center">
<td>4 </td>
<td> 0100 </td>
<td> 0100011 </td>
</tr>
<tr align="center">
<td>5 </td>
<td> 0101 </td>
<td> 0101101 </td>
</tr>
<tr align="center">
<td>6 </td>
<td> 0110 </td>
<td> 0110110 </td>
</tr>
<tr align="center">
<td>7 </td>
<td> 0111 </td>
<td> 0111000 </td>
</tr>
<tr align="center">
<td>8 </td>
<td> 1000 </td>
<td> 1000111 </td>
</tr>
<tr align="center">
<td>9 </td>
<td> 1001 </td>
<td> 1001001 </td>
</tr>
<tr align="center">
<td>10 </td>
<td> 1010 </td>
<td> 1010010 </td>
</tr>
<tr align="center">
<td>11 </td>
<td> 1011 </td>
<td> 1011100 </td>
</tr>
<tr align="center">
<td>12 </td>
<td> 1100 </td>
<td> 1100100 </td>
</tr>
<tr align="center">
<td>13 </td>
<td> 1101 </td>
<td> 1101010 </td>
</tr>
<tr align="center">
<td>14 </td>
<td> 1110 </td>
<td> 1110001 </td>
</tr>
<tr align="center">
<td>15 </td>
<td> 1111 </td>
<td> 1111111 </td>
</tr>
</tbody>
</table>
<p>This is a linear code of length 7, dimension 4, and minimum distance 3. It is called the <strong>Hamming [7,4,3]-code</strong>.<br />
In fact, there is a mapping from <img src='http://l.wordpress.com/latex.php?latex=F%5E4&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F^4' title='F^4' class='latex' /> to <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' /> given by <img src='http://l.wordpress.com/latex.php?latex=%5Cphi%28x_1%2Cx_2%2Cx_3%2Cx_4%29%3D%7B%5Cbf+y%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\phi(x_1,x_2,x_3,x_4)={\bf y}' title='\phi(x_1,x_2,x_3,x_4)={\bf y}' class='latex' />, where<br />
<img src='http://l.wordpress.com/latex.php?latex=%7B%5Cbf+y%7D%3D+%5Cleft%28+%5Cbegin%7Barray%7D%7Bc%7D+y_1+%5C%5C+y_2+%5C%5C+y_3+%5C%5C+y_4+%5C%5C+y_5+%5C%5C+y_6+%5C%5C+y_7+%5Cend%7Barray%7D+%5Cright%29+%3D+%5Cleft%28+%5Cbegin%7Barray%7D%7Bcccc%7D+1%260%260%260+%5C%5C+0%261%260%260+%5C%5C+0%260%261%260+%5C%5C+0%260%260%261+%5C%5C+1%260%261%261+%5C%5C+1%261%260%261+%5C%5C+1%261%261%260+%5Cend%7Barray%7D+%5Cright%29+%5Cleft%28+%5Cbegin%7Barray%7D%7Bc%7D+x_1+%5C%5C+x_2+%5C%5C+x_3+%5C%5C+x_4+%5Cend%7Barray%7D+%5Cright%29+%5C+%5Cpmod%7B2%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='{\bf y}= \left( \begin{array}{c} y_1 \\ y_2 \\ y_3 \\ y_4 \\ y_5 \\ y_6 \\ y_7 \end{array} \right) = \left( \begin{array}{cccc} 1&#038;0&#038;0&#038;0 \\ 0&#038;1&#038;0&#038;0 \\ 0&#038;0&#038;1&#038;0 \\ 0&#038;0&#038;0&#038;1 \\ 1&#038;0&#038;1&#038;1 \\ 1&#038;1&#038;0&#038;1 \\ 1&#038;1&#038;1&#038;0 \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ x_4 \end{array} \right) \ \pmod{2}' title='{\bf y}= \left( \begin{array}{c} y_1 \\ y_2 \\ y_3 \\ y_4 \\ y_5 \\ y_6 \\ y_7 \end{array} \right) = \left( \begin{array}{cccc} 1&#038;0&#038;0&#038;0 \\ 0&#038;1&#038;0&#038;0 \\ 0&#038;0&#038;1&#038;0 \\ 0&#038;0&#038;0&#038;1 \\ 1&#038;0&#038;1&#038;1 \\ 1&#038;1&#038;0&#038;1 \\ 1&#038;1&#038;1&#038;0 \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ x_4 \end{array} \right) \ \pmod{2}' class='latex' />. Moreover, the matrix <img src='http://l.wordpress.com/latex.php?latex=G%3D%5Cleft%28%5Cbegin%7Barray%7D%7Bccccccc%7D+1%260%260%260%261%261%261+%5C%5C+0%261%260%260%260%261%261+%5C%5C+0%260%261%260%261%260%261+%5C%5C+0%260%260%261%261%261%260+%5Cend%7Barray%7D%5Cright%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='G=\left(\begin{array}{ccccccc} 1&#038;0&#038;0&#038;0&#038;1&#038;1&#038;1 \\ 0&#038;1&#038;0&#038;0&#038;0&#038;1&#038;1 \\ 0&#038;0&#038;1&#038;0&#038;1&#038;0&#038;1 \\ 0&#038;0&#038;0&#038;1&#038;1&#038;1&#038;0 \end{array}\right)' title='G=\left(\begin{array}{ccccccc} 1&#038;0&#038;0&#038;0&#038;1&#038;1&#038;1 \\ 0&#038;1&#038;0&#038;0&#038;0&#038;1&#038;1 \\ 0&#038;0&#038;1&#038;0&#038;1&#038;0&#038;1 \\ 0&#038;0&#038;0&#038;1&#038;1&#038;1&#038;0 \end{array}\right)' class='latex' />  is a generator matrix.</p>
<p>Now, suppose a codeword <img src='http://l.wordpress.com/latex.php?latex=c+%5Cin+C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='c \in C' title='c \in C' class='latex' /> is sent over a noisy channel and denote the received word by <img src='http://l.wordpress.com/latex.php?latex=%7B%5Cbf+w%7D%3D%28w_1%2Cw_2%2Cw_3%2Cw_4%2Cw_5%2Cw_6%2Cw_7%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='{\bf w}=(w_1,w_2,w_3,w_4,w_5,w_6,w_7)' title='{\bf w}=(w_1,w_2,w_3,w_4,w_5,w_6,w_7)' class='latex' />. We assume at most 1 error was made.</p>
<ol>
<li>
Put <img src='http://l.wordpress.com/latex.php?latex=w_i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='w_i' title='w_i' class='latex' /> in the region of the Venn diagram above associated to coordinate <img src='http://l.wordpress.com/latex.php?latex=i&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i' title='i' class='latex' /> in the table below, <img src='http://l.wordpress.com/latex.php?latex=i%3D1%2C2%2C...%2C7&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='i=1,2,...,7' title='i=1,2,...,7' class='latex' />.
</li>
<li>
Do parity checks on each of the circles <img src='http://l.wordpress.com/latex.php?latex=A&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='A' title='A' class='latex' />, <img src='http://l.wordpress.com/latex.php?latex=B&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='B' title='B' class='latex' />, and <img src='http://l.wordpress.com/latex.php?latex=C&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='C' title='C' class='latex' />.
</li>
</ol>
<p><a href='http://wdjoyner.files.wordpress.com/2008/04/hamming743-circles.png'><img src="http://wdjoyner.files.wordpress.com/2008/04/hamming743-circles.png?w=500&h=325" alt="" width="500" height="325" class="aligncenter size-large wp-image-17" /></a></p>
<table border="1">
<caption>
Decoding table<br />
</caption>
<tr>
<th scope="col" align="center">&nbsp; parity failure region(s) &nbsp; </th>
<th scope="col" align="center">&nbsp; error position &nbsp; </th>
</tr>
<tr>
<td align="center"> none </td>
<td align="center"> none </td>
</tr>
<tr>
<td align="center"> A, B, and C </td>
<td align="center"> 1 </td>
</tr>
<tr>
<td align="center"> B and C </td>
<td align="center"> 2 </td>
</tr>
<tr>
<td align="center"> A and C </td>
<td align="center"> 3 </td>
</tr>
<tr>
<td align="center"> A and B </td>
<td align="center"> 4</td>
</tr>
<tr>
<td align="center"> A </td>
<td align="center"> 5 </td>
</tr>
<tr>
<td align="center"> B </td>
<td align="center"> 6 </td>
</tr>
<tr>
<td align="center"> C </td>
<td align="center"> 7 </td>
</tr>
</table>
<p><strong>Exercise</strong>: Decode <img src='http://l.wordpress.com/latex.php?latex=%7B%5Cbf+w%7D+%3D+%280%2C1%2C0%2C0%2C0%2C0%2C1%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='{\bf w} = (0,1,0,0,0,0,1)' title='{\bf w} = (0,1,0,0,0,0,1)' class='latex' /> in the binary Hamming code using this algorithm.<br />
(This is solved at the bottom of this column.)</p>
<p>In his 1976 autobiography Adventures of a Mathematician, Stanislaw Ulam [U] poses the following problem:</p>
<blockquote><p>Someone thinks of a number between one and one million (which is just less than 220). Another person is allowed to ask up to twenty questions, to which the first person is supposed to answer only yes or no. Obviously, the number can be guessed by asking first: Is the number in the first half-million? and then again reduce the reservoir of numbers in the next question by one-half, and so on. Finally, the number is obtained in less than log2(1000000). Now suppose one were allowed to lie once or twice, then how many questions would one need to get the right answer?</p></blockquote>
<p>We define <strong>Ulam&#8217;s Problem</strong> as follows: Fix integers <img src='http://l.wordpress.com/latex.php?latex=M%5Cgeq+1&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='M\geq 1' title='M\geq 1' class='latex' /> and <img src='http://l.wordpress.com/latex.php?latex=e%5Cgeq+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='e\geq 0' title='e\geq 0' class='latex' />. Let Player 1 choose the number from the set of integers <img src='http://l.wordpress.com/latex.php?latex=0%2C1%2C+...%2CM&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='0,1, ...,M' title='0,1, ...,M' class='latex' /> and Player 2 ask the yes/no questions to deduce the number, to which Player 1 is allowed to lie at most e times. Player 2 must discern which number Player 1 picked with a minimum number of questions with no feedback (in other words, all the questions must be provided at once)</p>
<p>As far as I know, the solution to this version of Ulam&#8217;s problem without feedback is still unsolved if e=2. In the case e=1, see [N] and [M]. (Also, [H] is a good survey.)</p>
<p>Player 1 has to convert his number to binary and encode it as a Hamming [7,4,3] codeword. A table containing all 16 codewords is included above for reference. Player 2 then asks seven questions of the form, &#8220;Is the i-th bit of your 7-tuple a 1?&#8221; Player 1&#8217;s answers form the new 7-tuple, <img src='http://l.wordpress.com/latex.php?latex=%28c_1%2Cc_2%2C...%2Cc_7%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(c_1,c_2,...,c_7)' title='(c_1,c_2,...,c_7)' class='latex' />, and each coordinate is placed in the corresponding region of the circle. If Player 1 was completely truthful, then the codeword&#8217;s parity conditions hold. This means that the 7-tuple generated by Player 2&#8217;s questions will match a 7-tuple from the codeword table above. At this point, Player 2 just has to decode his 7-tuple into an integer using the codeword table above to win the game. A single lie, however, will yield a 7-tuple unlike any in the codeword table. If this is the case, Player 2 must error-check the received codeword using the three parity check bits and the decoding table above. In other words, once Player 2 determines the position of the erroneous bit, he corrects it by &#8220;flipping its bit&#8221;. Decoding the corrected codeword will yield Player 1&#8217;s original number.</p>
<p><strong>References</strong></p>
<p>[H] R. Hill, &#8220;Searching with lies,&#8221; in <strong>Surveys in Combinatorics</strong>, ed. by P. Rowlinson, London Math Soc, Lecture Notes Series # 218.</p>
<p>[M] J. Montague,  <a href="http://cadigweb.ew.usna.edu/~wdj/montague/montague_mathhonors1998-1999.html">&#8220;A Solution to Ulam&#8217;s Problem with Error-correcting Codes&#8221;</a></p>
<p>[N] I. Niven, &#8220;Coding theory applied to a problem of Ulam,&#8221; <strong>Math Mag</strong> 61(1988)275-281.</p>
<p>[U] S. Ulam, <strong>Adventures of a mathematician</strong>, Scribner and Sons, New York, 1976  .</p>
<hr />
<p>Solution to exercise using <a href="http://sagemath.org/">SAGE</a>:</p>
<p style="font-size:x-small;">
<code><br />
sage: MS = MatrixSpace(GF(2), 4, 7)<br />
sage: G = MS([[1,0,0,0,1,1,1],[0,1,0,0,0,1,1],[0,0,1,0,1,0,1],[0,0,0,1,1,1,0]])<br />
sage: C = LinearCode(G)<br />
sage: V = VectorSpace(GF(2), 7)<br />
sage: w = V([0,1,0,0,0,0,1])<br />
sage: C.decode(w)<br />
(0, 1, 0, 0, 0, 1, 1)<br />
</code>
</p>
<p>In other words, Player  picked 4 and lied on the 6th question.</p>
<p>Here is a Sage subtlety:<br />
<code><br />
sage: C = HammingCode(3, GF(2))<br />
sage: C<br />
Linear code of length 7, dimension 4 over Finite Field of size 2<br />
sage: V = VectorSpace(GF(2), 7)<br />
sage: w = V([0,1,0,0,0,0,1])<br />
sage: C.decode(w)<br />
(1, 1, 0, 0, 0, 0, 1)<br />
</code><br />
Why is this decoded word different? Because the Sage Hamming code is distinct (though &#8220;equivalent&#8221; to) the Hamming code we used in the example above.</p>
<p>Unfortunately, SAGE does not yet do code isomorphisms (at least not as easily as GUAVA), so we use GUAVA&#8217;s <code>CodeIsomorphism</code> function, which calls J. Leon&#8217;s GPL&#8217;s <code>desauto</code> C code function:</p>
<p style="font-size:xx-small;">
<code><br />
gap&gt; C1 := GeneratorMatCode([[1,0,0,1,0,1,0],[0,1,0,1,0,1,1],[0,0,1,1,0,0,1],[0,0,0,0,1,1,1]],GF(2));<br />
a linear [7,4,1..3]1 code defined by generator matrix over GF(2)<br />
gap&gt; C2 := GeneratorMatCode([[1,0,0,0,1,1,1],[0,1,0,0,0,1,1],[0,0,1,0,1,0,1],[0,0,0,1,1,1,0]],GF(2));<br />
a linear [7,4,1..3]1 code defined by generator matrix over GF(2)<br />
gap&gt; CodeIsomorphism(C1,C2);<br />
(2,6,7,3)<br />
gap&gt; Display(GeneratorMat(C1));<br />
 1 . . 1 . 1 .<br />
 . 1 . 1 . 1 1<br />
 . . 1 1 . . 1<br />
 . . . . 1 1 1<br />
gap&gt; Display(GeneratorMat(C2));<br />
 1 . . . 1 1 1<br />
 . 1 . . . 1 1<br />
 . . 1 . 1 . 1<br />
 . . . 1 1 1 .<br />
</code>
</p>
<p>Now we see that the permutation (2,6,7,3) sends the &#8220;SAGE Hamming code&#8221; to the &#8220;circle Hamming code&#8221;:</p>
<p style="font-size:x-small;">
<code><br />
sage: H = HammingCode(3, GF(2))<br />
sage: G = MS([[1,0,0,0,1,1,1],[0,1,0,0,0,1,1],[0,0,1,0,1,0,1],[0,0,0,1,1,1,0]])<br />
sage: C = LinearCode(G)<br />
sage: C.gen_mat()<br />
[1 0 0 0 1 1 1]<br />
[0 1 0 0 0 1 1]<br />
[0 0 1 0 1 0 1]<br />
[0 0 0 1 1 1 0]<br />
sage: S7 = SymmetricGroup(7)<br />
sage: g = S7([(2,6,7,3)])<br />
sage: H.permuted_code(g) == C<br />
True<br />
</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/wdjoyner.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/wdjoyner.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wdjoyner.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wdjoyner.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wdjoyner.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wdjoyner.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wdjoyner.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wdjoyner.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wdjoyner.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wdjoyner.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wdjoyner.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wdjoyner.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wdjoyner.wordpress.com&blog=3527098&post=16&subd=wdjoyner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wdjoyner.wordpress.com/2008/04/24/circle-decoding-of-the-743-hamming-code/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/wdjoyner-128.jpg" medium="image">
			<media:title type="html">wdjoyner</media:title>
		</media:content>

		<media:content url="http://wdjoyner.files.wordpress.com/2008/04/hamming743-circles.png?w=300" medium="image" />
	</item>
	</channel>
</rss>