Exercise 2.9: Huffman Decoding after Errors
From LNTwww
(Redirected from Aufgabe 2.9: Huffman-Decodierung nach Fehlern)
We consider Huffman coding according to the following assignment:
- A → 1, B → 01, C → 001, D → 000.
Huffman coding is always lossless. This means:
- If the encoded sequence ⟨cν⟩ is immediately decoded again after the Huffman encoder, the decoding result ⟨vν⟩ is equal to the source symbol sequence ⟨qν⟩.
- If, on the other hand, the reception sequence ⟨rν⟩ does not match the generated code sequence ⟨cν⟩ due to errors during transmission
(0 → 1, 1 → 0), error propagation may occur. - A single bit error can then lead to (almost) all subsequent characters being decoded incorrectly.
Hints:
- The exercise belongs to the chapter Entropy coding according to Huffman.
- In particular, reference is made to the page Influence of transmission errors on decoding .
Questions
Solution
(1) Solution suggestion 3 is correct:
- Below you can see the encoded sequence divided by inverted commas:
- ⟨cν⟩=⟨1′01′001′000′1′1′000′01′001′1⟩.
- This belongs to the following source symbol sequence:
- ⟨qν⟩=⟨ABCDAADBCA⟩.
(2) Solution suggestion 1 is correct:
- With a bit error at position 1, one obtains for the reception sequence:
- ⟨rν⟩=⟨00100100011000010011⟩.
- The inverted commas clarify the individual blocks of decoding:
- ⟨rν⟩=⟨001′001′000′1′1′000′01′001′1⟩.
- This leads to the following sink symbol sequence:
- ⟨vν⟩=⟨CCDAADBCA⟩.
Interpretation:
- AB is replaced by C , the further text CDAADBCA is unchanged, but shifted by one position.
- However, if you compare the first nine symbols of the original with the decoding result position by position, as an automaton would do, you will recognise eight different symbols.
(3) The correct answers are 1 and 3:
- An additional bit error at position 2 (0→1) falsifies AB to BA, but all further symbols are recognised correctly again.
- An additional bit error at position 15 (0→1) leads to
- ⟨rν⟩=⟨0_01′001′000′1′1′000′1_′1′001′1⟩⇒⟨vν⟩=⟨C_CDAADAA_CA⟩.
- Due to the bit error at position 1 (1→0) , AB is falsified to C , i.e. a character is "swallowed". The additional bit error at position 15 (0→1) turns B into the tuple AA. After that, all symbols in the correct position are recognised correctly, starting with CA.
- An additional bit error at position 10 (1→0) on the other hand, leads to
- ⟨rν⟩=⟨0_01′001′000′0_′1′000′0′1′001′1⟩⇒⟨vν⟩=⟨C_CDAADB_CA⟩.
- The bit error at position 10 turns AA into B. The decoder thus swallows a total of two characters. All subsequently decoded characters are then not in the correct position.
(4) Solution suggestion 2 is correct:
- The first bit error at position 6 (1→0) yields
- ⟨rν⟩=⟨101′000_′000′1′000′0′1′001′1⟩⇒⟨vν⟩=⟨ABD_DAADBCA⟩.
- The first C becomes a D. All other symbols are decoded correctly.