A code is a set of -tuples
of elements ("words") taken from an alphabet.
In combinatorics on words, a variable-length code is a set of words whose concatenations have unique decompositions into members of the set. A complete bayonet code is defined by such a condition on an augmented set.
The designation "code "
is also given to the
th
totalistic cellular automaton in
Wolfram's enumeration (2002, pp. 60-70).
A variable-length code is complete if every word over the alphabet occurs as a contiguous factor of a concatenation of codewords. An uncompletable word witnesses failure of completeness. For a sofic shift, unique decipherability and completeness can be defined relative to the blocks of the shift.