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
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.
[citation needed] For larger alphabets, algebraic geometry codes sometimes achieve an asymptotically better rate vs. distance tradeoff than is given by the Gilbert–Varshamov bound.
is the q-ary entropy function defined as follows: 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
whose entries are randomly chosen elements of
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
, it suffices to show that for any
{\displaystyle m\in \mathbb {F} _{q}^{k}\smallsetminus \left\{0\right\},\operatorname {wt} (mG)\geq d}
We will prove that the probability that there exists a nonzero codeword of weight less than
is exponentially small in
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
, we will show that the probability that the random linear code having the distance less than
The linear code is defined by its generator matrix, which we choose to be a random
elements which are chosen independently and uniformly over the field
Recall that in a linear code, the distance equals the minimum weight of a nonzero codeword.
So The last equality follows from the definition: if a codeword
belongs to a linear code generated by
By Boole's inequality, we have: Now for a given message
be a Hamming distance of two messages
is a uniformly random vector from
be the volume of a Hamming ball with the radius
Then by the probabilistic method, there exists a linear code