# Cosets of a Perfect Code

I've been reading about perfect codes and working on various exercises to get a better understanding about these types of codes. I came across an interesting statement that I am having trouble showing.

A coset of a linear perfect code is also a perfect code.

Can anyone help? Thanks in advance!

-
source and page? –  Will Jagy Sep 28 '12 at 22:57
SPLAG says a perfect code is one for which the covering radius and the packing radius agree. Meanwhile, they say this is not related to another notion of perfection I would have known. They do say these are essentially classified, see chapter 6 of G. W. Mackey, The Theory of Error-Correcting Codes. They also refer to van Lint, Introduction to Coding Theory. Then they list the perfect codes. Pages 85-86 in the first edition. SPLAG is Sphere Packings, Lattices and Groups by Conway and Sloane, I have the first edition. –  Will Jagy Sep 28 '12 at 23:58
the second edition of Lattices and Codes by Wolfgang Ebeling, on page 66, deines a perfect code in a way you might like better. About five pages on this. –  Will Jagy Sep 29 '12 at 0:06

Let $C$ be a linear code, let $v+C$ be a coset. Given two elements $x,y$ in the coset, we have $x=v+a$, $y=v+b$ for some $a,b$ in $C$. Can you show that the distance between $x$ and $y$ is the same as the distance between $a$ and $b$? Can you see how to apply that to your question?
If $C$ is linear perfect code of legnth $n$ with min. distance $d$, $v + C$ a coset, and $x, y \in v + C$. Then, $x = v + a$ and $y = v + b$ for some $a, b \in C$. Also, $d(x, y) = wt(x - y) = wt(v + a -(v + b)) = wt(a - b) = d(a, b)$. If $M$ is the number of codewords in $C$, then $M = \frac{q^n}{\sum_{i=0}^{t} {n \choose i} (q - 1)^{i}}$ ($\ast$), where $t = \lfloor \frac{d-1}{2}\rfloor$. Since the corresponding distances in $C$ and $v+C$ are the same, can I automatically say that $v + C$ satisfies ($\ast$) since $|C| = |v+C|$? I'm not sure how to conclude that $v+C$ is perfect. –  josh Sep 29 '12 at 22:30
It's certainly true that $C$ and $v+C$ have the same number of elements, so $v+C$ certainly satisfies (*) if $C$ does. Are you asking whether $v+C$ has the same minimal distance as $C$? Well, you've proved all distances in $v+C$ are the same as distances in $C$, so that's not an issue. I'm not sure what more is to be said, unless you're leaving out part of the definition of a perfect code. –  Gerry Myerson Sep 30 '12 at 5:27
Ok, I think I understand how to use the distance property. The book also says that a perfect code $C$ is one for which $\mathbb{F}_{q}^{n}$ is partitioned into disjoint spheres of radius $t$ centered about each of the codewords in $C$. Since all distances in $v + C$ are the same as distances in $C$, it would also follow that $\mathbb{F}_{q}^{n}$ would be partitioned into disjoint spheres of radius $t$ centered about the elements ${v + c}$, where $c$ runs over all of $C$. –  josh Sep 30 '12 at 6:29