Finding an Ambiguous Encoded Message
Some variable-length assignments allow the same encoded stream to describe several distinct symbol sequences.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace one collision
Assign A=0 and B=00. Stream 00 could mean B or two copies of A without an additional boundary. The mapping of messages to streams is not injective.
Choose an unambiguous format
Fixed lengths, delimiters with escaping, and suitable variable codes can provide boundaries in different ways. A prefix-free code gives one condition ensuring early identification.[1][2]
Exhibit two parses of exactly the same bits
Let A use zero, B use one and C use zero-one. Stream 01 can encode C or the pair A then B. A reader cannot reconstruct the intended message from that stream alone under this code. See prefix-free codes.
C → 01
AB → 0 followed by 1 → 01
Competing symbol sequences share one binary representation
Distinguish this witness from the general prefix condition
Not every code lacking the prefix property is ambiguous. Some require a more involved decoder yet remain uniquely decodable. To disprove uniqueness, give two actual complete parses.