ArticleslgStudy

science

Hamming bound

Hamming bound is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Hamming bound rather than just read about it. In short: In mathematics and computer science, in the field of coding theory, the Hamming bound is a limit on the parameters of an arbitrary block code: it is also known as the sphere-packing bound or the volume bound from an interpretation in terms of packing balls in the Hamming metric into the space of all possible words. It gives an important limitation on the efficiency with which any error-correcting code can utilize th…

Key takeaways

  • Hamming bound belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Hamming bound to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Hamming bound from memory before moving on to harder problems.

Reference excerpt

In mathematics and computer science, in the field of coding theory, the Hamming bound is a limit on the parameters of an arbitrary block code: it is also known as the sphere-packing bound or the volume bound from an interpretation in terms of packing balls in the Hamming metric into the space of all possible words. It gives an important limitation on the efficiency with which any error-correcting code can utilize the space in which its code words are embedded. A code that attains the Hamming bound is said to be a perfect code.

Background on error-correcting codes An original message and an encoded version are both composed in an alphabet of q letters. Each code word contains n letters. The original message (of length m) is shorter than n letters. The message is converted into an n-letter codeword by an encoding algorithm, transmitted over a noisy channel, and finally decoded by the receiver. The decoding process interprets a garbled codeword, referred to as simply a word, as the valid codeword "nearest" the n-letter received string. Mathematically, there are exactly qm possible messages of length m, and each message can be regarded as a vector of length m. The encoding scheme converts an m-dimensional vector into an n-dimensional vector. Exactly qm valid codewords are possible, but any one of qn words can be received because the noisy channel might distort one or more of the n letters when a codeword is transmitted.

Statement of the bound

Preliminary definitions An alphabet set 𝒜q is a set of symbols with q elements. The set of strings of length n on the alphabet set 𝒜q are denoted 𝒜qn. (There are qn distinct strings in this set of strings.) A q-ary block code of length n is a subset of the strings of 𝒜qn, where the alphabet set 𝒜q is any alphabet set having q elements. (The choice of alphabet set 𝒜q makes no difference to the result, provided the alphabet is of size q.)

Defining the bound Let Aq(n,d) denote the maximum possible size of a q-ary block code C of length n and minimum Hamming distance d between elements of the block code (necessarily positive for qn>1). Then, the Hamming bound is:

Aq(n,d)≤qn∑k=0t(nk)(q−1)k where

t=⌊d−12⌋.

Proof It follows from the definition of d that if at most

t=⌊12(d−1)⌋ errors are made during transmission of a codeword then minimum distance decoding will decode it correctly (i.e., it decodes the received word as the codeword that was sent). Thus the code is said to be capable of correcting t errors. For each codeword c∈C, consider a ball of fixed radius t around c. Every pair of these balls (Hamming balls) are non-intersecting by the t-error-correcting property. Let m be the number of words in each ball (in other words, the volume of the ball). A word that is in such a ball can deviate in at most t components from those of the ball's centre, which is a codeword. The number of such words is then obtained by choosing up to t of the n components of a codeword to deviate to one of (q−1) possible other values (recall, the code is q-ary: it takes values in 𝒜qn). Thus,

m=∑k=0t(nk)(q−1)k. Aq(n,d) is the (maximum) total number of codewords in C, and so, by the definition of t, the greatest number of balls with no two balls having a word in common. Taking the union of the words in these balls centered at codewords, results in a set of words, each counted precisely once, that is a subset of 𝒜qn (where |𝒜qn|=qn words) and so:

Aq(n,d)×m=Aq(n,d)×∑k=0t(nk)(q−1)k≤qn. Whence:

Aq(n,d)≤qn∑k=0t(nk)(q−1)k.

Covering radius and packing radius

For an Aq(n,d) code C (a subset of 𝒜qn), the covering radius of C is the smallest value of r such that every element of 𝒜qn is contained in at least one ball of radius r centered at each codeword of C. The packing radius of C is the largest value of s such that the set of balls of radius s centered at each codeword of C are mutually disjoint. From the proof of the Hamming bound, it can be seen that for t=⌊12(d−1)⌋, we have:

s ≤ t and t ≤ r. Therefore, s ≤ r and if equality holds then s = r = t. The case of equality means that the Hamming bound is attained.

Perfect codes Codes that attain the Hamming bound are called perfect codes. Examples include codes that have only one codeword, and codes that are the whole of 𝒜qn. Another example is given by the repeat codes, where each symbol of the message is repeated an odd fixed number of times to obtain a codeword where q = 2. All of these examples are often called the trivial perfect codes. In 1973, Tietäväinen proved that any non-trivial perfect code over a prime-power alphabet has the parameters of a Hamming code or a Golay code. A perfect code may be interpreted as one in which the balls of Hamming radius t centered on codewords exactly fill out the space (t is the covering radius = packing radius). A quasi-perfect code is one in which the balls of Hamming radius t centered on codewords are disjoint and the balls of radius t+1 cover the space, possibly with some overlaps. Another way to say this is that a code is quasi-perfect if its covering radius is one greater than its packing radius.

See also Gilbert-Varshamov bound Griesmer bound Johnson bound Plotkin bound Rate-distortion theory Singleton bound

Notes

References P. J. Cameron; J. A. Thas; S. E. Payne (1976). "Polarities of generalized hexagons and perfect codes". Geometriae Dedicata. 5 (4): 525–528. doi:10.1007/BF00150782. S2CID 121071671. Hill, R. (1988). A First Course In Coding Theory. Oxford University Press. ISBN 0-19-853803-0. MacWilliams, F. J.; N.J.A. Sloane (1977). The Theory of Error-Correcting Codes. North-Holland. ISBN 0-444-85193-3. Pless, V. (1982). Introduction to the Theory of Error-Correcting Codes. John Wiley & Sons. ISBN 0-471-08684-3. Roman, S. (1992), Coding and Information Theory, GTM, vol. 134, New York: Springer-Verlag, ISBN 0-387-97812-7 Tietäväinen, A. (1973). "On the nonexistence of perfect codes over finite fields". SIAM J. Appl. Math. 24: 88–96. doi:10.1137/0124010. van Lint, J. H. (1992). Introduction to Coding Theory. GTM. Vol. 86 (2nd ed.). Springer-Verlag. ISBN 3-540-54894-7. van Lint, J. H. (1975). "A survey of perfect codes". Rocky Mountain Journal of Mathematics. 5 (2): 199–224. doi:10.1216/RMJ-1975-5-2-199.

Worked examples

Example 1 — a first encounter with Hamming bound

Start with the simplest possible case. Write down what Hamming bound claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Hamming bound before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Hamming bound ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Hamming bound

In research
Hamming bound appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Hamming bound in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Hamming bound is common in secondary-school and first-year university syllabi. It links to neighbouring topics Coding theory, so understanding it makes those chapters shorter.
In everyday life
Look for Hamming bound outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Hamming bound” →

How to study Hamming bound in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Hamming bound means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Hamming bound out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Hamming bound in simple terms?

In mathematics and computer science, in the field of coding theory, the Hamming bound is a limit on the parameters of an arbitrary block code: it is also known as the sphere-packing bound or the volume bound from an interpretation in terms of packing balls in the Hamming metric into the space of al…

Why does Hamming bound matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Hamming bound?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Hamming bound.

Tags

  • Coding theory

Keep exploring