In coding theory, the Gilbert–Varshamov bound (due to Edgar Gilbert and independently Rom Varshamov) is a limit on the parameters of a (not necessarily linear) code. It is occasionally known as the Gilbert–Shannon–Varshamov bound (or the GSV bound), but the name "Gilbert–Varshamov bound" is by far the most popular. Varshamov proved this bound by using the probabilistic method for linear codes. For more about that proof, see: GV-linear-code.
Then for all , there exists at least one codeword such that the Hamming distance between and satisfies
since otherwise we could add x to the code whilst maintaining the code's minimum Hamming distance – a contradiction on the maximality of .
Hence the whole of is contained in the union of all balls of radius having their centre at some :
Now each ball has size
since we may allow (or choose) up to of the components of a codeword to deviate (from the value of the corresponding component of the ball's centre) to one of possible other values (recall: the code is q-ary: it takes values in ). Hence we deduce