Gilbert–Varshamov bound for linear codes

The Gilbert–Varshamov bound for linear codes is related to the general Gilbert–Varshamov bound, which gives a lower bound on the maximal number of elements in an error-correcting code of a given block length and minimum Hamming weight over a field $$\mathbb{F}_q$$. This may be translated into a statement about the maximum rate of a code with given length and minimum distance. The Gilbert–Varshamov bound for linear codes asserts the existence of q-ary linear codes for any relative minimum distance less than the given bound that simultaneously have high rate. The existence proof uses the probabilistic method, and thus is not constructive. The Gilbert–Varshamov bound is the best known in terms of relative distance for codes over alphabets of size less than 49. For larger alphabets, algebraic geometry codes sometimes achieve an asymptotically better rate vs. distance tradeoff than is given by the Gilbert–Varshamov bound.

Gilbert–Varshamov bound theorem

 * Theorem: Let $$q \geqslant 2$$. For every $$0 \leqslant \delta < 1 - \tfrac{1}{q}$$ and $$0 < \varepsilon \leqslant 1 - H_q (\delta ),$$ there exists a $$q$$-ary linear code with rate $$R \geqslant 1 - H_q (\delta ) - \varepsilon $$ and relative distance $$\delta.$$

Here $$H_q$$ is the q-ary entropy function defined as follows:


 * $$H_q(x) = x\log_q(q-1)-x\log_qx-(1-x)\log_q(1-x).$$

The above result was proved by Edgar Gilbert for general codes using the greedy method. Rom Varshamov refined the result to show the existence of a linear code. The proof uses the probabilistic method.

High-level proof:

To show the existence of the linear code that satisfies those constraints, the probabilistic method is used to construct the random linear code. Specifically, the linear code is chosen by picking a generator matrix $$G \in \mathbb{F}_q^{k \times n}$$ whose entries are randomly chosen elements of $$\mathbb{F}_q$$. The minimum Hamming distance of a linear code is equal to the minimum weight of a nonzero codeword, so in order to prove that the code generated by $$G$$ has minimum distance $$d$$, it suffices to show that for any $$m \in \mathbb{F}_q^k \smallsetminus \left\{ 0 \right\}, \operatorname{wt}(mG) \ge d$$. We will prove that the probability that there exists a nonzero codeword of weight less than $$d$$ is exponentially small in $$n$$. Then by the probabilistic method, there exists a linear code satisfying the theorem.

Formal proof:

By using the probabilistic method, to show that there exists a linear code that has a Hamming distance greater than $$d$$, we will show that the probability that the random linear code having the distance less than $$d$$ is exponentially small in $$n$$.

The linear code is defined by its generator matrix, which we choose to be a random $$k \times n$$ generator matrix; that is, a matrix of $$kn$$ elements which are chosen independently and uniformly over the field $$\mathbb{F}_q$$.

Recall that in a linear code, the distance equals the minimum weight of a nonzero codeword. Let $$\operatorname{wt}(y)$$ be the weight of the codeword $$y$$. So



\begin{align} P & = \Pr_{\text{random }G} (\text{linear code generated by } G\text{ has distance} < d) \\[6pt] & = \Pr_{\text{random }G} (\text{there exists a non-zero codeword } y \text{ in a linear code generated by }G\text{ such that } \operatorname{wt}(y) < d) \\[6pt] &= \Pr_{\text{random }G} \left (\text{there exists } 0 \neq m \in \mathbb{F}_q^k \text{ such that } \operatorname{wt}(mG) < d \right ) \end{align} $$

The last equality follows from the definition: if a codeword $$y$$ belongs to a linear code generated by $$G$$, then $$y = mG$$ for some vector $$m \in \mathbb{F}_q^k$$.

By Boole's inequality, we have:


 * $$P \leqslant \sum_{0 \neq m \in \mathbb{F}_q^k} \Pr_{\text{random }G} (\operatorname{wt}(mG) < d)$$

Now for a given message $$0 \neq m \in \mathbb{F}_q^k,$$ we want to compute


 * $$W = \Pr_{\text{random }G} (\operatorname{wt}(mG) < d).$$

Let $$\Delta(m_1,m_2)$$ be a Hamming distance of two messages $$m_1$$ and $$m_2$$. Then for any message $$m$$, we have: $$\operatorname{wt}(m) = \Delta(0,m)$$. Therefore:


 * $$W = \sum_{\{y \in \mathbb{F}_q^n |\Delta (0,y) \leqslant d - 1\}} \Pr_{\text{random }G} (mG = y)$$

Due to the randomness of $$G$$, $$mG$$ is a uniformly random vector from $$\mathbb{F}_q^n$$. So


 * $$\Pr_{\text{random }G} (mG = y) = q^{-n}$$

Let $$\operatorname{Vol}_q(r,n)$$ be the volume of a Hamming ball with the radius $$r$$. Then:


 * $$ P \leqslant q^k W  = q^k \left ( \frac{\operatorname{Vol}_q(d-1,n)}{q^n} \right )  \leqslant  q^k \left ( \frac{q^{nH_q(\delta)}}{q^n} \right ) = q^k q^{-n(1-H_q(\delta))}$$

By choosing $$k = (1-H_q(\delta)-\varepsilon)n$$, the above inequality becomes


 * $$ P \leqslant q^{-\varepsilon n}$$

Finally $$q^{-\varepsilon n} \ll 1$$, which is exponentially small in n, that is what we want before. Then by the probabilistic method, there exists a linear code $$C$$ with relative distance $$\delta$$ and rate $$R$$ at least $$(1-H_q(\delta)-\varepsilon)$$, which completes the proof.

Comments

 * 1) The Varshamov construction above is not explicit; that is, it does not specify the deterministic method to construct the linear code that satisfies the Gilbert–Varshamov bound. A naive approach is to search over all generator matrices $$G$$ of size $$kn$$ over the field $$\mathbb{F}_q$$ to check if the linear code associated to $$G$$ achieves the predicted Hamming distance. This exhaustive search requires exponential runtime in the worst case.
 * 2) There also exists a Las Vegas construction that takes a random linear code and checks if this code has good Hamming distance, but this construction also has an exponential runtime.
 * 3) For sufficiently large non-prime q and for certain ranges of the variable δ, the Gilbert–Varshamov bound is surpassed by the Tsfasman–Vladut–Zink bound.