4 - Ordered Trees
Published online by Cambridge University Press: 05 June 2012
Summary
Uniquely Decipherable Codes
Let Σ = {0, 1, …, σ – 1}. We call Σ an alphabet and its elements are called letters; the number of letters in Σ is σ. (Except for this numerical use of σ, the “numerical” value of the letters is ignored; they are just “meaningless” characters. We use the numerals just because they are convenient characters.) A finite sequence a1a2…al, where ai is a letter, is called a word whose length is l. We denote the length of a word w by l(w). A set of (nonempty and distinct) words is called a code. For example, the code {102, 21,00} consists of three code-words: one code-word of length 3 and two code-words of length 2; the alphabet is {0, 1,2} and consists of three letters. Such an alphabet is called “ternary”.
Let c1,c2,…,ck be code-words. The message c1c2…ck is the word resulting from the concatenation of the code-word c1 with c2, and so on. For example, if c1 = 00, c2 = 21, and c3 = 00, then c1c2c3 = 002100.
A code C over Σ (i.e., the code-words of C consist of letters in Σ) is said to be uniquely decipherable (UD) if every message constructed from code-words of C can be broken down into code-words of C in only one way. For example, the code {01, 0,10} is not UD because the message 010 can be parsed in two ways: 0,10 and 01, 0.
- Type
- Chapter
- Information
- Graph Algorithms , pp. 65 - 84Publisher: Cambridge University PressPrint publication year: 2011