<p>Sphere packings give a nice analogue of codes over $\mathbb{R}$. A sphere packing is a set $\mathcal{P} \subset \mathbb{R}^n$ such that $d_{\mathcal{P}} := \inf_{x,y \in \mathcal{P}, x \neq y} \|x - y\| &gt; 0$, where $\|\cdot \|$ is the Euclidean norm. This is called a sphere packing because we can place a(n open) sphere of radius $d_{\mathcal{P}}/2$ at each point in $\mathcal{P}$, and the spheres will not overlap.</p>

<p>There are many nice simple analogies between a code $\mathcal{C} \subseteq \mathbb{F}_q^n$ and a sphere packing $\mathcal{P} \subset \mathbb{R}^n$:</p>

<ol>
<li>$d_{\mathcal{P}}$ is the minimum distance of the sphere packing, and it is the obvious analogue of the minimum distance of the code: $d_{\mathcal{C}} := \min_{x, y \in \mathcal{C}, x \neq y} \|x - y\|_H$, where $\|\cdot\|_H$ is the Hamming weight. In both cases, this can be viewed as a measure of "how correctable errors are when we encode messages via $\mathcal{C}$ or $\mathcal{P}$ over a noisy channel." E.g., $d_{\mathcal{P}}/2$ is the smallest Euclidean noise that we can add to a point in $\mathcal{P}$ so that we are unable to identify the original point uniquely, while $\lceil d_{\mathcal{C}}/2 \rceil$ is the minimal Hamming noise that can be added to a codeword so that we cannot identify the original codeword uniquely.</li>
<li>The analogue of a linear code is a lattice, $\mathcal{L} := \{ z_1 b_1 + \cdots + z_n b_n \ : \ z_i \in \mathbb{Z}\}$, where the $b_i$ are linearly independent vectors in $\mathbb{R}^n$. The minimum distance of a lattice is just the minimal length of a shortest non-zero vector in $\mathcal{P}$, just like the minimal distance of a linear code is the minimal Hamming weight of a non-zero codeword.</li>
<li>The analogue of the rate of the code $\alpha_{\mathcal{C}} := \log |\mathcal{C}|/\log q^n$ is $\delta_{\mathcal{P}} := \lim_{r \to \infty} \log|\mathcal{P} \cap B(r)|/\log \mathrm{vol}(B(r))$, where $B(r)$ is the Euclidean ball of radius $r$. For a lattice $\mathcal{L}$, we have $|\mathcal{L} \cap B(r)| \sim \mathrm{vol}(B(r))/\det(\mathcal{L})$, where $\det(\mathcal{L})$ is the absolute value of the determinant of the matrix given by the basis vectors $(b_1,\ldots, b_n)$. So, $\delta_{\mathcal{L}} = 1-\log \det(\mathcal{L})$.</li>
<li>For codes $\mathcal{C}$, we're often interested in maximizing the minimum distance $d_{\mathcal{C}}$ for a fixed rate $\alpha_{\mathcal{C}}$. For sphere packings $\mathcal{P}$, we are similarly interested in maximizing $d_{\mathcal{P}}$ for fixed $\delta_{\mathcal{P}}$. Notice that we can always scale a sphere packing $\mathcal{P}$ so that, say, $\delta_{\mathcal{P}} = 0$. So, we can assume without loss of generality that a sphere packing satisfies $\delta_{\mathcal{P}} = 0$. In contrast, it seems that codes with rate $\alpha$ and codes with rate $\alpha'$ are fundamentally distinct objects for $\alpha \neq \alpha'$.</li>
</ol>

