Prefix code: Difference between revisions

Content deleted Content added
m spelling
J.Dong820 (talk | contribs)
Line 26:
==Related concepts==
A '''suffix code''' is a set of words none of which is a suffix of any other; equivalently, a set of words which are the reverse of a prefix code. As with a prefix code, the representation of a string as a concatenation of such words is unique. A '''bifix code''' is a set of words which is both a prefix and a suffix code.<ref name=BPR58>Berstel et al (2010) p.58</ref>
An '''optimal prefix code''' is a prefix code with minimal average length. That is, assume an alphabet of {{mvar|n}} symbols with probabilities {{math|p(A_i)}} for a prefix code {{mvar|C}}. If {{mvar|C'}} is another prefix code and <math>λ_{i}^{1}</math> are the lengths of the codewords of {{mvar|C'}}, then
<math>\sum_{i=1}^n { y_i^2 }\!</math>
{{math|{{!}}''x''{{!}}}} of a [[real number]]&nbsp;{{mvar|x}}
 
==Prefix codes in use today==