Skip to content

Repetition Code

A block code that maps each symbol to a constant run of copies, trading rate for distance-based error recovery.

Version
v1 · 2026-10-03 · History
Domain-specific #
13570
Domain group
Formal Sciences
Origin domain
Information Theory
Subdomains
Coding Theory, Error Control → Information Theory
Aliases
N-fold repetition code, Constant-word code

Core Idea

A repetition code maps each symbol to \(n\) identical positions: \(a\mapsto a^n\). For binary symbols, the only valid blocks are \(0^n\) and \(1^n\). Their minimum Hamming distance is \(n\), so a nearest-word decoder corrects up to \(\lfloor(n-1)/2\rfloor\) arbitrary substitutions. A separate validity test can detect up to \(n-1\); majority decoding alone need not report that an error occurred. The rate is \(1/n\).[1][2]

How would you explain it like I'm…

Say It Three Times

Suppose you want to tell a friend 'yes' across a noisy playground. You shout 'yes, yes, yes!' three times. If they mishear one, they still go with what they heard most. A repetition code sends a message several times so mistakes can be caught or fixed.

Repeat to Fix Mistakes

A repetition code is a simple way to protect a message from mistakes. Instead of sending a 0 or a 1 once, you send it several times, like 000 or 111. If noise flips one of the digits, so 111 arrives as 101, the receiver picks whichever digit shows up most, and gets 1. If too many digits get flipped, though, the majority can be wrong. It works, but it's slow, because you send several digits for each one you actually mean.

Majority-Vote Error Correction

A repetition code encodes each symbol as a block of n copies of it: 1 becomes 11111 for n = 5, for example. The only valid codewords for binary are all zeros and all ones. If noise changes some symbols, the receiver can decode by majority vote (for odd n), choosing the valid codeword closest to what arrived. Because the two codewords differ in every one of the n positions, majority decoding is guaranteed to correct up to (n − 1)/2 errors, rounded down. Separately, you can detect anywhere from 1 to n − 1 errors just by checking whether the block is all the same symbol. But detection and correction are different: majority voting will output an answer without telling you anything was wrong. The price is efficiency: only 1 out of every n symbols carries information, a rate of 1/n.

 

A repetition code maps a source symbol a to the length-n block (a, a, ..., a); for a binary alphabet the codewords are 0^n and 1^n. It is a defined encoding map, codeword set and decoding task for a specified error model, not merely repetition in the everyday sense. Distinct constant words differ in all n positions, so the minimum Hamming distance is n. A nearest-codeword (for odd binary n, majority-vote) decoder is guaranteed to correct up to floor((n − 1)/2) substitution errors. Separately, a codeword-validity test detects any 1 through n − 1 substitutions, since no fewer than n changes convert one valid word into another. The two guarantees must not be conflated: majority decoding may output a plausible symbol without flagging corruption. The rate is 1/n.

Scope of Application

The code can protect bits in a noisy communication link or in storage over time. Odd-length binary blocks can be decoded by majority. The distance guarantee does not assume independent errors, although a binary-symmetric-channel probability calculation does.[1][3]

Clarity

Encoding \(1\) as \(111\) and receiving \(101\) illustrates two separate tasks: majority recovers \(1\), while codeword membership flags \(101\) as corrupted. The \(n-1\) detection figure is not an \(n-1\) correction guarantee. Quantum bit-flip repetition is an analogy with different encoding and syndrome operations.[1][2]

Manages Complexity

The code reduces reliability analysis to the spacing of its valid words. The cost is direct: \(n\) channel or storage positions carry only one source symbol. A more elaborate code can use its positions more efficiently, depending on the error model.[1]

Abstract Reasoning

Specify the alphabet, block length, valid constant words and error class. Compute distance before claiming a tolerance bound. Decide whether the receiver needs a recovered symbol, an error flag or both, and choose the corresponding operations. Then separately evaluate probable performance under the actual noise process.[1][2]

Knowledge Transfer

The same constant-word map works for transmission across space and storage across time. It is a specialized Error-Correcting Code, not a claim that channel errors are always independent. Physical correlations and failure rates do not transfer automatically. Over larger alphabets, nearest-word decoding may require an explicit tie rule rather than simple binary majority.[3]

Relationships to Other Abstractions

Local relationship map for Repetition CodeParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Repetition CodeDOMAINDomain-specific abstraction: Error-Correcting Code — is a kind ofError-CorrectingCodeDOMAIN

Current abstraction Repetition Code Domain-specific

Parents (1) — outgoing typed relations

  • Repetition Code is a kind of Error-Correcting Code Domain-specific

    Repetition codes are error-correcting codes.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Repetition Code sits in a moderately populated region (42nd percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Codes, Matrices & Combinatorial Problems (33 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Polyanskiy and Wu, Information Theory author manuscript, §17.2. registry ↩a ↩b ↩c ↩d ↩e

[2] University of Michigan lecture on error detecting and correcting codes. registry ↩a ↩b ↩c

[3] University of Stuttgart, Error Control Coding course. registry ↩a ↩b