<p>Sphere packings are still an active area of research, both in fixed dimensions and in asymptotically large dimension. E.g., the optimal sphere packings are only known in dimensions 1, 2, 3, 8, and 24 (all achieved by lattices), with 8 and 24 dimensions solved only very recently by Viazovska et al (see <a href="http://arxiv.org/abs/1603.04246" rel="noreferrer">http://arxiv.org/abs/1603.04246</a> and <a href="http://arxiv.org/abs/1603.06518" rel="noreferrer">http://arxiv.org/abs/1603.06518</a>). In arbitrarily high dimensions, the current record is held by Venkatesh (<a href="http://math.stanford.edu/~akshay/research/sp.pdf" rel="noreferrer">http://math.stanford.edu/~akshay/research/sp.pdf</a>). A table of the densest known packings in various dimensions is available here: <a href="http://www.math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/density.html" rel="noreferrer">http://www.math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/density.html</a>.</p>

<p>One can also consider packings of objects other than spheres. E.g., one can replace the Euclidean norm in the definition of $d_{\mathcal{P}}$ by any norm.</p>

CC BY-SA 3.0
2017-12-21T14:20:28.673Z
2017-12-21T14:20:28.673Z
Noah Stephens-Davidowitz
<p>It is possible to define codes over infinite fields, but it is usually not as useful as codes over finite fields. The original motivation for error-correcting codes comes from the needs to transmits bits over a noisy channel. Over such a channel, it is usually not possible to send real numbers with arbitrary precision.</p>

<p>However, there have been some works that studied error-correcting codes over the reals. Here are two examples:</p>

<p><a href="https://arxiv.org/pdf/1311.5102.pdf" rel="noreferrer">https://arxiv.org/pdf/1311.5102.pdf</a></p>

<p><a href="https://arxiv.org/abs/1402.6952v1" rel="noreferrer">https://arxiv.org/abs/1402.6952v1</a></p>

CC BY-SA 3.0
2017-12-21T13:47:18.033Z
2017-12-21T13:47:18.033Z
Or Meir
<p>In Coding Theory, people use $q$-ary alphabets: why do we need a finite set? Why can't we define codes over infinite sets. such as $\mathbb{R}$ or $\mathbb{C}$?</p>

CC BY-SA 3.0
2017-12-21T12:47:08.967Z
Coding theory is based on finite fields theory, and finite fields have quite different properties than infinite ones. I’m not an expert so I don’t know much more, but you may probably start from that.
Nicola Gigante
CC BY-SA 3.0
2017-12-21T14:39:52.047Z
An example to keep in mind: If you felt like cheating, you could encode an entire message into a single element (say one real number), then just send a few copies of it.
usul
<coding-theory><encoding>
Why can't codes be defined over infinite fields?
cruz
# Why can't codes be defined over infinite fields?

(Asked by: username_0 on 2017-12-20)

In Coding Theory, people use $q$-ary alphabets: why do we need a finite set? Why can't we define codes over infinite sets. such as $\mathbb{R}$ or $\mathbb{C}$?

**Tags:** coding-theory, encoding
> **Comments:**
> **username_1**: Coding theory is based on finite fields theory, and finite fields have quite different properties than infinite ones. I’m not an expert so I don’t know much more, but you may probably start from that.  
> **username_2**: An example to keep in mind: If you felt like cheating, you could encode an entire message into a single element (say one real number), then just send a few copies of it.  

---

## 2 answers

### Answer by username_3 on 2017-12-21. Score: 6

Sphere packings give a nice analogue of codes over $\mathbb{R}$. A sphere packing is a set $\mathcal{P} \subset \mathbb{R}^n$ such that $d\_{\mathcal{P}} := \inf\_{x,y \in \mathcal{P}, x \neq y} \|x - y\| > 0$, where $\|\cdot \|$ is the Euclidean norm. This is called a sphere packing because we can place a(n open) sphere of radius $d\_{\mathcal{P}}/2$ at each point in $\mathcal{P}$, and the spheres will not overlap.

There are many nice simple analogies between a code $\mathcal{C} \subseteq \mathbb{F}\_q^n$ and a sphere packing $\mathcal{P} \subset \mathbb{R}^n$:

1. $d\_{\mathcal{P}}$ is the minimum distance of the sphere packing, and it is the obvious analogue of the minimum distance of the code: $d\_{\mathcal{C}} := \min\_{x, y \in \mathcal{C}, x \neq y} \|x - y\|\_H$, where $\|\cdot\|\_H$ is the Hamming weight. In both cases, this can be viewed as a measure of "how correctable errors are when we encode messages via $\mathcal{C}$ or $\mathcal{P}$ over a noisy channel." E.g., $d\_{\mathcal{P}}/2$ is the smallest Euclidean noise that we can add to a point in $\mathcal{P}$ so that we are unable to identify the original point uniquely, while $\lceil d\_{\mathcal{C}}/2 \rceil$ is the minimal Hamming noise that can be added to a codeword so that we cannot identify the original codeword uniquely.
2. The analogue of a linear code is a lattice, $\mathcal{L} := \{ z\_1 b\_1 + \cdots + z\_n b\_n \ : \ z\_i \in \mathbb{Z}\}$, where the $b\_i$ are linearly independent vectors in $\mathbb{R}^n$. The minimum distance of a lattice is just the minimal length of a shortest non-zero vector in $\mathcal{P}$, just like the minimal distance of a linear code is the minimal Hamming weight of a non-zero codeword.
3. The analogue of the rate of the code $\alpha\_{\mathcal{C}} := \log |\mathcal{C}|/\log q^n$ is $\delta\_{\mathcal{P}} := \lim\_{r \to \infty} \log|\mathcal{P} \cap B(r)|/\log \mathrm{vol}(B(r))$, where $B(r)$ is the Euclidean ball of radius $r$. For a lattice $\mathcal{L}$, we have $|\mathcal{L} \cap B(r)| \sim \mathrm{vol}(B(r))/\det(\mathcal{L})$, where $\det(\mathcal{L})$ is the absolute value of the determinant of the matrix given by the basis vectors $(b\_1,\ldots, b\_n)$. So, $\delta\_{\mathcal{L}} = 1-\log \det(\mathcal{L})$.
4. For codes $\mathcal{C}$, we're often interested in maximizing the minimum distance $d\_{\mathcal{C}}$ for a fixed rate $\alpha\_{\mathcal{C}}$. For sphere packings $\mathcal{P}$, we are similarly interested in maximizing $d\_{\mathcal{P}}$ for fixed $\delta\_{\mathcal{P}}$. Notice that we can always scale a sphere packing $\mathcal{P}$ so that, say, $\delta\_{\mathcal{P}} = 0$. So, we can assume without loss of generality that a sphere packing satisfies $\delta\_{\mathcal{P}} = 0$. In contrast, it seems that codes with rate $\alpha$ and codes with rate $\alpha'$ are fundamentally distinct objects for $\alpha \neq \alpha'$.

Sphere packings are still an active area of research, both in fixed dimensions and in asymptotically large dimension. E.g., the optimal sphere packings are only known in dimensions 1, 2, 3, 8, and 24 (all achieved by lattices), with 8 and 24 dimensions solved only very recently by Viazovska et al (see <http://arxiv.org/abs/1603.04246> and <http://arxiv.org/abs/1603.06518>). In arbitrarily high dimensions, the current record is held by Venkatesh (<http://math.stanford.edu/~akshay/research/sp.pdf>). A table of the densest known packings in various dimensions is available here: <http://www.math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/density.html>.

One can also consider packings of objects other than spheres. E.g., one can replace the Euclidean norm in the definition of $d\_{\mathcal{P}}$ by any norm.


---

### Answer by username_4 on 2017-12-21. Score: 5

It is possible to define codes over infinite fields, but it is usually not as useful as codes over finite fields. The original motivation for error-correcting codes comes from the needs to transmits bits over a noisy channel. Over such a channel, it is usually not possible to send real numbers with arbitrary precision.

However, there have been some works that studied error-correcting codes over the reals. Here are two examples:

<https://arxiv.org/pdf/1311.5102.pdf>

<https://arxiv.org/abs/1402.6952v1>


---

