A Message Over an Alphabet

A source alphabet lists the discrete symbols a message can contain. The choice of symbols can be bytes, tokens, or another agreed unit.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace two treatments of one text
  2. State what the decoder recovers
  3. Count message positions and distinct symbols separately
  4. Validate what constitutes an alphabet member

Trace two treatments of one text

The word café can be counted as four Unicode code points or five UTF-8 bytes. An alphabet of bytes and an alphabet of code points describe different messages. See text encoding.

State what the decoder recovers

A codec may promise exact original bytes or a sequence of decoded values. Lossless record round trips show why that representation is part of the contract.[1][2]

Count message positions and distinct symbols separately

Over alphabet red, blue and green, message red-blue-red has length three even though it uses only two distinct symbols. Encoding a symbol may use more than one character in a textual display. The message unit is the agreed symbol. See sets versus sequences.

Alphabet: {red,blue,green}
Message positions: red,blue,red
Alphabet size 3, message length 3, distinct used 2

Validate what constitutes an alphabet member

A decoder should distinguish an empty message from an invalid symbol. If symbols are multi-character, define token boundaries. Test an unused valid symbol and an unknown one.

References

  1. Claude E. Shannon, A Mathematical Theory of Communication ↩
  2. David J. C. MacKay, Information Theory, Inference, and Learning Algorithms ↩