Information Transmission and Coding
Information Transmission and Coding
net/publication/285351535
Codes
CITATIONS READS
93 325
2 authors, including:
Stavros Konstantinidis
Saint Mary's University
96 PUBLICATIONS 960 CITATIONS
SEE PROFILE
All content following this page was uploaded by Stavros Konstantinidis on 04 January 2016.
Codes1
H. Jürgensen, S. Konstantinidis
1. Introduction
Codes are formal languages with special combinatorial and structural prop-
erties which are exploited in information processing or information trans-
mission. In this application, codes serve several different purposes. In the
following discussion we assume the well-known model of information trans-
mission consisting of a source S sending information to a recipient R via a
channel C as illustrated in Fig. 1.1. Before actual transmission, the informa-
tion is encoded using an encoder γ and, before reception, it is decoded using
a decoder δ. During transmission, the encoded information may undergo
changes due to environmental conditions or faults in the channel; the poten-
tial presence of such changes is modelled by a source N of noise. Moreover,
the information may be overheard or even altered during transmission by a
hostile participant F .
In this model, S and R may, but need not be distinct physical objects,
and C may represent any kind of physical channel, a wire, a compact disk,
a computer memory, a nerve connection, a computer program, radio waves
– anything accepting an input and producing an output. In this handbook
chapter we consider only discrete channels which operate in discrete time
steps and which use discrete signals. We represent the signals processed by
a channel as symbols over some alphabet. Hence, we model a channel as
a device which, for input strings – finite, one-sided infinite, or bi-infinite
sequences of symbols –, produces output strings. Input strings are called
messages and output strings are called received messages in the sequel.
The purposes of the encoding γ and the decoding δ include the following:
• translation between the alphabets used by S, C, and R;
• reduction of the effect of noise on C;
• adaptation of the information rates at which S, C, and R operate;
1
We gratefully acknowledge the support of this work by the Natural Sciences
and Engineering Research Council of Canada, Grant OGP0000243. We also thank
colleagues and friends, especially F. Gécseg and K. Salomaa, for their comments
on an earlier version of this chapter.
2 H. Jürgensen and S. Konstantinidis
F
....
......
........
...
.........
........
...
• data compression;
• information security.
A very basic requirement is that γ and δ operate correctly, that is,2 that
δ(γ(w)) = w for every message w. This assumes that the channel, without
noise and tampering by F , will output w when it gets w as input.3 This
requirement is not sufficient when noise is present or when F might change
messages.
For implementation reasons, γ is usually assumed to work by symbols,
that is, γ acts as a homomorphism,4 mapping the output symbols of S onto
input words of C. The decoding δ, on the other hand, usually cannot work
on a symbol-by-symbol basis. This raises the following issues:
• delay of decoding, that is, how much of an encoded message δ needs to see
before it can issue its first output symbol with certainty;
• delay of synchronization, that is, how much of an encoded message δ needs
to see after an interruption before it can again start decoding correctly.
These issues are very important from the point of view of applications as
they determine the speed at which the system may operate.
In the presence of noise, another set of problems needs to be addressed:
• the presence of errors in a received message needs to be detected;
• some errors in the received message should be corrected.
2
A weaker assumption would be sufficient in general, that is, that δ(γ(w)) be
what S “intends” it to be. However, mathematically, this does not make a signifi-
cant difference.
3
This assumption, while reasonable in most physical situations, can be avoided
as shown in Section 5.
4
Also transducer-based encoding methods are frequently used – for example con-
volution codes –, in particular for certain error correction or data compression
applications; see [99] and [103].
Codes 3
5
The cryptographic literature has a special meaning for the word code which is
quite different from its meaning in coding theory (see [67], for example); on the
other hand, the notions of encryption in cryptography and encoding in coding and
information theory are nearly identical. Hence, we use encoding to mean both and,
for now, code to mean the system employed.
6
This terminology is quite unfortunate. The lengths of code words in such a code
are not variable as the term might suggest, but they vary.
4 H. Jürgensen and S. Konstantinidis
properties of such codes. We refer to [4] and [123] for the theory of variable-
length codes.
Even with the focus just on language theoretic and combinatorial aspects
of variable-length codes, the field is so wide that we cannot cover everything
in this survey, not even all major aspects. In view of this, we finally decided to
present mostly material that is not readily available in any book on codes. We
intend this survey to complement existing book publications and to interpret
the material in the context of information transmission systems. We hope
to present a unifying view of the field incorporating some of its language
theoretic as well as some of its communication theoretic aspects.
The theory of variable-length codes originated in concrete problems of in-
formation transmission. Its language theoretic branch has taken a direction,
however, which was often guided more by mathematical considerations than
by issues of the application. This is by no means intended to be a criticism of
the work or the results; in fact, some very deep insights about the combina-
torics on words have been obtained as results of research on codes and many
unexpected applications, aside from information transmission, of the theory
of codes have been detected. Whenever appropriate, we emphasize the in-
formation theoretic considerations that motivate some of the constructions.
Also in this respect, this survey will complement the existing literature on
codes.
This handbook chapter is structured as follows: After this introductory
section, we introduce the notation and some basic notions in Section 2. Some
effort is spent to set up a very precise notation for words, languages, and
factorizations of words. For example, we distinguish between word schemata,
instances of word schemata, and words – the latter being equivalence classes
of instances of word schemata. This permits us to give precise meanings
to notions like channel, code, factorization, decoding, synchronization even
when bi-infinite messages are considered and noise must be assumed to be
present on the channel. Of course, for an intuitive understanding of the field,
the reader may just substitute their usual language theoretic counterparts,
as far as they exist; for a completely unambiguous treatment, however, a
formalization like ours is inevitable. In fact, we even omitted a few details
that were not absolutely needed for the presentation in this article.
In Section 3, we then introduce the notions of channel and code. We single
out the class of P-channels as a class defined by a set of physically convincing,
but very general properties. The notions of message, received message, unique
decodability are defined. Moreover, we discuss the decidability of unique
decodability.
In Section 4, we introduce the general notions of error-correction, syn-
chronization, and decoding. For channels permitting insertions, deletions,
and substitutions of symbols it is decidable whether a finite language is error-
correcting for finite messages. The notions of synchronization and decoding
reveal that the properties of P-channels are not restrictive enough to yield
Codes 5
nication time. In Section 12, we briefly present codes that can be or are
used for certain kinds of noisy channels. We discuss some basic issues about
modelling noisy channels and the construction of error-correcting codes for
arbitrary noisy channels.
Finally, Section 13 contains a few concluding remarks.
This handbook chapter on codes is not intended to recount the history
of the theory and applications of codes. We cite only work which is directly
relevant to the material presented. We treat the books [4] by Berstel and
Perrin and [123] by Shyr as standard references for a large part of the earlier
results and, in general, do not trace results back to the original authors. In
these books one can usually find the references to the originals. Despite this,
our list of references is quite long and it is still very far from being complete.
nω o
0 < 1 < 2 < ··· < < ζ.
−ω
7
The similarity with ordinal numbers is intended.
8
By the definition of word schemata, there is no arbitrariness in the selection of
S(w) except when w is bi-infinite.
8 H. Jürgensen and S. Konstantinidis
8
< Iw = {0,
1, 2, 3} indices for [[w, 5]] 5 6 7 8
(a) 1, if i = 1, symbols 0 1 0 0
: w(i) =
0, if i 6= 1 indices for [[w, −10]] −10 −9 −8 −7
( Iw = ω
indices for [[w, −2]] −2 −1 0 1 ...
(b) 1, if i = 1, symbols 0 1 0 0 ···
w(i) =
0, if i =
6 1 indices for [[w, 0]] 0 1 2 3 ...
8
< Iw = ζ indices for [[w, −2]] ... −4 −3 −2 −1 ...
(c) 1, if i = −1, symbols ··· 0 1 0 0 ···
: w(i) = 0, if i =
6 1 indices for [[w, 0]] ... −2 −1 0 1 ...
Fig. 2.1. Examples of equivalent instances of word schemata: (a) finite word
schema; (b) right-infinite word schema; (c) bi-infinite word schema.
• For a word w let I(w) be the set of all instances9 of S(w); similarly, for a
word schema v, let I(v) be the set of all instances of v; moreover, let v be
the equivalence class of all instances of v.
• For any instance u of a word schema, let S(u) be an arbitrary but fixed
word schema with u ∈ I(S(u)) such that, if u and v are instances of word
schemata and u ≈ v, then S(u) = S(v).
This seemingly cumbersome distinction between words, word schemata, and
instances of word schemata is needed in some cases in the sequel to avoid
ambiguity. When no ambiguity is possible in the given context, we just use
the term word. In several situations, however, this distinction is essential to
make statements precise.
Consider word schemata w and v. Their concatenation wv is defined if
and only if Iw + Iv is defined and, in this case,
9
By definition, w itself is the set of all instances of S(w); we introduce this
notation, albeit redundant, to avoid confusion.
Codes 9
For I ∈ I, let X I be the set of all words w such that IS(w) = I; let X <I =
≤I
J
= X <I ∪ X I ; finally, let X ∗ = X <ω , X ¨ = X ≤ζ , and let
S
J<I X and X
∗
X = X \ {λ} where λ denotes the empty word,10 that is, the word with
+
The index set of [ϕ] is the set of i for which such j and k exist. Intuitively,
[ϕ] is the word schema over X which is obtained as the concatenation of the
images of ϕ in the given order such that the occurrence of ϕ(0) starts at
position 0. We illustrate the typical situations in Fig. 2.2.
Definition 2.1 For y ∈ S(X ¨ ) and Y ⊆ S(X ¨ ), a factorization11 of y
over Y is a mapping ϕ of an index set Iϕ into Y such that [ϕ] ∼ y. Two
factorizations ϕ and ϕ0 of y over Y are said to be equivalent, ϕ ∼ ϕ0 , if there
is an integer n such that n + Iϕ = Iϕ0 and ϕ(i) = ϕ0 (n + i) for all i ∈ Iϕ .
10
In the sequel we use λ also to denote the empty word schema. The precise
meaning will be clear from the context.
11
For simplification we often speak of factorizations over a set K of words rather
than word schemata; in such cases, it is implied that the factorization is over S(K).
10 H. Jürgensen and S. Konstantinidis
ϕ(j)(0)
ϕ(j)(k) . . . ϕ(0)(0) . . .
↓ ↓ ↓ ↓
(b) . . . .........................•.........................•.............................................................................•..................................................•
↑ ↑ ↑ ↑
i 1 − |ϕ(0)| 0
0
P
1− |ϕ(l)|
l=j
Fig. 2.2. The typical arrangement of symbols in [ϕ]: (a) the cases of Iϕ = ζ or
Iϕ ≤ ω, shown for i ≥ 0 and i0 < 0; (b) the case of Iϕ = −ω. In both cases the
upper row shows the symbols; the lower row shows the indices.
v ∼ √ w if and only if v = w.
As mentioned before, we use a simplified and more intuitive notation when
there is no risk of ambiguity. Thus, with X = {0, 1}, the word w = 0010
would be used to describe the word schema w with Iw = 4, w(0) = w(1) =
w(3) = 0, and w(2) = 1. Similarly, we write v = · · · 010101 to denote the
word schema v with Iv = −ω, v(0) = v(−2) = v(−4) = 1, v(−1) = v(−3) =
v(−5) = 0, and, presumably, v(−2i) = 1, v(−2i − 1) = 0 for all i ∈ N0 .
The reverse notation is used for word schemata in S(X ω ). Even in the case
of word schemata in S(X ζ ), we sometimes use this simplified notation; for
example u ∈ S(X ζ ) with u(2i) = 1 and u(2i − 1) = 0 may just be written as
u = · · · 010101010 · · · when the actual values of the indices are not relevant.
Moreover, as often done in the literature, we indicate factors by enclosing
them in parentheses. For example, factorizations of u over K = {01, 10} can
12
When n ∈ N0 , we usually write Y n instead of Y n .
Codes 11
be described by
u = · · · (01)(01)(01)(01)(0 · · · = · · · 0)(10)(10)(10)(10) · · · .
Let v = [ϕ] and Y 0 = {w, w0 } where w 0 = ww, that is, Iw0 = 6, w0 (0) =
w0 (2) = w0 (3) = w0 (5) = 0, and w 0 (1) = w0 (4) = 1. Then v has infinitely
many non-equivalent factorizations over Y 0 . For example, in addition to ϕ,
also ϕ0 with Iϕ0 = ζ, ϕ0 (2i) = w 0 , and ϕ0 (2i+1) = w for i ∈ ζ is a factorization
of v over Y 0 . Fig. 2.3 illustrates this situation.
Fig. 2.3. The word schema [ϕ] for ϕ, w, ϕ0 and w0 as in Example 2.1.
u
(a)
w
u
(b)
w
u
(c)
w
Fig. 2.4. Illustration of prefix, suffix, and infix: (a) u is a prefix of w; (b) u is a
suffix of w; (c) u is an infix of w.
that is, hyiγ is the set of word schemata that can be obtained as output of
γ when y is used as the input. For Y ⊆ S(X ¨ ), let
[
hY iγ = hyiγ .
y∈Y
for all n, n0 ∈ Z.
The conditions P0 –P3 correspond, roughly, to the following physical assump-
tions: Infinite time periods do not exist, that is, for a message of which we
don’t know the beginning or the end or both, a channel cannot provide that
information; on the other hand, if a message has a definite beginning or a
13
Physical channels sometimes have different alphabets for input and output.
Modelling this is straightforward, but not necessary in the context of this handbook
chapter.
14 H. Jürgensen and S. Konstantinidis
definite end then the channel cannot hide these forever. The noise in a chan-
nel is a property of the channel and not of the messages – this is similar to
the notion of additive noise in information theory. Error-free information
transmission is always possible. If there is no input, then it is always possible
that there is no corresponding output, regardless of the delay. While most
physical channels will have these properties, channels with memory might
violate P2 .
On the other hand, conditions P0 –P3 are really very weak. For instance,
in P2 , if ([[v 0 , n0 ]] | [[v, n]]) ∈ γ then ([[uv 0 w, n0 ]] | [[uvw, n]]) ∈ γ for all
u, w ∈ S(X ¨ ) with [[uvw, n]] ∈ π2 (γ), but it is not guaranteed that the factor-
ization (u)(v 0 )(w) is γ-admissible for the factorization (u)(v)(w). Similarly,
if (u0 )(v 0 w0 ) and (v 0 )(w0 ) are γ-admissible factorizations of u0 v 0 w0 and v 0 w0 ,
respectively, for (u)(vw) and (v)(w), respectively, then one cannot conclude
that (u0 )(v 0 )(w0 ) is a γ-admissible factorization for (u)(v)(w). This situation
may seem rather unnatural. It cannot, however, be avoided in general as it
permits one to model the case when the noise may depend on the message.
Classical error models assume that message and noise are statistically inde-
pendent; for certain types of modern information transmission media this
assumption seems to be not quite adequate.
14
Strictly speaking, with high enough probability.
Codes 15
input times: 0 1 2 3 4 5 6 7 8 9 10 11 12
input word 0 0 1 0 1 1 0 1 0 1 1 0 1
output word 0 1 0 1 0 1 1 0 1 1 0 0 1
output times: 1 2 3 4 5 6 7 8 9 10 11 12 13
Fig. 3.1. Timing of channel inputs and outputs in the presence of insertions and
deletions.
· · · 010101010 · · · = · · · (01)(01)(01)(01)(0 · · ·
= · · · 0)(10)(10)(10)(10) · · · .
15
The terminology and notation for codes in the context of infinite messages seems
to be still evolving. In [21] two kinds of codes are condidered for bi-infinite words,
biω-codes and Z-codes. The former are our ζ-codes. The latter require unique
factorizations, and not just unique factorizations up to equivalence. As already
noted in [21], the notion of Z-code is not really natural in the context of information
processing.
16 H. Jürgensen and S. Konstantinidis
for all j ∈ ζ. Then [ϕ] = [ϕ2 ][ϕ1 ] and [ϕ](l) = v(l + i + 1) for all l ∈ ζ.
(4) The language K = {0, 01, 11} is a ∗-code and even a (−ω)-code, but not
an ω-code because of (0)(11)ω = (01)(11)ω .
The η-codes, for η ∈ {∗, −ω, ω, ζ} form a proper hierarchy (see [21], [128],
and [20], for example).
Proposition 3.1 The following proper inclusions obtain:
n ω o
K
Kζ ( ( K∗ .
K−ω
z w
}| {
... v v ... v ϕ1 (0) ϕ1 (1) ϕ1 (2) ...
... v ϕ2 (0) ... ϕ2 (j − 1) ϕ2 (j) ϕ2 (j + 1) ϕ2 (j + 2) . . .
| {z }
w
Theorem 3.2 Let η ∈ {∗, −ω, ω, ζ}. The following question is decidable:
Given a deterministic finite automaton accepting a language K ⊆ X + , is K
an η-code?
16
In [128], ω-codes are referred to as ifl-codes.
18 H. Jürgensen and S. Konstantinidis
Proofs of Theorem 3.2 rely on two main ideas: If a message has two
distinct factorizations over K then there are words in K which can be made
to overlap each other; when K is regular the possible sequences of overlaps
have certain periodicity properties.
We illustrate the concept of overlap by a small example. Consider a lan-
guage K ⊆ X + and a ∗-message w having two non-equivalent factorizations
ϕ1 and ϕ2 over K. The typical situation is shown in Fig. 3.3. There the
word schemata u0 , u1 , u2 , u3 , v0 , v1 , v2 are assumed to be elements of S(K).
The word schema u0 is proper prefix of v0 ; the rest of v0 is a proper prefix
of u1 ; the rest of u1 is a prefix of v1 ; u2 is an infix of v1 ; the rest of v1 is a
prefix of u3 ; the rest of u3 is equal to v2 .
u0 u1 u2 u3
v0 v1 v2
Fig. 3.3. A finite word schema with two distinct factorizations.
17
See [4], [110] (reprinted in [41]), [40], [12], [127], [74], [78], [76], and the work
cited there.
Codes 19
Some of the results discussed in the present section have been extended
to infinitary or even bi-infinitary codes, that is, subsets of X ≤ω or of X ¨ . To
achieve this, the concatenation of words u, v ∈ X ¨ , so far defined only when
u ∈ X ≤−ω and v ∈ X ≤ω , is extended by letting
½
u, if u ∈ X ω ∪ X ζ ,
uv =
v, if u ∈ X ≤−ω and v ∈ X −ω ∪ X ζ .
Third, the recipient may be unable to afford the cost of decoding as un-
bounded memory may be required. For example, consider the ∗-code K of
Example 3.1(4). For every n ∈ N0 , 01n ∈ K ∗ with the factorization
½
n (0)(11)(11) · · · (11), if n is even,
01 =
(01)(11)(11) · · · (11), if n is odd.
To determine even just the first factor, one has to wait until the end of the
complete message and, in the meantime, store this message in the decoder.
In this particular example one might argue, that the storage cost grows
only as log n; but this is still unbounded and, moreover, just a special property
of this example.
One could also argue in this example that the recipient can safely decode
everything following 01 in the word above as only 11 is found, possibly shifted
by one position. However, the interpretation of 11 may depend on whether
the received message starts with 0 or with 01. For example, 0 and 01 might
mean don’t use and use, respectively; and the sequence of occurrences 11
might encode what the recipient is supposed not to use or to use. Thus,
knowledge of the intermediate code words would be quite useless before the
first one is known.
To solve the first problem, one uses codes with prescribed error-correction
capabilities. To address the second problem, one introduces the notion of
synchronization delay and uses codes which are uniformly synchronous. To
address the third of these issues, one introduces the notion of decoding delay
and uses codes with bounded decoding delay, possibly even with delay 0, the
prefix codes.
In the formal language theory branch of coding theory, the notions of
synchronization delay and decoding delay are only considered for noiseless
channels.18 In this handbook chapter we develop these notions for the general
framework of P-channels. They specialize to the usual ones for the case of
noiseless channels. Moreover, we show that some fundamental properties of
these concepts continue to obtain even in the presence of noise.
Definition 4.1 Let γ be a P-channel and let η ∈ {∗, ω, −ω, ≤ω, ≤−ω, ζ, ≤ζ}.
(a) A language K is (γ, η)-detecting if it is an η-code and, for every η-
message w over K, hwiγ ∩ S(K η ) = {w}. In this case we also say that
K is a (γ, η)-detecting code.
(b) A language K is (γ, η)-correcting if it is an η-code and, for all η-messages
u and w over K with u 6= w, one has huiγ ∩ hwiγ = ∅. In this case we
also say that K is a (γ, η)-correcting code. Let Kγη be the class of (γ, η)-
correcting codes.
18
[41] is an exception; we briefly discuss that approach in Section 5. In that work
a different type of channel model is used.
22 H. Jürgensen and S. Konstantinidis
0 6 ×0011)(0
(×0 1 5
101) = (08 110×)(0
1 4 ×101)
0
∈ h(07 10011)(05 101)iγ ∩ h(08 1101)(05 101)iγ .
and
h01011iγ = {01011, 1011, 0011, 0111, 0101}.
The set K is an ω-code. Consider an ω-message w over K. Then v ∈ hwiγ
can start with any of the word schemata in h0001iγ ∪ h01011iγ .
If v starts with 001 then w could start with 0001 or with 01011. If
the next symbol in v is 0 then w starts with 0001; if it is 1 then the
initial part of w could be ×001
0 ×1011
0 or 0×0110
1 · · · with deletions as
indicated. The first case is impossible as the two deletions are too close
to each other. Therefore, w starts with 01011. Using the fact that γ is a
P-channel, we can now remove 01011 from w and 0011 from v and look
at the remaining word schemata.
If v starts with 0001 or 000 then w starts with 0001; if it starts with
01011, 1011, 0111, or 0101 then w starts with 01011. As before, we can
remove this part from v and the corresponding code word from w.
Codes 23
Extending these considerations one can show that K is even (γ, ζ)-
correcting.
(4) The language K = {0011, 010111} is (γ, ∗)-correcting for the channel γ
permitting at most one deletion among any six consecutive symbols. On
the other hand, because of
(0011)(10111)ω = (00111)(01111)ω
∈ h(0011)(010111)ω iγ ∩ h(010111)ω iγ
The condition on |K| in Proposition 4.1 is needed. For example, for the
channel γ permitting at most one deletion in every six consecutive symbols,
the language {000000} is (γ, ζ)-correcting and also (γ, ω)-correcting, but not
(γ, ∗)-correcting.
In the presence of noise, the decidability problem answered for the noise-
less channel in Theorem 3.2 takes the following form: For given K, η, and γ
decide whether K is a (γ, η)-correcting code. For finite K, η = ∗ and a large
natural class of channels, one can show that this question is decidable [70].
This result, to be explained in the sequel, extends the Sardinas-Patterson
Theorem (Theorem 3.2 for finite languages and η = ∗) to noisy channels.
24 H. Jürgensen and S. Konstantinidis
19
SID channels as defined in [59] do not handle bursts well. A modification of the
model is discussed in [58].
Codes 25
20
For a noiseless channel the implication holds true trivially; see [4], for example.
26 H. Jürgensen and S. Konstantinidis
z1 w1 , w2 z2 ∈ S(K ≤η ), z1 w1 w2 z2 ∈ S(K η ),
(b) There exists an integer n ∈ N0 such that every pair (x, y) with x, y ∈
hS(K n )iγ is (γ, η)-synchronizing provided there exist w1 , w2 ∈ S(K n )
with (x)(y) γ-admissible for (w1 )(w2 ).
Proof: Because of the choice of η one has Lη = L≤η for any subset L of X ∗ .
We can, therefore, use η instead of ≤η in this proof.
Assume that statement (a) is true. Let n be the (γ, η)-synchronization
delay of K. Let x, y ∈ hS(K n )iγ be such that, for some w1 , w2 ∈ S(K n ),
(x)(y) is γ-admissible for (w1 )(w2 ). Note that, as K is (γ, η)-correcting, w1
and w2 are uniquely determined if they exist. Let u, v ∈ S(X η ) such that
uxyv ∈ hS(K η )iγ .
The assumption that K is uniformly (γ, η)-synchronous implies:
(1) There exist z1 , z2 ∈ S(X η ) such that z1 w1 , w1 z2 , z1 w1 z2 ∈ S(K η ), and
(u)(x)(yv) is γ-admissible for (z1 )(w1 )(z2 ).
(2) There exist s1 , s2 ∈ S(X η ) such that s1 w2 , w2 s2 , s1 w2 s2 ∈ S(K η ), and
(ux)(y)(v) is γ-admissible for (s1 )(w2 )(s2 ).
It follows that z1 w1 , w2 s2 ∈ S(K η ) and, therefore, z1 w1 w2 s2 ∈ S(K η ). We
need to prove that (u)(xy)(v) is γ-admissible for (z1 )(w1 w2 )(s2 ).
By (1), u ∈ hz1 iγ ; by assumption, xy ∈ hw1 w2 iγ ; by (2), v ∈ hs2 iγ .
By (2), uxy ∈ hs1 w2 iγ with s1 w2 ∈ S(K η ). As x ∈ hw1 iγ and w1 ∈
S(K n ), there exist t1 , t2 ∈ S(X η ) such that t1 w1 , w1 t2 , t1 w1 t2 ∈ S(K η ) and
(u)(x)(y) is γ-admissible for (t1 )(w1 )(t2 ). Thus, uxy ∈ ht1 w1 t2 iγ , ux ∈
ht1 w1 iγ , and xy ∈ hw1 t2 iγ . Moreover, ux ∈ hz1 w1 iγ and xy ∈ hw1 w2 iγ . As
K is (γ, η)-correcting, one has t1 w1 t2 = s1 w2 , t1 w1 = z1 w1 , and w1 t2 =
w1 w2 , hence, t1 = z1 , t2 = w2 , and z1 w1 = s1 . Similarly, using xyv ∈
hw1 z2 iγ and y ∈ hw2 iγ , one shows that w2 s2 = z2 . Hence, z1 w1 w2 = s1 w2 ,
w1 w2 s2 = w1 z2 , and z1 w1 w2 s2 = s1 w2 s2 . Therefore, uxy ∈ hz1 w1 w2 iγ ,
xyv ∈ hw1 w2 s2 iγ , and uxyv ∈ hz1 w1 w2 s2 iγ as needed.
For the converse, assume that statement (b) is true. Let w ∈ S(K n+n ),
w ∈ hwiγ , and u, v ∈ S(X η ) with uw 0 v ∈ hS(K η )iγ . There are w1 , w2 ∈
0
Example 4.2 Consider the code K = {0001, 01011} over the alphabet X =
{0, 1}. For the noiseless channel γ, K is uniformly (γ, ∗)-synchronous with
delay 1. On the other hand, if γ is the channel permitting at most one deletion
in every five consecutive symbols then K is not uniformly (γ, ∗)-synchronous.
First note, that K is (γ, ∗)-correcting. A γ-received ∗-message over K
will start with 000, 0010, 0011, 010, 011, or 101; in the first two cases, the
first code word used is 0001 and in the latter four it is 01011 – due to the
characteristics of γ. Moreover, the start of the factorization of the received
28 H. Jürgensen and S. Konstantinidis
21
Note: This argument is only true for this particular type of situation; it cannot
be generalized.
22
Instead of decodable and decoding delay often also the terms decipherable and
deciphering delay are used; see [4], for example.
23
The codes in Lrdecodable are usually referred to as codes with finite decoding (or
deciphering) delay; see [4]. In [128] they are called codes with bounded decoding
delay; the codes with finite decoding delay of that work form a different and larger
class of codes. In [44] and [14] algorithms are presented for determining the decoding
and synchronization delays of finite ∗-codes, and the complexity of these algorithms
is determined.
Codes 29
Example 4.3 Let X = {0, 1} and let γ be the channel permitting at most one
deletion in every four consecutive symbols. Let K = {u, v} with u = 0011
and v = 1100. K is (γ, ω)-correcting. Consider the input word
(uv)ω = 0011110000111100 · · ·
(0011)(1100)(0011)(1100) · · · .
For noiseless channels γ, the finite right (γ, ∗)-decodable codes are pre-
cisely the finite ω-codes.
Theorem 4.5 [74], [78] For a finite set K ⊆ X + , one has K ∈ Lrdecodable if
and only if K ∈ Kω .
30 H. Jürgensen and S. Konstantinidis
p s p0 s0
.................................................................... ....................................................................
5. Homophonic codes
In cryptography, a homophonic cipher is a system which, to every source
symbol, may assign several encryptions (see [67], for example). The purpose
of a homophonic cipher is to obscure statistical properties of the message. For
example, for a message in plain English, a homophonic cipher would provide
many different encodings of the most frequent letters – like the letter e – so
that applying a statistical analysis to the cryptogram would not expose its
encryption. Cryptographic aspects of homophonic ciphers are discussed in
[37] and [53]; see also [60] for an analysis of the limitations of the method.
A homophonic encoding f of an alphabet X into an alphabet Y is a
mapping of X into the set of non-empty subsets of Y + , the idea being that,
for encoding a word over X, one independently and non-deterministically
encodes each symbol in the word according to f and then concatenates the
results. Such encodings have been investigated in [117], [12], [15], and [13] as
multi-valued codes. Beyond their cryptographic interpretation, homophonic
codes can also be considered in the context of error correction. To do so, we
construct a channel from a given homophonic code in such a way that the
error behaviour of the channel reflects the variations of possible encodings.
Our construction is slightly more general than required for homophonic codes.
The foundations of the theory of channels and codes – of error correction,
synchronization, and decoding – in the framework to which the homophonic
codes belong was first given in a series of articles leading to and later com-
bined in the book [41] of 1974. To our knowledge, this was the first system-
atic attempt to lay the foundations of a comprehensive and uniform theory
of variable-length codes for noisy channels. We explain below how that work
relates to the model used in this handbook chapter. For detailed results of
that research we refer the book [41] itself.
Definition 5.1 Let X and Y be alphabets and f ⊆ X × Y ∗ . Let
¡ ¢
K = f (X) = {w | ∃x ∈ X (x, w) ∈ f }.
A word schema y ∈ S(Y ¨ ) is an f -encoding of a word schema x ∈ S(X ¨ ) if
there is a factorization ϕ of y over K such that Iϕ = Ix and (x(i), ϕ(i)) ∈ f
for all i ∈ Ix .
Let Ff ⊆ X ¨ × Y ¨ be the relation
Ff = {(x, y) | x ∈ X ¨ , y ∈ Y ¨ , S(y) is an f -encoding of S(x)}.
The relation Ff is the encoding determined by f .
32 H. Jürgensen and S. Konstantinidis
¯ y, y 0 ∈ S(Y ¨ ), n, n0 ∈ Z,
½ ¯ ¾
0 0
γg,f = ([[y , n ]] | [[y, n]]) ¯
¯
∃x ∈ X ¨ (x, y) ∈ Fg ∧ (x, y 0 ) ∈ Ff
¡ ¢
f = {(0, 111), (0, 110), (0, 101), (0, 011), (1, 000), (1, 001), (1, 010), (1, 100)}.
If g maps 0 onto 111 and 1 onto 000 then the resulting channel permits at
most one substitution in every code word. Thus, for example, (110 | 111)
would be a possible channel behaviour. On the other hand, if g maps 0 onto
000 and 1 onto 111 then the channel would be quite different; for example
(111 | 000) would be a possible channel behaviour.
Not every channel of the form γg,f is an SID channel. This is true even
under severe restrictions on g and f . As shown in Example 5.1, the possible
errors are determined by a given factorization of the input message whereas,
for an SID channel, the possible error patterns – like one insertion in every
five consecutive symbols – do not and cannot take a given factorization into
account.26 Conversely, not all SID channels can be modelled in the form γf,g .
In a strict sense, the SID channel model may be closer to the physical error
situation; practically, the differences may be not so important.
In general, channels of the form γg,f may not even be P-channels. How-
ever, under some natural assumptions they have most of the essential prop-
erties of P-channels.
24
The notion of encoding is not intended to imply unique decodability.
25
A homophonic code can be considered as a one-to-many relation.
26
The same problem arises, by the way, also with the classical substitution-error
model for block codes as, for instance, expressed by the Hamming or Lee metrics;
also there, a factorization is assumed to be given.
Codes 33
Proposition 5.1 Let X and Y be alphabets, let K be a ζ-code (in the usual
sense) over Y with |K| = |X|, and let g be a bijection of X onto K. Let
f ⊆ X × Y + such that, g ⊆ f . The channel γg,f is stationary and satisfies
conditions P0 , P1 , P2 , and P3 .
Proof: If ([[w 0 , n0 ]] | [[w, n]]) ∈ γg,f then ([[w 0 , k 0 ]] | [[w, k]]) ∈ γg,f for every
k, k 0 ∈ Z and, therefore, γg,f is stationary.
Condition P0 is satisfied as, for all x ∈ X, g(x) ∈ Y + and π2 (f ) is a
non-empty subset of Y + .
Condition P2 is satisfied as g ⊆ f and γg,f is stationary.
Condition P3 is satisfied as (λ, λ) ∈ Ff ∩ Fg .
We turn to proving that condition P1 is satisfied. Consider (y 0 | y) ∈ γg,f .
Let y = [[w, n]] and y 0 = [[w0 , n0 ]] where w, w 0 ∈ S(Y ϑ ) for some ϑ ≤ ζ. Let ϕ
be a factorization of w over some set Z ⊆ S(π2 (γg,f )) ∩ S(X + ) with Iϕ 6= ∅.
Note that S(π2 (γg,f )) = S(π2 (Fg )). Thus [ϕ] ∼ w and w 6= λ 6= [ϕ]. As
w ∈ S(π2 (Fg )), there exists x ∈ S(X ϑ ) and a factorization κ of w over K
such that Ix = Iκ and g(x(i)) = κ(i) for all i ∈ Ix . As [κ] ∼ w, Iκ 6= ∅.
As K is a ζ-code, there are, for all i ∈ Iϕ , unique ri ∈ Iκ = Ix and li ∈ N0
such that ϕ(i) = κ(ri ) · · · κ(ri + li ) and ri+1 = ri + li + 1.
Similarly, there is a factorization κ0 of w0 over S(π2 (f )) such that Iκ0 =
Ix = Iκ and, for all i ∈ Ix , (x(i), κ0 (i)) ∈ f .
We define a factorization ϕ0 as follows: Let Iϕ0 = Iϕ and, for i ∈ Iϕ , let
ϕ (i) = κ0 (ri ) · · · κ0 (ri + li ). Then [ϕ0 ] ∼ [κ0 ] ∼ w0 .
0
In algebraic terms this says that a language K is a code if and only the
semigroup generated by K, with concatenation of words as multiplication, is
free with K as a free set of generators.27 Condition Ccode can be considered
as expressing a kind of independence among the elements of K.
Many different classes of codes have been introduced to satisfy various
constraints regarding decodability, synchronizability, or fault-tolerance. The
classes of infix codes and solid codes mentioned before are examples of such
classes – constructed to avoid certain overlap situations which could some-
times render decoding difficult. More about the latter of these two classes of
codes is said in Section 11.
In this section we analyse the idea underlying most constructions of nat-
ural classes of codes. The key notion is that of independence in universal
algebra. Independence in the sense of being a free set of generators is the
special example defining the class of all codes.
Dependence theory in universal algebra extends ideas from linear algebra
to other types of algebras and deals with notions of the following kind: in-
dependent set; an element depends on a set; span of a set; minimal spanning
27
This property can be simplified by assuming already that n = m [123].
36 H. Jürgensen and S. Konstantinidis
set; dimension. In essence, this theory has two branches which have very
little in common: one based on a purely set theoretic model and one based
on the notion of freeness in algebras. An introduction to the former can be
found in [16];28 for the latter, an introduction is given in [34]. The relation
between the two approaches is analysed in [31]. We follow the former, as it
is suitable for the problem.29
We now outline the basic concepts of dependence theory. We give a few
more details than absolutely required for our application to help the reader
put the concepts into a broader context.
Definition 6.1 Let S be a set. A dependence system on S is a subset D of
2S which has the following property: L ∈ D if and only if there is a finite,
non-empty subset L0 of L with L0 ∈ D. The subsets of S which are in D are
called D-dependent. All other subsets of S are D-independent.
By definition, every subset of an independent set is independent; in par-
ticular, the empty set is independent. Every superset of a dependent set is
dependent.
Example 6.1 Let S = X + for an alphabet X. Let Dcode be the set of all
non-empty subsets L of X + which are not codes, that is, which are not freely
generating L+ . Thus, a set K ⊆ X + is Dcode -independent if and only if there
is no finite subset L of K which does not freely generate L+ , that is, if and
only if K is a code.
In Definition 6.1, the set L0 can be of any size. We also need a notion of
dependence for the case when the size of L0 is bounded.
Definition 6.2 Let n ∈ Nℵ0 . A dependence system D on the set S is said to
be an n-dependence system if and only if it satisfies the following condition:
L ∈ D if and only if there is a non-empty subset L0 of L with |L0 | < n and
L0 ∈ D.
Of course, an ℵ0 -dependence system is just a dependence system without
any restriction. The dependence system of Example 6.1 is an ℵ0 -dependence
system; as a consequence of results in [51] one finds that it is not an n-
dependence for any n ∈ N. In the context of universal algebra in general,
that is, not just that of semigroups, the dependence described in Example 6.1
is sometimes called standard dependence.
For n ∈ Nℵ0 , let D(n) (S) be the class of n-dependence systems on S. We
usually omit n when n = ℵ0 . For D ∈ D(n) (S), let LD be the family of
28
The relevant chapter of that book contains several errors; see [32] for corrections
and further explanations.
29
Note that dependence theory in the sense to be used is part of the general
framework of the theory of matroids [143]. In our specific case, that of classes of
codes, however, the more restrictive properties of matroids never obtain.
Codes 37
D-independent subsets of S. Let L(S) be the class {LD | D ∈ D(S)} and let
L(n) (S) = {LD | D ∈ D(n) (S)}.
Remark 6.1 Let D and D 0 be an n-dependence system and an n0 -dependence
system on the set S, respectively. Then D ∪ D 0 is an m-dependence system
on S with m = max(n, n0 ).
In contrast to Remark 6.1, the intersection of two dependence systems
need not be a dependence system.
Definition 6.3 Let D be a dependence system on S, and let a ∈ S and
X ⊆ S. The element a is said to depend on X if a ∈ X or if there is an
independent subset X 0 ⊆ X such that X 0 ∪ {a} is dependent. The span of X,
hXi, is the set of all elements of S which depend on X. If X is independent
and hXi = S then X is called a basis of S. A set X is said to be closed if
hXi = X.
Of course, the standard example of dependence is linear dependence in
vector spaces. We are, however, concerned with far more general depen-
dences. We review some of the basic properties of dependence systems needed
in our present context.
Recall that a mapping C : 2S → 2S is a closure operator if, for every
X ⊆ S, one has X ⊆ C(X) and C(C(X)) = C(X) and, moreover, X ⊆ Y
implies C(X) ⊆ C(Y ) for all X, Y ⊆ S. A closure system on S is a set C ⊆ 2S
which is closed under arbitrary intersections. With a closure system C one
associates the closure operator CC by
\
CC (X) = Y.
X⊆Y ∈C
CC = {X | X ⊆ S, C(X) = X}.
In general, the span does not satisfy the equation hXi = hhXii. For
example, let S = {a, b, c} and D = {{a, b}, {b, c}, {a, b, c}}. Then ∅, {a},
{b}, {c}, and {a, c} are the independent sets. Clearly, hai = {a, b} and
hhaii = {a, b, c}.
y∈
/ hXi ∧ y ∈ hX ∪ {z}i ⇒ z ∈ hX ∪ {y}i.
y∈
/ α(X) ∧ y ∈ α(X ∪ {z}) ⇒ z ∈ α(X ∪ {y}),
then there is a transitive dependence D such that α(X) = hXi for all
X ⊆ S.
For transitive dependence systems, one can define the notions of basis
and dimension in a meaningful way. For vector spaces, for example, linear
dependence defines dependence systems; the basis and dimension obtained
in this way coincide with their linear counterparts.
In the context of the theory of codes, the set S is the free semigroup X + ,
that is, the set of all non-empty finite words over X with concatenation as
the multiplication operation. The dependence considered in Example 6.1 is
an example of a standard dependence [16], [31]. In this case, the dependence
is not transitive as shown by the following example.
Example 6.2 Let X = {0, 1} and consider the words v = 01, w = 0110,
u = 100110, and z = 010110. Then the sets {u, v}, {v, w}, and {u, v, z} are
codes, while the sets {u, v, w} and {v, w, z} are not codes. Thus, w ∈ hu, vi,
z∈/ hu, vi, but z ∈ hhu, vii.
Codes 39
Prefix codes have been studied extensively – see [4] for an account of the
work until about 1985. Every prefix code is a code. However, for example,
the set {0, 01} is a code, but not a prefix code.
Prefix codes have (right) decoding delay 0 for a noiseless channel. As a
consequence, every prefix code is an ω-code. The language {0, 10, 11} is a
prefix code, but not a (−ω)-code.
For most major results of information theory, the restriction from codes to
prefix codes does not make a difference of any significance. Prefix codes have
a natural interpretation as labelled trees – each code word describes a path
from the root to a leaf – and, hence a natural description by automata. Their
tree description applies to algorithmic problems, like searching or sorting.
Decisions in a search algorithm correspond to the choice of the next symbol
in a code word and, hence, the number of decisions in a search is bounded
from below by the length of the corresponding code word. An excellent
account of the application of prefix codes to the analysis of algorithms can
be found in [1].
• By duality, one defines the class Ls of suffix codes:
Every 2-ps-code is a 2-code. However, the language {0, 010} is a 2-code, but
not a 2-ps-code. Therefore, L2-ps ( L2-code .
• Between the classes of 3-ps-codes and 2-ps-codes there is another class
of languages, interesting for its combinatorial properties, the class of g-3-ps-
codes:
A language is Dg-3-ps -dependent if it is D2-ps -dependent or if
(Cg-3-ps ) there are three distinct words u, v, w ∈ L such that {u, v} is
D -dependent and {v, w} is D -dependent [49].
p s
Bifix codes are also called biprefix codes in the literature. Their main merit
is that they are both, ω-codes and (−ω)-codes, and that they have some very
interesting mathematical properties (see [4]).
The language K = {01, 10} is a bifix code, but not a ζ-code. For example,
the ζ-message · · · 010101010 · · · has two non-equivalent factorizations over K.
In the general context of information transmission via a noisy channel γ,
the bifix property has the following interpretation – assuming appropriate
30
That the inclusions are proper follows from results discussed in Section 10 below.
42 H. Jürgensen and S. Konstantinidis
One has Lp1 = Lp and Ls1 = Ls . The classes Li1 and Lo1 are the classes Li
and Lo of infix codes and outfix codes, respectively [63], [52], [38], [50]. The
corresponding dependences are Di = Di1 and Do = Do1 .
The relation between shuffle codes is shown in Fig. 6.1. Lines indicate
proper inclusions. The language {(0k 1k )n 0k | k ∈ N} is in Lin ∩ Lon , but not
in Lpn+1 ∪ Lsn+1 , and the language {(0k 1k )n | k ∈ N} is in Lpn ∩ Lsn , but not
in Lin ∪ Lon [90]. The language {(01)n 0, 1n } is in Lon , but not in Lin ; the
language {(01)n 0, 0n+1 } is in Lin , but not in Lon ; {1n , (01)n } is in Lpn , but
not in Lsn ; {1n , (10)n } is in Lsn , but not in Lpn . Some further properties
of shuffle codes are mentioned in Section 8 below. Note that L4-ps can be
considered as the largest member of the families of shuffle codes.
The shuffle codes of index n address the following error situation to some
extent: Insertions at up to n positions or deletions at up to n positions cannot
31
The letters i, o, p, and s stand for infix, outfix, prefix, and suffix, respectively.
The classes of shuffle codes have been introduced also under various other names.
Codes 43
L pn ∪ L s n
..........
..... .........
..... .....
...
...... .....
. .....
..... .....
........ .....
....... .....
.....
...
Lpn .......
..
.
.
.....
... Lsn
.....
..... .........
..... .... ...
..... ..
..... .....
..... .....
..... .........
..........
...
.. Lp ∩ Ls
... n n
...
...
...
...
.. L ∪ L on
..... in
..... .....
........ .........
..
. .... .....
.
.... .....
..... .....
..... .....
..... .....
....... .....
...
Lin .........
..
.... Lon
..... .........
..... . ....
..... ..
..... .....
..... ....
..... .....
..... ........
..........
...
... Li ∩ Lo
... n n
...
...
...
...
.. Lp
......... n+1 ∪ Lsn+1
......... .........
. ...... .....
..
.... .....
..... .....
..... .....
..... .....
........ .....
.....
Lpn+1 ..
. Lsn+1
Fig. 6.1. Relations between the shuffle codes. All inclusions indicated are proper.
turn a code word into another code word. In general, the shuffle codes do
not, however, have useful synchronization capabilities. If synchronization is
not a problem32 then these codes detect up to n bursts of insertions or up to
n bursts of deletions in a code word.
• The class Lh of hypercodes [124], [42], [130]:
32
In some applications, synchronization is provided through a separate signal.
44 H. Jürgensen and S. Konstantinidis
Statement (a) is proved in [50] using the Pumping Lemma for regular
languages. Statement (b) follows from Lxn ⊆ Lo . Statement (c) is a con-
sequence of the Pumping Lemma for context-free languages. Statement (d)
follows from Lxn ⊆ Lo2 . For (e), see [123]. This reference contains also
further information about hypercodes.33
• The class Lu of uniform codes (or block codes):
Nearly all codes in practical use for error correction or error detection are
uniform codes. Moreover, to enable the construction of such codes with pre-
dictable properties and simple algorithms for coding and decoding, additional
structural properties are assumed. Normally, X is assumed to be a finite field
and the code K is assumed to be a finite-dimensional vector space over X.
See [94] or [99] for further information about uniform codes.
Uniform codes are good at detecting or correcting substitution errors
when synchronization between coder and decoder is not a problem – for
example, in the presence of a common error-free clock signal.
• The classes Lintern of intercodes of index n for n ∈ N [125], [144]:
33
Parts of Theorem 6.2 have also been proved independently in [89] and [132].
34
The term comma-free refers to the fact that no special synchronization symbol –
a comma – is needed for synchronization without delay. For further information
about intercodes and comma-free codes see [123] and [4].
Codes 45
• As in the case of K∗ = Lcode , one can also consider the classes Lm-intern
of m-intercodes of index n and the classes Lm-inter of m-intercodes for n, m ∈
N [123]:
Details about the relations between these classes of codes are shown in
Fig. 6.2. Note that L1-inter = Q, that L1-inter is a proper subclass of L2-code ,
and that L2-inter is a proper subclass of Lb ∩ Q. The sets Dm-intern and
Dm-inter are (m + 1)-dependence systems.
• The class Lol-free of overlap-free languages:
A language L ⊆ X + is Dol-free -dependent if there are words
½
(Col-free )
u1 , u2 , u3 ∈ X + such that u1 u2 , u2 u3 ∈ L.
Not every Dol-free -independent set is a code. For example, the language
L = {0, 01, 001} is not a code as (0)(01) = (001), but is overlap-free. As
mentioned in the context of Theorem 3.2, the notion of overlap is crucial for
decoding and synchronization. An instance of a word u ∈ X + found in a
message over an overlap-free language K can never be both, a proper prefix
and a proper suffix of a word in K.
In the literature, a word w ∈ X + is called unbordered if the set {w} is an
overlap-free language.
• The class Lsolid of solid codes:
The solid codes are remarkably strong in the presence of errors that result in
loss of synchronization. A detailed discussion of properties of solid codes is
given in Section 11 below.
46 H. Jürgensen and S. Konstantinidis
L2-code •..... . . .
... ..
... ..
... ..
... ..
... ..
... .• ... Lcode = K∗
... ...
... ...
... ...
... ...
L1-inter ...
... L
.
•..... .... .
...
. • b
=Q ...
... .........
....
.....
... ......
... ...........
.
•...........
Q ∩ Lb ...
...
...
...
•...........................
L2-inter .
.
...........
........... L3-inter
.•...........
. . ................
.
........... L4-inter
. . ...........
. .
.
.
.
.
•..........................
........... L5-inter
. . . ...........
. . . ..•
.. . .
. . . . ...
. . . . ...
. . . . ...
L2-inter3 .
•.......................... . .
. . . ...
...
. . . L(2n+1)-inter
. . . ...
.... ...........
........... . L . .
.
... .•............ 3-inter3 . .
. .. .
•. . . . . .
. .
... .... ..................... .
... ... ........... .. L . .
.
...
...
............ 4-inter3 .
...
...
...
...
• .. ..........
... ........... .
.
.
.
...
...
...
........... . .
... ... ... ........... L5-inter . ...
..
... ... ... •.. . . . . . 3 .
...
. . .•
... ... ... ... . .
. ...
....... . . . . .
L2-inter2 •.... ................... .
....
.
....
.
....
.
. . . . ... L inter
.. ...........
........... ... L
. ... ... ... . ...
... .•............ 3-inter2 .... ... . . . .. . . . . .
... ... ................ .. ... . . .•.
... ... ........... .
. . . . . ...
............. L4-inter .. . . ...
... ... .•........ 2 ... .. ...
... ... ..... ...................... . . ... L(2n+1)-intern = . . . = Lintern
... ... ..... ........... ... . .. . . . . .
...... .......... .. .
........... •
... ... .
.. ....
... ... .....
... ... ..
......
. ...
..................
.. ..
L2-inter1 •........................ ... ......... ...........
...........
........... .. ... ........... L5-inter2 = . . . = Linter2
........... ................................
.•....
L3-inter1 = . . . = Linter1
Precircular codes are introduced in [19] to study ζ-codes for noiseless chan-
nels. The class Lprecirc is incomparable with K−ω and Kω , it is properly
contained in K∗ and properly contains Kζ and Lcircular . The classes Kζ and
Lcircular are incomparable. For further information about precircular codes,
see also [21].
• The classes Lrsema and Llsema of right semaphore codes and left sema-
phore codes, respectively cannot be defined using dependence systems. A
language K ⊆ X + is a right semaphore code if K is a prefix code such that
X ∗ K ⊆ KX ∗ . By duality, K is a left semaphore code if K is a suffix code
such that KX ∗ ⊆ X ∗ K (see [4], [119], and [123]). One has Lrsema ( Lpi and
Llsema ( Lsi [50].
Any right semaphore code K is a maximal prefix code, that is, not prop-
erly contained in any prefix code. A proper subset K 0 of K is a prefix code,
but not maximal, hence not a right semaphore code. As all subsets of an
independent set are independent, there is no dependence system D such that
Lrsema would be the class of D-independent languages.
Right semaphore codes are interesting for their decoding properties in the
absence of noise. A right semaphore code K has the form X ∗ S \ X ∗ SX +
for some non-empty set S ⊆ X + of right semaphores. In a message over K,
the presence of a right semaphore signals the end of a code word. The error
correction capabilities of right semaphore codes are not known.
Theorem 6.4 [50] A language L ⊆ X + is a p-infix code if and only if it is
a subset of a right semaphore code; it is an s-infix code if and only if it is a
subset of a left semaphore code.
35
See also [96].
48 H. Jürgensen and S. Konstantinidis
Thus, the class Lpi of p-infix codes is the smallest class of languages which
can be defined by a dependence system and contains the class Lrsema of right
semaphore codes. By duality, Lsi is the smallest class of languages which can
be defined by a dependence system and contains Llsema .
Theorem 6.5 [39] A language L ⊆ X + is an infix code if and only if it is
the intersection of a right semaphore code with a left semaphore code.
• The class Lrefl of reflective codes is defined as follows: A language
K ⊆ X + is reflective if, for every u, v ∈ X ∗ with uv ∈ K, one has vu ∈ K.
A reflective code is a language which is reflective and a code [106]. The class
Lrefl is a proper subset of the class of Li of infix codes. As a subset of a
reflective code is not necessarily reflective, the class of reflective codes cannot
be defined by a dependence system.
Many more classes of codes are considered in the literature – with mo-
tivation ranging from purely combinatorial questions to special concerns in
information transmission. The classes introduced in this section are meant
to serve as paradigms for typical constructions and typical questions.
By [21],
Lcircular ( Lprecirc ( K∗ and Kζ ( Lprecirc .
Codes 49
K∗
.......•.......................................
.........
....... ....... ..............
....... .......
..
........... ....... .........................
.. ....... .............
....... ....... .............
.. .
... ....... .......
....... .............
.............
.
....... ....... .............
.......
. ....... ...........
K −ω •.... ............
. ..
.. .....•
.. .. K
ω ......• . Lprecirc
. .. . ............. ....
....
.......
....... .............. .
.
.
. ...... ................... ...
....... .......
. . .............. ...
... ....... . ..... ...
....
.
.
.......... ......
.
...
... ....... ..... ........
...
.......
....... . .... ..... .....................
. .
.
. .....
... ....... ................................ .
.
. ...
........................ . L
Lldecodable •...................
. ...
ζ •.........
.
.
..
....• rdecodable................• Lcircular
.
.
. ...
.
..........
.......... K .....
...... ..
......
......................
.
.......... ..... ..... ..........
.......... ..... ..... ..........
.......... .. ..... ..........
..........
.......... ........ ..... ..........
.......... ..... ............................
......................
•
Lunif-synch
Fig. 7.1. Inclusions for Theorem 7.1. Lines indicate proper inclusion. The diagram
does not indicate intersections or unions.
By [21],
K1 ∈ (K−ω ∩ Kω ) \ Lprecirc and K2 ∈ Lprecirc \ Kω ,
hence K3 ∈ Lprecirc \ K−ω . Therefore, Lprecirc is incomparable with Kω and
K−ω [21]. By Example 3.1(4), Kω and K−ω are incomparable. By the same
example, also Lldecodable and Lrdecodable are incomparable. Moreover,
and
K1 ∈ (Lrdecodable ∩ Lldecodable ) \ Lprecirc .
Thus, Lprecirc is incomparable with Lldecodable and Lrdecodable . One has
and
K5 ∈ Lcircular \ K−ω .
Hence, Lcircular is incomparable with Kω and K−ω . Moreover,
K1 ∈ Lrdecodable \ Kζ
36
Thus, while it may be quite interesting, in applications of prefix codes and in
proofs concerning prefix codes, to know that ≤p is a partial order, this fact itself
is not essential for the construction.
Codes 51
......... 2-code
L
....•
........ .... ................
........ ........
........ .... ........
............... ... ........
. ........
........ ... ........
..... .......... .
. ........
........
..... .
..... •
.
. L3-code
.... .. ... .. ........
....
........ ... ... . ........
........
. .. .
. ....... ..... ....... .
. ........
.... .
. . ..... .... ........ . ........
........
... .. .. ..... ..... ....... . ........
..
. ...... .... ..... . ........
L2-ps ............. ...
. .
.. .....
. ... .
.
........
......
•... ...........
. .. . n-codes •.... L1-inter = Q
... .... ........ .
. ...
.
. . . .......... . ....
Lg-3-ps •.... ... . .... ....... .
. ...
... ............... . ∗ ...
............. . L = K ...
L3-ps .................. • ........
... . .
..... ... . . ...•.... code ...
...
..... .. . ..
........
........ . ..... ....... .
... .....
........ ...... ...
........ ....... ..... ..
.
. ...
........ .... ..
........ ............... . ....
L4-ps.........• ............
. • . .
......Lprecirc ...
..
... ..... ........ ..
. ...
. ..... ...... .. .
. ........
.....
.. ...
. ....... . ..... ...
.. .
. ........... .. .
... . ... ..... .....
.....
.. ...
............ ........
....
.....
....... .....
.. ...... ........
... . . . .. ...
Lp....•...................
.
..... .. . . . . . .
..•
.... L
.. ... s
.
•.....L
..
..... circular ...
... ........ ..... .. . . ... ....
..
. ........
.. ........... . .... .....
.
. ...
. ........ ..... . . ... .....
... ..
. ........ ....... . . ..
. ...
.. .
.
........
. . ........... . ...
.
.....
.. ...
.. . ........ .. ...... . .... ..... ...
. . ...
.................... .... ..
......
Lpi •....................... L • .. .....................................................
. ......
. .... • .
......................................................si L • . L
..... unif-synch
. ...
.. . ......... b ... .
. .. ...... . ... .......................................... ..... . ....
... . ........
........ . ....... . ..... .. . ... .. ............. ....................................................
. .... .. .. .. .
... . ........ Li ∪ Lo.....• ........ ....... .. .... .... . ... ...... • . Q ∩ Lb
... .. ........
........ .... ...
.. .... .. .. ...... .
. ... . ....... .....
... . ........ ....................................... . ... ..... ...
... . ............. ... ..... ...
... .. L •
...........
.
i.. . ........
•
. L o
. ..
. .
.
.
.....
..... ...
... . . . .
. .. ...
. .
... . .. .. ........... .. . ... .....
. ...
L
... .. .
.
.. .. .......
........
.
.
.
.
.
...
.
.....
...... .
. .. .
• . 2-inter
... . ... . . .. . .. .
.. . . ........... . .. . ..... . . ..
... . . ...... . .
.. ..
...... . .
... .. ..
. . .
...... . . . . . .
... . ...
. . ...... . .. . ........ . .
. . ...... . .. .. ..... . ..
... . ... . . ...... . .. .....
... .. ... . . ...... . .... .
. • .
.
.
... ..
. ...... . ... . . .
. ...... . ... .
...
...
.
. .
.
..
. ...... .
....... .... .
. .
. Linter ...
...
.
. ..
.
. shuffle codes .
. ....... ..
. . .
. .
.
.
.
... . ... . .............. . .
...
.
. ... . .
. .. ........ .. ..
.. . ... ...... . .
... .
. . . .
.
.... .. ...... .
n-intercodes .
... . ... . . ........ .
. ..
... . ... . . ... ...... . .
...
.
. ....
.. ..
.
. .
.
. .
.
...
......
......
..
.
(of index m) .
..
... . .
........
... ...... .. ..... ...... .
..
.
... ...
.
. .. .... ...... . ..
. ...... . .
... ... . . .. .. ...... .. .
..
... .. ...
. . . . ..
. ......
...... . .
. .
... ... .. .
..
.. ...... .. . .
... ... .. .
. .. ..... ...... .
...... .
.
. ..
... ... .. . .. ... ...... . . .
.
... ... . ..
.
. . .. .......
....... . .
.
... .. . ..... ....... .. . .
.. .. . ..
... ... . . .. . ...... . .
Lrsema •.. •.. Lrefl Lh. •..................... •... Llsema ......
•.... Linter1 =
.......
... ....... ....
.... .......
....... ... Lcomma-free
.... ....... ...
... .......
....... ...
Lu •.............. . ....... .
.... . ...•... L
.......
.......
... ........
. .. .. solid
....... .. .
... .
....... ....... ...........
.......
.......
.......
....... .
. ........ ...........
..
....... ....... ...........
....... ....... ...........
....... .........................
.......
....... •...
....... .
.... L ∩ L
....... h solid
.......
....... ....
....... ....
....... ..
......
Lu ∩ Lsolid •
Fig. 7.2. The classes of languages introduced in Section 6. Lines indicate (known)
proper inclusions; dotted lines indicate hierarchies. The diagram does not, in gen-
eral, indicate intersections or unions.
V
By Remark 6.1, DTis a dependence system; it is the largest dependence
system contained in D. Similarly, if D is a family of n-dependence systems
then ^ [
n D = D
D∈D(n) (S),D⊆ D
T
is an
T n-dependence system, hence the largest n-dependence system contained
in D.
Lemma 7.1 [66] For n ∈ Nℵ0 , the algebra (D(n) , ∧
n , ∪) is a complete lattice
(n)
Again, when n = ℵ0 , we usually omit n. By Lemma 7.1, DL is well-defined
as the maximal n-dependence D system such that all L ∈ L are D-inde-
(n)
pendent. If L = LD for some n-dependence system D then D = DL and
LD(n) = L.
L
For an arbitrary set D ⊆ 2S6=∅ , let compl(D) be the set of all subsets L of
S such that L0 ⊆ L for some L0 ∈ D. We say that compl(D) is the completion
of D. For n ∈ Nℵ0 and L ⊆ 2S , one has
(n)
DL ⊆ compl({L | L ∈
/ L, 0 < |L| < n})
minimum.
(b) ψn (L) is a ∪-complete ∪-semilattice. Hence, it has a unique maximum.
Moreover, if L is Subℵ0 -determined then one has:
(n)
(c) DL = compl({L | L ∈ / L, 0 < |L| < n}), and this is the maximum of
Ψn (L).
(d) For every D ∈ ψn (L), there is a minimal D∞ ∈ ψn (L) with D∞ ⊆ D.
This statement relies on Zorn’s Lemma.
(e) There is an n-dependence system D such that L = LD if and only
if ψn (L) has a minimum; moreover, in this case, D = min ψn (L) =
max Ψn (L).
As a consequence of Theorem 7.2 one derives the following Gap Theorem;
it states a condition under which a class of languages will not be characteri-
zable by any n-dependence system.
Theorem 7.3 [66] Let S be a non-empty set, let n ∈ Nℵ0 , and let L, L1 ⊆ 2S .
If L ⊆ L1 ( LD(n) then there is no n-dependence system D with L1 = LD .
L
(n+1)
DLcode = compl({L | L ∈
/ Lcode , 0 < |L| < n + 1})
For the special case of m = ℵ0 , Theorem 7.4 states that the class of
codes cannot be characterized by any n-dependence system with n finite.
Theorem 7.4 is based on a similar result of [65] which, however, is stated there
in terms of finitary relations. It strengthens various non-characterizability
results for the classes of codes by binary relations (see [123]). Moreover, its
proof clearly separates language theoretic from structural issues.
The constructions used for the classes of languages shown in Fig. 7.2
follow three different patterns:
(1) An infinite or finite strictly increasing sequence of n-dependence systems
D1 ( D2 ( · · ·, for a fixed n ∈ Nℵ0 , is used to define a strictly
T decreasing
sequence of classes of codes LD1 ) LD2 ) · · ·. TheSlimit LDi exists
and is the class of independent sets with respect to Di .
The hierarchy of shuffle codes is obtained by a construction of this
kind for n = 3. It starts with the 4-ps-codes and ends with the hyper-
codes.
(2) Starting from a dependence system D and the corresponding class LD
of D-independent sets, one considers the n-dependence systems Dn =
compl(supportn (D)) derived from D and the resulting classes LDn of
Dn -independent sets, where n ∈ Nℵ0 .
This is the construction used in the case of the n-codes and of the
m-intercodes of index n – for fixed n and varying m in the latter case.
A variant of this construction starts with several dependence systems
as in the case of the n-ps-codes of [49] or the n-infix-outfix codes of [91].
(3) An infinite or finite strictly decreasing sequence of dependence systems
D1 ) D2 ) · · · is used to define a strictly increasing sequence of classes
of codes LD1 ( LD2 ( · · ·.
This is the construction used in the case of the intercodes of index n
and, with m varying, for m-intercodes of index n.
Construction method (1) can be purely language theoretic and, thus, outside
the realm of the structural analysis tools provided by dependence theory.
Similarly, construction method (3) may have very few properties permitting
a structural analysis. In either case, this depends very much on the specific
sequences of dependence systems. On the other hand, method (2) turns out
Codes 55
Example 7.1 Let L = {Lp , Ls }. Then Ln+1,L is the class Ln-ps of n-ps-codes
introduced in [49]. Note that, in this case,
Proposition 7.2 [66] Let I be a non-empty set, let m ∈ Nℵ0 , and, for i ∈ I,
S
let mi ∈ Nℵ0 and Li ⊆ 22 . If m ≤ mi for all i ∈ I then i∈I Lmi ,Li ⊆
S
Lm,Si∈I Li .
Theorem 7.5 [66] Let m ∈ Nℵ0 , let I be an arbitrary non-empty set and,
for i ∈ I, let Di be an ni -dependence system where ni ∈ Nℵ0 . Let D = {Di |
i ∈ I}. The following statements hold true:
(a) Lm,D ⊆ Lm,{Vi∈I Di } .
P
(b) If I and each ni is finite and m > i∈I ni − |I| then
[
Lm,D = Lni ,{Di } .
i∈I
2n+1 as shown in Fig. 6.2. Previous proofs of this hierarchy collapse use fairly
involved language theoretic arguments; Theorem 7.5 provides a tool which
is independent of language theory. On the other hand, language theoretic
arguments are definitely needed to prove that the inclusions prior to the
predicted collapse are proper.
in which the quantifier prefix and the formulæ satisfy the following conditions:
• The quantifier prefix involves only universal quantifiers, one for each vari-
able in V actually used.38
• The formulæ are disjunctions of conjunctions of equations and inclusions.
An equation has the form u = v and an inclusion has the form u ∈ Λ,
where u, v ∈ V ∗ ∪ {1}. We refer to the first formula as the premiss and to
the second one as the conclusion.
For lack of a better term, such implications are called basic implicational
conditions.
Definition 8.1 An implicational condition is a conjunction of basic implica-
tional conditions. If I is an implicational condition and (M, L) is a pointed
monoid, then (M, L) is said to satisfy I if I is true on M for Λ = L.
In Table 8.1 we show implicational conditions for some of the language
classes defined in Section 6; in the sequel, we refer to these conditions by the
names assigned to them in that table.
There is a similarity between implicational conditions as introduced and
implications used to define implicationally defined classes or quasivarieties
of algebras (see [100]); the difference is that disjunctions and inclusions are
permitted in our implicational conditions. The full meaning of this similarity
is not known.
38
In a more general setting, quantification over the number of variables and re-
strictions on the domains of variables are also useful [54].
60 H. Jürgensen and S. Konstantinidis
Table 8.1. Implicational conditions for some of the language classes introduced in
Section 6.
The families Lcode , Ln-code for n > 2, Lm-inter , Linter , Q, Lrsema , Llsema ,
and Lh , Lu are not listed in Table 8.1; it seems that some of these cannot be
characterized with implicational conditions as they seem to require existential
quantifiers or quantification over the number of variables. For example, Lh
would be defined by
Ih = ∀n∀x0 , . . . , xn , y1 , . . . , yn
¡ ¢
(x0 · · · xn ∈ Λ ∧ x0 y1 x1 y2 · · · yn xn ∈ Λ) → y1 = · · · = yn = 1 .
The classes L4-ps , L3-ps , Lg-3-ps , and Lm-intern are not listed either; they do,
however, have characterizations by implicational conditions, albeit rather
complicated ones.
Codes 61
Proposition 8.2 [54] The predicates Ipn , Iin , Ion , Isn , Ipn ,sn , Iin ,on , Ipi , Isi ,
Ih , and Isolid are invariant.
Proof idea: Each of the predicates satisfies the following simple conditions:
(1) For any pointed monoid (M, L) and any surjective pointed-monoid mor-
phism ϕ of (M, L), if a premiss is false for some assignment of values in
M to the variables then that premiss is also false for the corresponding
assignment in ϕ(M ).
(2) For any pointed monoid (M, L) and any surjective non-erasing pointed-
monoid morphism ϕ of (M, L), if a conclusion is false for some assignment
of values in M to the variables then that conclusion is also false for the
corresponding assignment in ϕ(M ).
These conditions are sufficient for an implicational condition (even involving
quantification over the number of variables) to be invariant. All the pred-
icates listed satisfy (1) and (2). This is true because the premisses involve
only inclusions and the equations involved in the conclusions are of the form
x = 1. ¤
Note that Iinter1 does not satisfy condition (1) of the proof of Proposi-
tion 8.2, nor does the natural implicational condition Icode for Lcode – even
permitting quantification over the number of variables.
We apply Proposition 8.2 to the classes of codes contained in Li to obtain
a uniform characterization of their syntactic monoids. This characterization
is expressed in terms of the following properties of a monoid M .
(M0 ) M is finitely generated.
(M1 ) M \ {1} is a subsemigroup of M .
(M2 ) M has a zero.
(M3 ) M has a disjunctive element c distinct from 1 and 0 such that c = xcy
implies x = y = 1.
(M4 ) M has a disjunctive zero.
(M5 ) There is an element c ∈ annihil(M ) distinct from 0 such that core(M ) =
{c, 0}.
(M6 ) There is an element c distinct from 0 such that
c ∈ core(M ) ∩ annihil(M ).
For the special case of LP = Li , the clause “and P is true on (M, c)” can
be omitted in all statements of Theorem 8.1. In the proof, it is crucial that
X is chosen in such a way that σL is non-erasing as shown by the following
example.
1, if x = λ,
(
ϕ(x) = c, if x = a,
0, otherwise,
then L = ϕ−1 (c) = {a} is an infix code. On the other hand, if X = {a, b}
with ϕ : X ∗ → M given by
1, if x ∈ b∗ ,
(
ϕ(x) = c, if x ∈ b∗ ab∗ ,
0, otherwise,
then L = ϕ−1 (c) = b∗ ab∗ , and this is not an infix code. This shows that it
is important that the morphism ϕ in the proof of Theorem 8.1 be chosen in
such a way that it is non-erasing, and this is guaranteed when X is a minimal
set of generators.
39
X is a minimal set of generators of M as a monoid! The identity element of M
is obtained from the empty word over X.
64 H. Jürgensen and S. Konstantinidis
40
The language could be given by a grammar or an acceptor or some other com-
puting device; which type, does not matter as long as the device can be effectively
simulated by one of these.
41
See the general exposition on formal languages in this handbook. Other lan-
guage classes, for example those defined by L systems of various kinds, could be
used. As is quite common in formal language theory, very little is known about the
boundary separating decidable from undecidable cases.
42
This table should be used with some care. Empty entries indicate that either
there is nothing interesting to report or we do not know of an existing or readily
available answer; this does not imply that the answer is not known or is difficult to
find.
66 H. Jürgensen and S. Konstantinidis
{ūi0 $ūi1 $ · · · $ūik−1 , @v̄j0 $v̄j1 $ · · · $v̄jk−1 , u0 c/v0 $u1 c/v1 $ · · · $un−1 c/vn−1 }
with ūi0 · · · ūik−1 = v̄j0 · · · v̄jk−1 , where k ∈ N and for all l ∈ k there is h ∈ n
such that ūil = uh and v̄jl = vh . For every set L ⊆ X + with |L| < 4, it is
decidable whether L ∈ DU,V .
Consider
LU,V = ({0, 1}∗ $)∗ {0, 1}∗ ∪ @({0, 1}∗ $)∗ {0, 1}∗
∪ {u0 c/v0 $u1 c/v1 $ · · · $un−1 c/vn−1 }.
The language LU,V is regular. Moreover, LU,V is DU,V -dependent if and only
if (U, V ) has a solution. ¤
As a consequence of Theorem 9.1, further restrictions on the n-dependence
systems under consideration are required. We discuss two such approaches,
the former based on results presented in Section 8 above, the latter based on
automaton theoretic considerations.
Theorem 9.2 [54] Let D be a dependence system satisfying the following
conditions:
(1) There is (effectively) an invariant predicate PD on P such that L ∈ LD
if and only if PD is true on (X ∗ , L).
(2) For every L ∈ LD , σL is non-erasing.
Then, for any (constructively given) regular language L ⊆ X + , it is decidable
whether L is D-independent.
68 H. Jürgensen and S. Konstantinidis
Theorem 9.3 [62] Let T be an abstract storage type with decidable emptiness
problem. Then, for any T-[n, X]-automaton A and any regular languages
L1 , . . . , Ln over X, it is decidable whether L(A) ∩ L1 × · · · × Ln is empty.
43
The details concerning the connection between n-ary relations and (n + 1)-de-
pendence systems are explained in [66], but are not essential in the present context.
70 H. Jürgensen and S. Konstantinidis
Table 9.2. Language classes and abstract storage types proving decidability.
44
A different transducer-based technique is used in [43] to decide other code-
related problems.
Codes 71
Note that Theorem 10.3(c)–(d) are used in [49] to show that L3-ps (
L2-ps ( L2-code .
Numerous results characterizing L-maximal sets of a given family L exist
in the literature (usually satisfying certain additional conditions). Several of
these can be found in [6], [146], [120], [118] for Lp and Ls , [142], [30], [29],
[23], [109] for Lcode , [7] for Lrdecodable , [124] for Lh , and [51] for L2-code .
The basic question raised, but not solved by these results is as follows:
Given two dependence systems D and D 0 on X + such that LD ⊆ LD0 ,
under which condition C on L and depending on D and D 0 is it true
that L being LD -maximal implies that L is also LD0 -maximal?
Taking into account that LD ⊆ LD0 if and only if D 0 ⊆ D, one can consider
the following variant of this question:
Given a condition C, for any dependence system D what are the mini-
mal dependence systems D 0 with D 0 ⊆ D such that L being LD -maximal
implies that L is LD0 -maximal?
Similarly, one could start with D 0 and ask for a characterization of maximal
dependence systems D with the corresponding properties. From the applica-
tion point of view, any condition C that excludes no regular languages – or
at least no finite languages – would still be of interest.
We now turn to the second issue: Let L be a family of languages and
L ∈ L; can L be embedded in an L-maximal, a finite L-maximal, or a regular
L-maximal language? The following rather general result implies that the
first problem, that of embedding L in an L-maximal language can always be
achieved when L is the family of D-independent sets for some dependence
system D.
45
For the noiseless channel, ∗-words, and right decoding.
76 H. Jürgensen and S. Konstantinidis
46
Using the property of unique error decompositions, solid codes seem to have
been introduced first in [126]. The definition used in this handbook chapter was
derived as a characterization in [64]. With our present definition, solid codes were
introduced already much earlier in [77] as strongly regular codes and re-named in [84]
into codes without overlaps.
Codes 77
ϕ(i) ∈ S(K 0 ), contradicting the definition of K 0 . Therefore, |ψ(i + 1)| > |x|.
But then ϕ(i + 1) is an infix of ψ(i + 1) or a proper prefix of ϕ(i + 1) is equal
to a proper suffix of ψ(i + 1), contradicting the assumption that K is a solid
code. This proves ϕ = ψ. The case of η = −ω is settled by duality.
Now, let η = ζ. We distinguish two cases.
Suppose there exists l ∈ ζ such that, with respect to both ϕ and ψ, a
factor starts at position l in w. Let these be the factors with numbers i
and j respectively. If ϕ(i) = λ then i is even and ϕ(i + 1) ∈ S(K), hence
ϕ(i + 1) 6= λ; in this case we use i + 1 instead of i, and similarly for ψ and
j. Hence, without loss of generality, we assume that ϕ(i) and ψ(j) are both
non-empty. For n ∈ ω, let
Definition 11.1 Let ϑ ≤ ω and let X and Y be alphabets with |X| > 1
and |Y | > 1. Let K ⊆ Y + such that |K| = |X| and let f be a bijection of
X onto K. A state-invariant decoder for f without look-ahead is a finite
deterministic ϑ-transducer A = (Y, X, Q, δ, µ) with the following properties:
(1) For all v ∈ K and all q ∈ Q, µ(q, v) = f −1 (v).
(2) For all v ∈ K, all proper prefixes u of v, and for all q ∈ Q, µ(q, u) = λ.
Theorem 11.3 [111] Let ϑ ≤ ω, let X and Y be alphabets with |X| > 1 and
|Y | > 1, let K ⊆ Y + such that |K| = |X| and let f be a bijection of X onto
K. Then K is a solid code if and only if there is a state-invariant decoder
for f without look-ahead.
Proof: Let K and f be given and let A = (Y, X, Q, δ, µ) be a state-invariant
decoder for f without look-ahead. Suppose that K is not a solid code. We
distinguish two cases.
Case 1: There are u, v ∈ K such that u is a proper infix of v. In this case,
v = v1 uv2 for some words v1 and v2 with at least one of v1 and v2 non-empty.
For any q ∈ Q, one has µ(q, v1 ) = λ. Let q 0 = δ(q, v1 ). If v2 6= λ then v1 u is
a proper prefix of v and, by this, µ(q, v1 u) = λ; on the other hand,
{0}, if i = 0,
S
Ki,n = 1K(j1 , n) · · · K(jn , n), if i > 0.
j1 ,j2 ,...,jn ∈N0
j1 +j2 +···+jn =i−1
Let [
K(n) = K(i, n).
i∈N0
Then K(n) is a prefix code; every word in K(i, n) has length ni + 1 and
contains i occurrences of the symbol 1; every word is a prefix of some word
in K(n); moreover, µ ¶
1 ni + 1
|K(i, n)| = .
ni + 1 i
Now consider an injective length-monotonic mapping κ : N0 → X ∗ such that
Kκ = K(2). One computes that
%κ (i)
lim ≤1
i→∞ 3 log2 log2 i
2
as required.
Interpreting %κ as redundancy, Theorem 11.5 shows that solid codes have
a greater redundancy than prefix codes, log n compared to log log n, and that
this difference is, essentially, not due to the overlap-freeness, but to the fact
that they are infix codes. Thus, the penalty in redundancy is not really paid
for the synchronization capabilities – even in the presence of noise –, but for
the ability of infix codes to detect certain kinds of insertion or deletion errors.
For the remainder of this section, we focus on combinatorial properties of
solid codes and their relation to other types of codes.
Theorem 11.6 [64] The class of solid codes is closed under inverse non-
erasing morphisms. Moreover, if X and Y are alphabets and ϕ is a non-
erasing morphism of X ∗ into Y ∗ , then ϕ maps solid codes onto solid codes
if and only if the restriction of ϕ to X is injective and, for any a, b ∈ X, the
set {h(a), h(b)} is a solid code.
47
It is used in [95] to exhibit the relation among four different “completeness”
conditions for prefix codes which are known to be equivalent for finite prefix codes,
but turn out not to be equivalent for infinite prefix codes.
82 H. Jürgensen and S. Konstantinidis
Theorem 11.7 [126] Lsolid is a proper subset of Linter1 , hence a proper subset
of Li and Q.
0∗ 0fk (x) 1x1 0x2 · · · 1x2t−1 ∩ 0y2(k−t+1) 1y2(k−t+1)+1 · · · 1y2k−1 0y2k 1gk (y) 1∗ = ∅.
We denote the fact that f and g satisfy the solidity condition for N by
Sol(N, f, g).
Lemma 11.1 [55] Let X = {0, 1}, let C ⊆ 0+ X ∗ 1+ be a solid code, and for
k ∈ N0 let
C ∩ 0+ 1x1 0x2 · · · 1x2k−1 0x2k 1+ = {0fk (x) 1x1 0x2 · · · 1x2k−1 0x2k 1gk (x) }.
Then C is a maximal solid code over X if and only if there are sequences f
and g as in Lemma 11.1 and C satisfies one of the following conditions:
(1) C is of type 0.
(2) C is of one of the types FF, II, IF, or FI, f1 (j, i) is independent of i and
increasing with j, g1 (j, i) is independent of j and increasing with i, and
f1 and g1 determine each other uniquely. Moreover, for (j, i) ∈ N1 , let
and
Fj = {l | (j, l) ∈ N1 , g1 (j, l) > j}.
The mappings f1 and g1 have the following properties depending on the
type of C:
(a) Type FF with n = f0 () and m = g0 (): For all (j, i) ∈ N1 ,
½
min Gi , if Gi 6= ∅,
g1 (j, i) =
m, otherwise,
84 H. Jürgensen and S. Konstantinidis
in the case (2a) and f1 (j, i) = min Fj in the case (2b). This follows by duality.
By Theorem 11.9, there is a maximal solid code C ⊆ 0+ 1+ ∪ 0+ 1+ 0+ 1+
with k = |C| for every k ∈ N. A maximal solid code of type 0 has exactly 1
element. For k > 1, a maximal solid code of type FF with n = 2 and m = k
has exactly k elements [55].
The following theorem describes the relation of the class of maximal solid
codes in the set 0+ 1+ ∪ 0+ 1+ 0+ 1+ to the classical Chomsky hierarchy of
formal languages.
Theorem 11.10 [55] Let X = {0, 1} and let C ⊆ 0+ 1+ ∪ 0+ 1+ 0+ 1+ be a
maximal solid code. The following statements hold true:
(1) C is finite if and only if C is of type 0 or FF.
(2) C is regular if and only if it is of one of the types 0, FF, IF, or FI.
Moreover, there exist infinitely many infinite regular maximal solid codes
in 0+ 1+ 0+ 1+ .
(3) If C is context-free, but not regular, then C is of type II. Moreover,
there exist infinitely many context-free, non-regular maximal solid codes
in 0+ 1+ 0+ 1+ .
For the remaining statements assume that C is of type II and
(d) C is recursive.
(5) There are infinitely many maximal solid codes which are context-sensi-
tive, but not context-free.
(6) There is a maximal solid code in 0+ 1+ 0+ 1+ which is not recursively
enumerable.
Our final theorem in this section relates maximal solid codes to prefix
codes and suffix codes.
Theorem 11.11 [55] Let X = {0, 1} and let C ⊆ 0+ 1+ ∪ 0+ 1+ 0+ 1+ be an
infinite maximal solid code. Then C = P S where P and S are contained in
0+ 1+ and satisfy the following conditions.
(1) If C is of type II then P is an infinite suffix code and S is an infinite
prefix code.
(2) If C is of type IF then P is a finite suffix code and S is an infinite prefix
code.
(3) If C is of type FI then P is an infinite suffix code and S is a finite prefix
code.
48
For example, a channel may become saturated by a long sequence of identical
input signals and continue reproducing them for some time even after the input has
changed.
49
To be more precise, it is not really the probability of a synchronization error,
but the cost of a synchronization error that needs to be considered. Even for a
uniform code, if synchronization errors are disregarded, but can occur, albeit with
a very small probability, the cost can be devastating.
86 H. Jürgensen and S. Konstantinidis
for all messages v distinct from w. In choosing a code, this is a key condition.
Channel models abstract from this probabilistic situation by eliminating all
low-probability cases.
Thus, if γ is a channel according to Section 3 then γ models only that
part of the physical channel that occurs with a high probability or results in
a high cost if it occurs; all these events are treated as equally probable; all
other events are treated as impossible, that is, not just as having probability
0. Using this idealization, one can try to replace the maximum-likelihood
decoding argument by a minimum-distance decoding argument (see [22]), that
is, replace probabilistic reasoning by combinatorial reasoning. The classical
Hamming metric and Lee metric are examples of this kind of transition for
substitution-only channels. The Levenshtein distance serves a similar purpose
for certain SID-channels. The Hamming and Lee metrics are defined for
words of the same length only: the Hamming distance between two words
is the number of positions in which they differ; the Lee metric also takes
into account by how much corresponding positions differ.50 The Levenshtein
distance between two words, u and v say, is the minimal total number of
substitutions, insertions, and deletions that can transform u into v.
If w0 is the message received when w was sent, then any distance d to be
used for minimum-distance decoding will have to satisfy
for all messages v different from w (see [22] for further explanations). Thus,
the choice of a metric implies assumptions about the physical channel; these
are usually not made explicit in the literature. The extent to which the
assumptions are valid determines very much how well theoretical results pre-
dict physically observable behaviour. This is, of course, not unique to coding
theory; however, much of coding theory is now an area of beautiful mathe-
matical results with very little connection to the true problems in the field.
To clarify this statement: first, in the context of mathematics, there are many
wonderful and deep results derived in coding theory; second, in the context of
coding theory, however, they may be of less value as their assumptions may
be physically unrealistic. For example, very-high speed information trans-
mission via optical fibres seems to require an error model that is significantly
different from that assumed by the Hamming metric. Thus, the quality of
classical codes, as predicted in the literature, should not be taken for granted.
Much more fundamental research is needed to understand the abstract con-
nection between error models and codes to correct errors in the context of
50
See [99], for example, for precise definitions.
Codes 87
these models. Most of coding theory, so far, has focussed on noiseless chan-
nels (the language theory branch) and channels modelled by the Hamming
metric (the error-correcting code branch).
The Hamming and Lee metrics are applicable to communication systems
in which the only likely errors are substitutions and where errors are indepen-
dent. The Levenshtein metric is applicable to physical SID-channels where
errors are independent and equally likely. Not all SID-channels – physical or
just within our formal model – have these properties.
For the abstraction from probabilities to distances, there have been two es-
sentially different techniques. The first and most common one is based on an
errors-per-code-word limit; the channel is assumed not to produce more than
k, say, errors of a certain kind per code word. This is the standard approach
in the classical theory of error-correcting codes; it is also the approach taken
in [41] and [13]. The second technique, used in our presentation, is based
on an errors-per-length limit; the channel is assumed not to produce more
than k, say, errors of a certain kind in any l consecutive input symbols. The
former is considerably easier to use;51 the latter represents many physical sit-
uations more realistically. For example, assume a block code of length l = 5
is used and the channel permits one deletion; suppose (01001)(10100) is sent.
In the errors-per-code-word model, one could get 0100× 1 ×0100
1 = 01000100
which is impossible in the errors-per-length model; on the other hand, one
can get 01001010 in both models, as 0100×101 1 ×0
0 in the former model and
as 0100×1010
1 ×
0 in both models. We believe that, for codes having only very
long code words, these two models may coincide in probability. For codes
with realistically short code words, they seem to be vastly different.
As mentioned before, solid codes seem to be extremely good at synchro-
nizing in the presence of errors – any code word transmitted correctly will be
decoded correctly. They are not good enough in general, however, to correct
incorrectly transmitted parts of a message; in those parts, they detect that
errors are present, but do not guide the correction.
For example, suppose the only errors that are reasonably likely to oc-
cur are deletions of symbols; these are independent; and it is, by any stan-
dards, completely unlikely that there will be more than 1 deletion in any l
consecutive message symbols. The corresponding (abstract) channel is the
SID-channel δ(1, l) which permits at most 1 deletion in any l consecutive
symbols [59]. Let M = (N \ {1}) × (N \ {1}) and let F be the set
½ ¯ ¾
¯ x, y ∈ N \ {1}, x 6= y, fx,y : M → N,
F = fx,y ¯ ¯ .
fx,y (r1 , r2 ) = xr1 + yr2 for (r1 , r2 ) ∈ M
For f ∈ F and n ∈ N \ {1}, let
Gf (n) = {r1 | (r1 , r2 ) ∈ M, f (r1 , r2 ) ≤ n}.
51
See the admissibility problems in our definitions of synchronization and decod-
ability, Definition 4.2 and Definition 4.4, which are a result of the fact that error
situations do not know about the ends of code words.
88 H. Jürgensen and S. Konstantinidis
Using properties explained in Section 11, one can construct codes for the
channel δ(1, l) as follows.
Theorem 12.1 [57] Let f ∈ F and g : M → N \ {1} such that, for all
r = (r1 , r2 ) ∈ M, g(r) > max Gf (r2 ). Let
55
Efficiency may be achieved through small redundancy or small complexity of
encoding and decoding, for example.
56
For block codes and substitution-only channels, the Hamming bound and the
Gilbert-Varshamov bound are examples of such bounds; see [94].
57
In the absence of synchronization errors, block codes – of course – are easier to
implement; and, asymptotically, they are as efficient as non-block codes.
58
As a nearly randomly selected example, we mention the problems arising in
optical data transmission when overlapping pulse-position modulation is used for
the physical representation of signals; see [11] for details.
59
Of course, this question is ill-posed. However, even slight progress along these
lines could be extremely important for our understanding of communication systems.
90 H. Jürgensen and S. Konstantinidis
References
[1] R. Ahlswede, I. Wegener: Suchprobleme. B. G. Teubner, Stuttgart, 1979.
[2] L. R. Bahl, F. Jelinek: Decoding for channels with insertions, deletions, and
substitutions with applications to speech recognition. IEEE Trans. Inform.
Theory IT-21 (1975), 404–411.
[3] L. R. Bahl, F. Jelinek, R. L. Mercer: A maximum likelihood approach to
continuous speech recognition. IEEE Trans. Pattern Analysis and Machine
Intell. 5 (1983), 179–190.
[4] J. Berstel, D. Perrin: Theory of Codes. Academic Press, Orlando, 1985.
[5] P. A. H. Bours: Construction of fixed-length insertion/deletion correcting
runlength-limited codes. IEEE Trans. Inform. Theory IT-40 (1994), 1841–
1856.
[6] V. Bruyère: Maximal prefix products. Semigroup Forum 36 (1987), 147–157.
[7] V. Bruyère: Maximal codes with bounded deciphering delay. Theoret. Com-
put. Sci. 84 (1991), 53–76.
[8] V. Bruyère, M. Latteux: Variable-length maximal codes. In F. Meyer auf der
Heide, B. Monien (editors): Automata, Languages and Programming, 23rd
International Colloquium, ICALP ’96, Paderborn, Germany, July 1996, Pro-
ceedings. Lecture Notes in Computer Science 1099, 24–47, Springer-Verlag,
Berlin, 1996.
[9] V. Bruyère, L. Wang, L. Zhang: On completion of codes with finite decipher-
ing delay. European J. Combin. 11 (1990), 513–521.
[10] L. Calabi, W. E. Hartnett: A family of codes for the correction of substitution
and synchronization errors. IEEE Trans. Inform. Theory IT-15 (1969), 102–
106.
[11] A. R. Calderbank, C. N. Georghiades: Synchronizable codes for the optical
OPPM channel. IEEE Trans. Inform. Theory IT-40 (1994), 1097–1107.
[12] R. M. Capocelli: A decision procedure for finite decipherability and syn-
chronizability of multivalued encodings. IEEE Trans. Inform. Theory IT-28
(1982), 307–318.
[13] R. M. Capocelli, L. Gargano, U. Vaccaro: Decoders with initial state invari-
ance for multivalued encodings. Theoret. Comput. Sci. 86 (1991), 365–375.
Codes 91
[90] D. Y. Long: k-Prefix codes and k-infix codes. Acta Math. Sinica 33 (1990),
414–421, in Chinese.
[91] D. Y. Long: n-Infix-outfix codes. In Abstracts, Second International Collo-
quium on Words, Languages, and Combinatorics, Kyoto, 25–28 August, 1992.
50–51, Kyoto, 1992.
[92] D. Y. Long: On the structure of some group codes. Semigroup Forum 45
(1992), 38–44.
[93] D. Y. Long: k-Bifix codes. Riv. Mat. Pura Appl. 15 (1994), 33–55.
[94] F. J. MacWilliams, N. J. A. Sloane: The Theory of Error-Correcting Codes.
North-Holland, Amsterdam, 1977, 2 vols.
[95] A. A. Markov: Some properties of infinite prefix codes. Problemy Peredachi
Informatsii 6(1) (1970), 97–98, in Russian. English translation: Problems
Inform. Transmission 6(1) (1973), 85–87.
[96] P. G. Neumann: Codes auf der Grundlage von Schaltfunktionen und ihre An-
wendung in der Praxis der Verschlüsselung. Nachrichtentechn. Z. 14 (1961),
254–261, 307–312.
[97] P. G. Neumann: Efficient error-limiting variable-length codes. IEEE Trans.
Inform. Theory IT-8 (1962), 292–304.
[98] P. G. Neumann: Error-limiting coding using information-lossless sequential
machines. IEEE Trans. Inform. Theory IT-10 (1964), 108–115.
[99] W. W. Peterson, E. J. Weldon, Jr.: Error-Correcting Codes. MIT Press,
Cambridge, MA, second ed., 1972.
[100] M. Petrich: Lectures in Semigroups. Akademie-Verlag, Berlin, 1977.
[101] M. Petrich, G. Thierrin: The syntactic monoid of an infix code. Proc. Amer.
Math. Soc. 109 (1990), 865–873.
[102] P. Piret: Comma free error correcting codes of variable length, generated by
finite-state encoders. IEEE Trans. Inform. Theory IT-28 (1982), 764–775.
[103] T. Pratt, W. C. Bostian: Satellite Communications. John Wiley & Sons, New
York, 1986.
[104] H. Prodinger, G. Thierrin: Towards a general concept of hypercodes. J.
Inform. Optim. Sci. 4 (1983), 255–268.
[105] C. M. Reis: Intercodes and the semigroups they generate. Internat. J. Com-
put. Math. 51 (1994), 7–13.
[106] C. M. Reis, G. Thierrin: Reflective star languages and codes. Inform. and
Control 42 (1979), 1–9.
[107] A. Restivo: A combinatorial property of codes having finite synchronization
delay. Theoret. Comput. Sci. 1 (1975), 95–101.
[108] A. Restivo: On codes having no finite completions. Discrete Math. 17 (1977),
309–316.
[109] A. Restivo, S. Salemi, T. Sportelli: Completing codes. RAIRO Inform. Théor.
Appl. 23 (1989), 135–147.
[110] A. Riley: The Sardinas-Patterson and Levenshtein theorems. Inform. and
Control 10 (1967), 120–136.
[111] O. T. Romanov: Invariant decoding automata without look-ahead. Problemy
Kibernet. 17 (1966), 233–236, in Russian.
[112] R. M. Roth, P. H. Siegel: Lee-metric BCH codes and their application to
constrained and partial-response channels. IEEE Trans. Inform. Theory IT-
40 (1994), 1083–1096.
96 H. Jürgensen and S. Konstantinidis
[137] D. L. Van: Sous-monoı̈des et codes avec des mots infinis. Semigroup Forum
26 (1983), 75–87.
[138] D. L. Van: Ensembles code-compatibles et une généralisation du théorème de
Sardinas–Patterson. Theoret. Comput. Sci. 38 (1985), 123–132.
[139] D. L. Van: Langages écrits par un code infinitaire. Théorème du défaut. Acta
Cybernet. 7 (1986), 247–257.
[140] D. L. Van, D. G. Thomas, K. G. Subramanian: Bi-infinitary codes. RAIRO
Inform. Théor. Appl. 24 (1990), 67–87.
[141] R. R. Varshamov, G. M. Tenengol’ts: Codes capable of correcting single
asymmetric errors. Avtomat. i Telemekh. 26 (1965), 288–292, in Russian.
[142] M. Vincent: Construction de codes indecomposables. RAIRO Inform. Théor.
Appl. 19 (1985), 165–178.
[143] D. J. A. Welsh: Matroid Theory. Academic Press, London, 1976.
[144] S. S. Yu: A characterization of intercodes. Internat. J. Comput. Math. 36
(1990), 39–45.
[145] S. Yu. Personal communication, 1995.
[146] S. Zhang: An equivalence relation on suffix codes defined by generalized
regular languages. Internat. J. Comput. Math. 35 (1990), 15–24.