Repetition Code Definition
A repetition code is a block code that maps each input bit to a fixed sequence of identical symbols. It is a basic form of , because the receiver uses the repeated symbols to estimate the original bit without requesting a retransmission.
For a repetition factor , the encoder transmits each input bit times. This introduces . With an odd and hard decisions, the decoder selects the majority value in each block, while the code rate is .
R3 Repetition Code: Encoding and Decoding
A common example is the R3 code, also called the (3,1) repetition code. It maps one information bit to a block of three transmitted bits.
- To send a logical '0', the transmitter sends the sequence
000. - To send a logical '1', the transmitter sends the sequence
111.
Majority Decoding
The decoder counts the symbols in each three-bit block and outputs the value that occurs at least twice:
If the block contains at least two 0s:
000, 001, 010, 100
→ Decoded as '0'
If the block contains at least two 1s:
111, 110, 101, 011
→ Decoded as '1'
Correction Capability and Limits
R3 corrects one flipped bit in a three-bit block when the decoder uses majority decisions. If two bits in the same block are flipped, the received block has the wrong majority and the original bit is not recovered.
Example of successful correction:
1. Sender wants to send: 1
2. Encoded and transmitted signal: 111
3. Noise corrupts the signal. Received signal: 101
4. Decoder's majority vote (two 1s, one 0) → Decodes to the correct value: 1.
Example of failure:
Two flipped bits reverse the majority decision.
1. Transmitted signal: 111
2. Two bit flips change the signal. Received signal: 001
3. Decoder's majority vote (one 1, two 0s) → Decodes incorrectly to: 0.
Formal Properties: Hamming Distance
The error-handling capabilities of a code are determined by its . For the R3 code, the only valid codewords are and , and they differ in 3 positions, so .
- A code with minimum distance can detect up to errors when the received word is checked for validity. For R3, this bound is errors.
- The guaranteed correction bound is . For R3, it is error.
For an independent binary symmetric channel with bit-flip probability , hard-decision R3 has decoded-bit error probability . This expression assumes independent flips and majority decoding.
Advantages and Disadvantages
Advantages
- Simplicity: They are easy to understand, implement in hardware, and analyze.
Disadvantages
- Low Code Rate: The code rate is the ratio of information bits to transmitted bits. For R3, the rate is , so two-thirds of the transmission is redundant overhead. Sending a 1 MB file requires transmitting 3 MB of encoded data.
- Limited Correction: R3 corrects one error per block under majority decoding. A burst can flip two or more bits in one block and exceed that guaranteed bound.
- Increased Delay and Bandwidth: Sending three bits for each information bit triples the transmission time at a fixed bit duration or requires three times the physical bit rate for the same effective data rate.