Content deleted Content added
Tag: Reverted |
m Reverted edits by 2409:4072:6E1E:BCF4:4BC:BEB9:DEFE:C953 (talk) to last revision by Larry Hockett: editing tests |
||
Line 14:
In [[information theory]] and [[computer science]], a code is usually considered as an [[algorithm]] that uniquely represents [[symbols]] from some source [[alphabet (computer science)|alphabet]], by ''encoded'' strings, which may be in some other target alphabet. An extension of the code for representing sequences of symbols over the source alphabet is obtained by concatenating the encoded strings.
Before giving a mathematically precise definition, this is a brief example. The mapping
:<math>C = \{\, a\mapsto 0, b\mapsto 01, c\mapsto 011\,\}</math>
is a code, whose source alphabet is the set <math>\{a,b,c\}</math> and whose target alphabet is the set <math>\{0,1\}</math>. Using the extension of the code, the encoded string 0011001 can be grouped into codewords as 0 011 0 01, and these in turn can be decoded to the sequence of source symbols ''acab''.
|