Content deleted Content added
m Disambiguating links to Code word (link changed to Code word (figure of speech); link changed to Code word (figure of speech)) using DisamAssist. |
m Fixing broken anchor: 2015-09-27 #Homomorphisms and e-free homomorphisms in formal language theory→Homomorphism#Formal language theory |
||
Line 21:
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''.
Using terms from [[formal language theory]], the precise mathematical definition of this concept is as follows: let S and T be two finite sets, called the source and target [[alphabet (computer science)|alphabets]], respectively. A '''code''' <math>C:\, S \to T^*</math> is a [[total function]] mapping each symbol from S to a [[String (computer science)|sequence of symbols]] over T. The '''extension''' <math>C'</math> of <math>C</math>, is a [[Homomorphism#
=== Variable-length codes ===
|