Distance-Preserving Mappings and Trellis Codes with Permutation Sequences

by Theodorus Gerhardus Swart

A thesis submitted to the Faculty of Engineering and the Built Environment in the fulfillment of the requirements for the degree of Doctor Ingeneriae

in Electric and Electronic Engineering Science

at the University of Johannesburg

Promoter Prof. H.C. Ferreira

August, 2006 Abstract

Our research is focused on mapping binary sequences to permutation sequences. It is es- tablished that an upper bound on the sum of the Hamming for all mappings ex- ists, and this sum is used as a criterion to ascertain how good previously known mappings are. We further make use of permutation trellis codes to investigate the performance of certain permutation mappings in a power-line communications system, where background noise, narrow band noise and wide band noise are present.

A new multilevel construction is presented next that maps binary sequences to per- mutation sequences, creating new mappings for which the sum of Hamming are greater than previous known mappings. It also proved that for certain lengths of sequences, the new construction can attain our new upper bound on the sum of Hamming distances.

We further extend the multilevel construction by showing how it can be applied to other mappings, such as permutations with repeating symbols and mappings with non- binary inputs. We also show that a subset of the new construction yields permutation sequences that are able to correct insertion and deletion errors as well.

Finally, we show that long binary sequences, formed by concatenating the columns of binary permutation matrices, are subsets of the Levenshtein insertion/deletion correcting codes.

ii Opsomming

Ons navorsing is gefokus op die afbeelding van binˆeresekwensies na permutasie sekwensies. Dit word aangetoon dat daar ’n bo-grens op die som van die Hamming afstande in so ’n afbeelding bestaan, en hierdie som word gebruik as maatstaf om te bepaal hoe effektief bestaande afbeeldings is. Verder maak ons gebruik van permutasie traliekodes om die gedrag van sekere permutasie afbeeldings te ondersoek in ’n kraglyn kommunikasie stelsel, waar agtergrond geraas, nouband geraas en wyeband geraas teenwoordig is.

’n Nuwe multivlak konstruksie word aangebied wat binˆeresekwensies na permutasie sekwensies afbeeld, wat nuwe afbeeldings skep waarvoor die som van Hamming afstande groter is as bestaande afbeeldings. Dit word ook bewys dat vir sekere lengtes van sek- wensies, die nuwe konstruksie die bo grens op die som van Hamming afstande kan haal.

Ons brei die multivlak konstruksie verder uit deur te wys dat dit op ander afbeeldings ook toegepas kan word, soos permutasies met herhaalde simbole en afbeeldings met nie- binˆereinsette. Ons wys ook dat ’n deelversameling van die nuwe konstruksie permutasie sekwensies lewer wat invoegings en weglatings ook kan korrigeer.

Laastens wys ons dat lang binˆeresekwensies, gevorm deur die kolomme van binˆere permutasie matrikse te kombineer, ’n deelversameling is van die Levenshtein invoeg- ings/weglatings kodes.

iii Acknowledgements

A sincere word of thanks to . . .

• Prof. Ferreira for his help and guidance throughout the course of this study,

• my fellow students in the Cybernetics Laboratory at the University of Johannesburg for discussions and help,

• my family and friends for their interest,

• the NRF for financial support, as well as the NRF/Department of Labour for finan- cial support through the Scarce Skills bursary,

• Ken Stewart for proofreading the thesis, and

• the examination committee, Prof. Abdel-Ghaffar, Prof. Penzhorn and Prof. Vinck for reading the thesis and for their comments.

iv Table of Contents

List of Figures ...... x

List of Tables ...... xii

List of Symbols ...... xiv

1 Introduction ...... 1-1

1.1 Introduction ...... 1-1

1.2 Problem statement ...... 1-2

1.3 Outline of thesis ...... 1-2

2 Overview of Permutation Codes ...... 2-1

2.1 Introduction ...... 2-1

2.2 Permutations in general ...... 2-1

2.2.1 Mathematical definition ...... 2-1

2.2.2 Slepian permutation codes ...... 2-3

2.2.3 Other related work ...... 2-4

2.3 Permutation arrays ...... 2-5

2.4 Distance-preserving mappings ...... 2-8

v Table of Contents

2.5 Distance-preserving permutation mappings ...... 2-9

2.6 Permutation codes and modulation ...... 2-11

2.7 Permutation source coding and quantizers ...... 2-14

2.8 Other applications of permutations ...... 2-14

3 Overview of Insertion/Deletion Correcting Codes ...... 3-1

3.1 Introduction ...... 3-1

3.2 Synchronization and insertions/deletions ...... 3-1

3.3 Block codes ...... 3-4

3.3.1 Synchronization recovery ...... 3-4

3.3.2 Error correction ...... 3-8

3.4 Convolutional codes ...... 3-13

3.5 Other applications ...... 3-14

4 Permutation Trellis Codes ...... 4-1

4.1 Introduction ...... 4-1

4.2 Permutation codes, M-ary FSK and PLC ...... 4-2

4.3 Permutation trellis codes and distance-preserving mappings ...... 4-4

4.4 Simulation setup ...... 4-7

4.5 Preliminary performance results ...... 4-8

4.6 Summary ...... 4-13

5 Distance Optimality of Permutation and Other Mappings ...... 5-1

5.1 Introduction ...... 5-1

5.2 Distance-preserving mappings ...... 5-1

5.3 Upper bound on the sum of distances in permutation mappings . . . . . 5-4

vi Table of Contents

5.4 General upper bound on the sum of distances in a mapping ...... 5-12

5.4.1 q-ary (n, k) codes ...... 5-15

5.4.2 M(n, M, δ) permutation codes ...... 5-18

5.5 Average distance increase in a mapping ...... 5-19

5.6 Summary ...... 5-22

6 Multilevel Construction of Permutation DPMs ...... 6-1

6.1 Introduction ...... 6-1

6.2 Previous constructions ...... 6-1

6.3 Binary representation of any permutation ...... 6-3

6.4 Generating SM from the multilevel construction ...... 6-6

6.5 DPMs from the multilevel construction ...... 6-11

6.6 Distance optimality of new DPMs ...... 6-26

6.7 Summary ...... 6-29

7 Comparison and Analysis of Different Mappings ...... 7-1

7.1 Introduction ...... 7-1

7.2 Mappings used in PLC simulations ...... 7-1

7.3 Mappings from the multilevel construction ...... 7-7

7.4 Permutation DPM constructions ...... 7-9

7.5 Graph representation of permutation mappings ...... 7-13

7.5.1 Graph representation of symbols and transpositions ...... 7-14

7.5.2 Graph representation of permutation DPMs ...... 7-15

7.5.3 Symbol distribution and symbol paths ...... 7-18

7.6 Summary ...... 7-24

vii Table of Contents

8 Multilevel Construction of Other Mappings ...... 8-1

8.1 Introduction ...... 8-1

8.2 Permutations with repeating symbols ...... 8-1

8.3 Non-binary sequences to permutation sequences ...... 8-4

8.4 Single insertion/deletion correcting codes ...... 8-6

8.5 Summary ...... 8-12

9 Binary Permutation Codes as Subsets of Levenshtein Codes . . . . . 9-1

9.1 Introduction ...... 9-1

9.2 Preliminaries ...... 9-1

9.3 Sequences with λ =1...... 9-3

9.4 Other λ sequences as permutation matrices ...... 9-5

9.5 Sequences with any λ ...... 9-7

9.6 Subsets of other codes ...... 9-9

9.7 Summary ...... 9-13

10 Conclusion ...... 10-1

10.1 Achievements ...... 10-1

10.2 Further research ...... 10-3

A Convolutional Codes used for Simulations ...... A-1

B Permutation Distance-Preserving Mappings ...... B-1

B.1 Permutation distance-conserving mappings ...... B-1

B.2 Permutation distance-increasing mappings ...... B-3

B.3 Permutation distance-reducing mappings ...... B-4

viii Table of Contents

C Other Distance-Preserving Mappings ...... C-1

C.1 Other distance-conserving mappings ...... C-1

C.2 Other distance-increasing mappings ...... C-3

C.3 Other distance-reducing mappings ...... C-4

D Graph Representation of Permutation Mappings ...... D-1

References ...... Rf-1

ix List of Figures

3.1 Effect of deletion(s) and insertion(s) on data ...... 3-2

4.1 State diagrams for convolutional base code and permutation trellis code . 4-5

4.2 BER for background noise ...... 4-9

4.3 BER for impulse noise ...... 4-10

4.4 BER for background noise with permanent frequency disturbances . . . . 4-10

4.5 Single permanent frequency disturbance in different positions ...... 4-14

4.6 Comparison of various number of permanent frequency disturbances . . . 4-15

6.1 Comparison of mapping using standard lexicography and mapping using the multilevel construction ...... 6-13

7.1 Comparison of optimum and non-optimum mappings, with background noise and permanent frequency disturbances ...... 7-4

7.2 Visualisation of distance distribution for different M(6, 6, 0) mappings . . 7-7

7.3 Distance increase distribution for four different C3 components ...... 7-9

7.4 Distance optimality, η, for various mappings ...... 7-11

7.5 Simulation comparing M = 8 mappings using M-FSK on a power-line communications channel with background noise ...... 7-12

2 7.6 Graph representation of ζ7 mapping ...... 7-14

x List of Figures

7.7 Graph representation of all possible transpositions between symbols . . . 7-15

7.8 Graph representation of Construction 2 ...... 7-16

7.9 Graph representation of multilevel construction ...... 7-17

7.10 Independent transpositions for M = 8 multilevel mapping ...... 7-18

7.11 Symbol 1 path for M2(8, 8, 0) mapping ...... 7-19

7.12 Symbol paths for M2(8, 8, 0) mapping ...... 7-20

7.13 Symbol paths for M = 8 mapping, using Construction 2 ...... 7-21

7.14 Symbol paths for M(9, 9, 0) mapping using B as starting matrix . . . . . 7-22

7.15 Symbol paths for M(9, 9, 0) mapping using alternative starting matrix . 7-22

7.16 M = 6 non-DCM with graph representation and symbol 1 path . . . . . 7-23

7.17 M = 6 DCM with graph representation and symbol 1 path ...... 7-23

2 9.1 Power spectral density of P1(3 ) ...... 9-10

2 9.2 Power spectral density of P1(4 ) ...... 9-10

2 9.3 Power spectral density of P2(4 ) ...... 9-10

D.1 Graph representation of Construction 3 ...... D-2

D.2 Symbol paths for M = 8 mapping, using Construction 3 ...... D-2

D.3 Graph representation of Construction A–C ...... D-3

D.4 Symbol paths for M = 5 mapping, using Construction B ...... D-4

D.5 Symbol paths for alternative M = 5 mapping, based on Construction C . D-4

D.6 Symbol paths for M(5, 5, 0) mapping using B starting matrix ...... D-5

D.7 Symbol paths for M(5, 5, 0) mapping using alternative starting matrix . D-7

xi List of Tables

2.1 Upper bounds on cardinalities for permutation arrays ...... 2-6

4.1 DPMs used in simulations ...... 4-9

4.2 DIM, DCMs and DRM used in simulations ...... 4-11

5.1 Average increase (or decrease) in distance for any permutation mapping attaining the upper bound ...... 5-21

6.1 Lower bound on δ ...... 6-25

7.1 |E(k)| and |E| values values for mappings used in simulations ...... 7-3

7.2 Comparison of distance sums for various mappings ...... 7-10

7.3 Comparison of distance optimality, η, for various mappings ...... 7-11

9.1 Number of identity sequences ...... 9-7

2 9.2 |Pλ(M )| compared to cardinalities of other codes ...... 9-12

A.1 Convolutional codes used in simulations ...... A-1

B.1 Permutation distance-conserving mappings ...... B-1

B.2 Permutation distance-increasing mappings ...... B-3

xii List of Tables

B.3 Permutation distance-reducing mappings ...... B-4

C.1 Other distance-conserving mappings ...... C-1

C.2 Other distance-increasing mappings ...... C-3

C.3 Other distance-reducing mappings ...... C-4

D.1 Symbol distribution for M = 5 mapping using B starting matrix . . . . . D-6

D.2 Symbol distribution for M = 5 mapping using alternative starting matrix D-7

xiii List of Symbols

α Number of complete groups in a mapping

AM Alternating group containing all the possible permutations of even weight and length M

a Partition number of a Levenshtein codebook

β Number of symbols in the incomplete group in a mapping

Cb Codebook consisting of binary sequences

Ck Multilevel components for the k-th level

Cp Codebook consisting of permutation sequences

cj,k j-th multilevel component for the k-th level

∆avg Average distance increase for a mapping

D Matrix with entries dij, denoting the between the i-th and j-th binary sequences

|D| Sum of all the entries in the matrix D

dfree Free distance of a convolutional code dH (xi, xj) Hamming distance between two sequences, xi and xj δ Minimum change in distance when mapping from one set to another

η Distance optimality of a mapping

E Matrix with entries eij, denoting the Hamming distance between the i-th and j-th permutation sequences

|E| Sum of all the entries in the matrix E

xiv List of Symbols

f Denotes a certain frequency

KM Graph representing the M permutation symbols with connecting lines representing all the possible transpositions of symbols

La(n) Levenshtein codebook of length n in the a partition λ Number of ones in every row and every column of a (0, 1)-matrix

L Number of levels in a multilevel construction

l Length of arbitrary sequence

M(n, M, δ) A mapping from n-binary sequences to M-permutation sequences, with a minimum change in distance of δ

M Length of a permutation sequence

mi Number of times that symbol i appears in a certain position ν Memory constraint length of a convolutional code

n Length of a binary sequence

nk Length of a binary subsequence for the k-th level

φM Total number of transpositions possible for M

2 2 Pλ(M ) Binary permutation sequences of length M , obtained by concatenating the columns of M ×M (0, 1)-matrices with λ ones in every row and every column

Pk Multilevel permutations for the k-th level q Number of symbols in an alphabet used in a sequence

R Rate of an

σ Moment of a code word, as used in the Levenshtein codes

s Insertion and/or deletion correction capability of a code

SM Symmetric group containing all the possible permutations of length M w Weight of a binary or permutation sequence

Note that this is not a complete list of every symbol used in this thesis. Various symbols are used only once, such as those in the literature overview chapters, and are thus not listed here. Whenever a symbol is used with a different definition in the text, that definition will take precedence over the definition given here.

xv 1 Introduction

1.1 Introduction

Digital communication is being used in ever increasing numbers of applications and for many reasons is regarded as superior to analogue systems. Any person sending information from one location to another, wants that information to be received error free, but several factors can contribute to errors occurring in digital systems.

In the digital world where almost everything is represented by zeros and ones, these undesirable factors can contribute to reversal errors, also known as additive errors or substitution errors, where a zero was sent but is received as a one, or vice versa. This is the most basic and commonly found error, however other types of errors can also occur, some of which will be considered in this thesis.

Digital information consists of sequences of zeros and ones, forming digital words that can represent any imaginable physical property or event. Examples include CDs containing digital audio, DVDs with digital video, computer hard disks with digital data, and many more. Since the information is in a binary format, mathematical operations can be defined to be executed on these numbers, manipulating them according to certain rules. This property of digital information enables one to incorporate error correction into communication systems, the aim of which is to correct errors, thereby increasing the reliability of the system.

In this thesis some aspects of these error correcting codes will be investigated. More specifically, we will be looking at new distance bounds for certain types of codes, new ways to construct codes, interesting properties showing one class of codes to be a subset

1-1 1. Introduction of another class of codes as well as examining the performance of these codes when used on a communication channel.

1.2 Problem statement

The main problem investigated in this thesis is to find mappings from all the binary sequences to permutation sequences, with the aim of mapping the binary outputs of a convolutional encoder to permutation codes and in so doing to create permutation trellis codes. In recent times various mappings and constructions have been found. However the question now becomes: which mapping is the best? Since a multitude of mappings can be found, we want a method to compare different mappings without the need to use simulation results to compare performances.

We will answer this question and present such a method to compare different mappings by presenting an upper bound on the sum of the Hamming distances contained in any mapping. The next problem is that none of the known mappings or constructions (except for a few trivial cases) reaches this upper bound. Naturally the question then becomes: can a construction be found that attains the upper bound? We will present a new construction that can indeed attain the upper bound for certain values. For the remaining values it is closer to the upper bound than any of the previous constructions.

Finally, what other applications can be found for permutation codes? We will present some interesting properties of permutation related sequences, showing that they are sub- sets of other well known codes. In addition we look at creating insertion/deletion permu- tation codes using the new permutation mapping construction that we present.

1.3 Outline of thesis

In the current chapter we provide a brief introduction and problem statement as well as looking at the outline for the rest of the thesis.

Basic coding terms and definitions such as code alphabet, code words, codebooks, cardinality, minimum Hamming distance, and so forth will not be formally defined. Also, a basic introduction to convolutional codes will not be provided. Any reader who is not

1-2 1. Introduction familiar with this material can refer to any introductory text on [1]–[4]. Terms and definitions which are specifically relevant to the work presented in this thesis and are not commonly found in introductory texts, will be introduced in the introductory chapters.

In Chapter 2 we present an overview of previous work in connection with permutations. Although for reasons of thoroughness previous work that is not directly related to the research presented in this thesis is included, it is still not a comprehensive overview of all the work related to permutations. However, for our purposes this will be sufficient.

An overview of previous work in the field of insertion/deletion correcting codes is presented in Chapter 3.

Where we discussed distance-preserving mappings in general terms in Chapter 2, we will go into more detail in Chapter 4. The combination of permutation codes and M- ary FSK is also discussed in more detail, and this will lead to the setup used for the preliminary simulation results in this chapter and selected results in other chapters.

Since a multitude of mappings can be found, an analytical method to compare different mappings will be looked at. In Chapter 5 we will see that there exists an upper bound on the sum of the Hamming distances in a mapping. It will also be shown that this bound can be generalised to mappings involving any class of symbols and it is shown that similar upper bounds for q-ary (n, k)-codes as well as for permutation mappings are special cases of this general upper bound.

In Chapter 6 we present a new construction for distance-preserving mappings. Pre- vious work where multilevel components were used to map constant weight codes to permutation codes is extended, but this was restricted to certain code word lengths. In our case multilevel components are used to map from all binary sequences to permutation sequences for any length. In addition, our construction can be used to create distance- conserving, distance-increasing and distance-decreasing mappings. It is also shown that the new construction achieves the upper bound, presented in Chapter 5, for certain values.

In Chapter 7 we compare the sum of distances and the performance for different map- pings to corroborate our results. The sum of distances for all previous known constructions are also compared with that of our new construction. A graph representation is used to graphically illustrate the working of mapping algorithms, and this is also used to compare

1-3 1. Introduction different mappings with each other.

We use Chapter 8 to show how the multilevel construction can also be used for map- pings from binary sequences to permutation sequences with repeating symbols, for map- pings from non-binary sequences to permutation sequences as well as for mappings with permutations that have insertion/deletion correcting capabilities.

In Chapter 9 we show how long binary sequences can be created by concatenating the columns of the binary matrix representation of a permutation. It is shown that these se- quences are a subset of the Levenshtein insertion/deletion correction codes. Furthermore, it is shown that sequences formed from binary matrices with more than one binary 1 per row and column are also subsets of the Levenshtein insertion/deletion correction codes.

Finally, in Chapter 10 we conclude, highlighting the most important results as well as discussing possible future research.

A brief summary is provided at the end of Chapters 4–9 to highlight the main results of the specific chapter.

1-4 Overview of Permutation 2 Codes

2.1 Introduction

Different permutation codes exist that are being used in coding applications. In this chapter a general overview of these different permutation codes will be given, starting off with the definition generally used in mathematics, followed by a definition of permutation codes as they have been used mostly in communications. The codes from the mathematical definition will mainly be used later in this thesis. Thus, the literature overview in the following sections will focus more on results concerned with these types. For completeness, literature involving the other types of permutation codes will be discussed briefly. Some applications and related material of permutations will also be presented.

2.2 Permutations in general

2.2.1 Mathematical definition

In the literature the symbol n is normally used with permutations, as in “choose r objects from n”. However, for consistency we will use the integer M as in M-ary modulation instead to conform with the rest of this thesis and for reasons that will become clear later on.

A mathematical definition of a permutation (or ordered arrangement) is as stated in the following definitions.

2-1 2. Overview of Permutation Codes

Definition 2.1 [5] A permutation is

1) an ordered arrangement of a specified number of objects selected from a set. The number of distinct permutations of r objects from a set of size M is

M! , (M − r)!

M usually written as M Pr or Pr, or

2) any arrangement of all the elements (or symbols) of a finite sequence, such as (1, 3, 2) and (3, 1, 2) for M = 3. It is odd or even if the number of exchanges of position yielding it from the original order is odd or even. It is a cyclic permutation if it merely advances all the elements a fixed number of places; that is, if it is a cycle of maximal length. A transposition is a cycle of degree two, and all permutations factor as products of transpositions, or

3) any bijection of a set to itself, where the set may be finite or infinite. 2

The numerical ordering of (1, 2, 3,...,M) is considered as the identity sequence for permutations. Any permutation can be expressed as a permutation of this identity se- quence, such as ! 1 2 3 4 5 6 7 8 , 5 7 6 1 4 2 8 3 given here in the two line format. This expression states that 1 has to be replaced by 5, 2 by 7, 3 by 6, and so forth. In the example one can see that 1 → 5 → 4 → 1 and 2 → 7 → 8 → 3 → 6 → 2. These form the cycles of the permutation and are also indicated by (1, 5, 4) and (2, 7, 8, 3, 6). Thus, in terms of the identity sequence, one can state the following 57614283 = (154)(27836)12345678.

Here the permutation 57614283 is expressed in cycle notation as (154)(27836). When using only the integers of the permutation itself, as in 57614283, it is called the passive form. A cycle of length 2, as in (24), is called a transposition, as it simply transposes the two symbols.

The symmetric group, SM , consists of all the possible M! permutations of length M.

As example, S3 = {123, 132, 213, 231, 312, 321}. The alternating group, AM , consists of all

2-2 2. Overview of Permutation Codes the even permutations, that is all the permutations that is generated by an even number of transpositions (later this will also be defined in terms of the weight of a permutation).

As example, A3 = {123, 231, 312} since 123 has no transpositions, 231 = (13)(12)123 has two transpositions and 312 = (23)(12)123 also has two transpositions.

Permutations of this nature will be used in the subsequent chapters and throughout the passive form of the permutation will be used.

2.2.2 Slepian permutation codes

Slepian [6] first introduced the permutation codes as a coding scheme for a single-user communication channel with additive Gaussian noise. From the text one should be able to distinguish these codes from the previous ones discussed, but sometimes we will refer to these codes as “Slepian permutation codes” or simply “Slepian codes”. Two types of codes were defined, a Variant I and a Variant II code. The code words of the code are m-vectors with real number components. These code words are denoted as u1, u2,..., u|C| where |C| is the number of code words. Then, for the Variant I code, u1 is an m-vector of the form m1 m2 mk z }| { z }| { z }| { u1 = (µ1, . . . , µ1, µ2, . . . , µ2,..., µk, . . . , µk), (2.1) where the µi are k real numbers such that µ1 < µ2 < ··· < µk. The mi are positive integers satisfying

m1 + m2 + ··· + mk = m.

The other code words u2, u3,..., u|C| are chosen as all distinct vectors that can be obtained by permuting the components of u1 in all possible ways, where the number of code words is m! |C| = . k Q mi! i=1

For Variant II codes, u1 is as above with the added restriction that all µi are non- negative. The other |C| − 1 code words (u2, u3,..., u|C|) are formed by assigning algebraic signs to the non-zero components of u1 in all possible ways and then permuting these

2-3 2. Overview of Permutation Codes signed components in all possible ways. The number of code words is

2hm! |C| = , k Q mi! i=1 with  m − m1, if µ1 = 0, h = m, if µ1 > 0.

If one considers Variant I codes with the added restrictions that m1 = m2 = ··· = mk = 1 and µ1, µ2, . . . , µk ∈ {1, 2,...,M}, then k = M and m1 + m2 + ··· + mk = M, resulting in these codes simplifying to the permutations discussed in the previous section.

2.2.3 Other related work

Cameron [7] produced a survey on some of the problems related to permutations and per- mutation groups. The reader can refer to this paper for a comprehensive list of references relating to permutations from a mathematical viewpoint.

Deza and Huang [8] have done a survey on different distances used on the symmetric group, SM , as well as illustrating their applications in certain fields, such as statistics, cod- ing theory and computing. Several distance metrics are discussed, including the Euclidian distance, Lee distance, Hamming distance, and Kendall’s correlation statistic (which will be discussed shortly). In some instances the same distance has been used with different names in different fields. Even though the distance metrics are applied to permutations, this paper gives a good overview of distance metrics in general.

In [9] Cameron provides similarities between binary linear codes and permutation groups, showing that certain analogies exist between the two. As an example, binary linear codes makes use of length, minimum weight and a weight enumerator while the permutation group analogy is degree, minimal degree and a permutation character re- spectively.

Levenshtein [10] showed how SM can be partitioned into M sets, each set capable of correcting one insertion or deletion error. (We will return to insertion/deletion correction in Chapter 3.)

2-4 2. Overview of Permutation Codes

2.3 Permutation arrays

A permutation array (PA) is a subset of SM , denoted as an (M, d) PA if the Hamming distance between any two distinct permutations is at least d. An equidistant PA is obtained when the distance between any two distinct permutations is exactly d.

Important to note is that in much of the literature the λ positions in which permu- tations agree is considered, and thus (M, λ) PAs where permutations agree in at most λ positions are considered. This is related to the minimum distance between permutations, or the number of positions in which permutations disagree. For permutations of length M it will hold that d = M − λ. Since distance is the important factor in error correction codes, we will also use d here instead of λ.

Much research has been done in determining the maximum number of permutations (or maximum cardinality) of permutation arrays for different distances. After looking at some of the results in the literature, the bounds on these cardinalities as well as PAs with known cardinalities will be discussed.

Frankl and Deza [11] investigated the maximum number of permutations obtainable when considering maximal or minimal distance as criteria. Several bounds are presented. Deza and Vanstone [12] presented a list of all known bounds on PAs at that time, and also improved some of the bounds. They first did this for equidistant PAs and then did the same for general PAs.

Blake, Cohen and Deza [13] further investigated bounds on permutation arrays. They went on to define perfect permutation arrays as well as sharp permutation arrays. They also looked at the problems considered by those working on permutation groups as this had some merit in dealing with permutation arrays. They considered the minimal degree of permutation groups as well as groups with a specified distance enumerator, which was used in the distance enumeration of permutation codes. Finally they looked at decoding the permutation codes, but this aspect will be dealt with in a later section.

Ding et al [14] considered constructions of (n, n−1) PAs. Constructions were presented where two balanced PAs were combined to form a larger PA. Fu and Kløve [15] presented constructions where binary codes with known minimum distance are used in conjunction with PAs to construct new, larger PAs.

2-5 2. Overview of Permutation Codes

Colbourn, Kløve and Ling [16] investigated a connection between PAs and mutually orthogonal latin squares (MOLS). MOLS have long been studied in combinatorics and thus much is known. By finding a connection between MOLS and PAs, the knowledge of MOLS has been used in obtaining new results for PAs. (In [17] Colbourn and Dinitz provides a survey of constructions for MOLS as well as giving lower bounds on MOLS. Several related references dealing with MOLS can be found here.)

Eriksson and Linusson [18] considered permutation arrays in higher dimensions. Char- acterizations of these permutation arrays are done as well as devising an algorithm to generate any length permutation in any dimension.

The simplest upper bound on permutation codes [12] is given as

M! |C| ≤ . (2.2) (dmin − 1)!

The cardinalities for different values of M and dmin according to the upper bound in (2.2), are listed in Table 2.1. As we will see shortly, equality can be attained in certain cases.

Exact cardinalities for some distances are also known.

The codebooks for dmin = 2 are trivial, as it contains all the possible permutations.

Thus, the cardinality for M and dmin = 2 is M!, where the PA is exactly SM .

M! The cardinality for PAs with dmin = 3 is 2 , as the symmetric group SM is divided into the even permutations, AM , and the uneven permutations, SM − AM . This can al- ternatively be done by determining the weight of the permutations. The dmin = 3 PAs can then be obtained by dividing them by even and odd weights. The weight of a permu-

Table 2.1: Upper bounds on cardinalities for permutation arrays

dmin M 2 3 4 5 6 7 8 2 2 6 24 120 720 5040 40320 3 – 3 12 60 360 2520 20160 4 – – 4 20 120 840 6720 5 – – – 5 30 210 1680 6 – – – – 6 42 336 7 – – – – – 7 56 8 – – – – – – 8

2-6 2. Overview of Permutation Codes tation is defined as the Kendall correlation statistic Q [19] between the permutation and the permutation identity sequence and is denoted by w. The weight of the permutation y = (y1, y2, . . . , yM ) is then given by

M j−1 X X w = w(y) = Q = mij, (2.3) j=2 i=1 where  1, if yi > yj, mij = 0, if yi < yj.

Another interesting property that Kendall derived was the distribution of the values of

Q (or w(y)) between each permutation in SM and the identity sequence. If UM (w) is the number of sequences of SM that have the particular weight, then the following recursion formula can be used to determine the distribution

UM+1(w) = UM (w − M) + UM (w − M + 1) + ··· + UM (w) M X = UM (w − M + i). i=0

Since the group S2 consists of only two permutations, 12 and 21, with w = 0 and w = 1 respectively, the starting values for the recursion formula are known.

Returning to the cardinalities, PAs with dmin = M are also trivial, as each of these contain all the cyclic shifts of a certain code word, and thus the cardinality is always M.

An example for M = 4 with dmin = 4 is {1234, 2341, 3412, 4123}.

Another class of permutation arrays for which the distances are known, are the arrays consisting of the sharply k-transitive permutation groups. A permutation group is said to be k-transitive if for any two ordered k subsets of 1, 2,...,M, say {i1, i2, . . . , ik} and

{j1, j2, . . . , jk} there exists an element, σ, defined on the group such that σ(il) = jl, l = 1, 2, . . . , k. If σ is unique for every pair of k-subsets, then the group is sharply k- transitive. For such a group, the minimum distance is known to be M −k +1. All sharply k-transitive groups are known for k ≥ 2. The most basic examples are the symmetric groups, SM , which are sharply M and (M −1)-transitive and the alternating groups, AM , which are sharply (M − 2)-transitive. With the distance known to be M − k + 1, it can be verified that the distance for these groups are 2 and 3 respectively, as was shown earlier.

2-7 2. Overview of Permutation Codes

For the cases of k = 4 and k = 5 the only known examples other than the trivial ones, are the Mathieu groups M11 and M12, sharply 4- and 5-transitive respectively. Some sharply

3-transitive groups can be used to construct permutation arrays with dmin = M − 2. If M = 1 + q, then the cardinality is (1 + q)(q)(q − 1).

As stated in [13], equality with (2.2) is attainable for any permutation array obtained from a sharply k-transitive group.

However, all the bounds are not attainable, as was shown in [12]. For M = 6 and dmin = 5 the maximum cardinality that can be obtained is 18. In [20], Kløve classified the

(6, 5) PA and also provided an alternative proof that for M = 6 and dmin = 5 a cardinality of only 18 can be found and not 30 as the upper bound suggests. In [21], Kløve also did a classification of (6, 5) PAs as well as giving general constructions for (M,M − 1) PAs and also considering cyclic arrays.

Vinck [22] was the first to suggest permutation codes as a coding scheme for power-line communications (PLC). The code words used were permutations from a PA. A certain number of errors can be corrected by choosing a PA with a certain minimum distance. The application of permutation codes to power-line communications will be discussed in more detail in Section 2.8 and Chapter 4.

2.4 Distance-preserving mappings

Although distance-preserving mappings (DPMs) are not directly related to permutations, it has been used in conjuction with permutation sequences, as will be seen in the next section. First we look at its origins in other applications.

The aim of a DPM is to map unconstrained binary symbols to another set of code words, which may also be binary, such as run-length constrained codes or balanced codes, or which may be non-binary, as will be the case with the permutation codes. The distance between the sets has to be preserved however. Thus, the distance between one code word and another in the unconstrained set must have the same or larger distance between the corresponding code words in the other set which is mapped to.

Ferreira, Wright and Nel [23] used this type of mapping to transform convolutional codes into a run-length constrained or balanced trellis code with the same or larger free

2-8 2. Overview of Permutation Codes distance. Tests were presented to determine whether such mappings exist as well as a tree search algorithm to find such mappings. This method ensures that the free distance of the resulting code will always be equal to or greater than the original base code, irrespective of the convolutional code chosen. Another benefit is that the Viterbi algorithm or sequential decoding can be used for decoding.

Similarly, French [24] presented the same concept, where a subset of run-length lim- ited codes are chosen with the additional property that the distance between any two encoder output sequences is equal to or larger than the distance between corresponding encoder input sequences. Thus, when an error correction code is used in conjunction with the run-length limited code, one is assured that the resulting code will be run-length limited, as well as retaining the Hamming distance imposed by the error correction code. Convolutional codes were also used to illustrate the concept.

2.5 Distance-preserving permutation mappings

The goal of mapping a binary code word to a permutation code word is that existing error correcting codes based on binary codes can be used in conjunction with the permutation codes. An example of this would be the trellis codes which will be discussed in Section 2.8 and in more detail in Chapter 4.

Ferreira and Vinck [25] and Ferreira et al [26] made use of DPMs to create permu- tation trellis codes. Although Vinck showed that permutation codes could be used on power-line communications, decoding of long block codes was still difficult. By mapping convolutional codes to permutation codes they created permutation trellis codes, and one is able to make use of the Viterbi algorithm for decoding. Also, they presented a prefix method whereby an M mapping could be used to create an M + 1 mapping. The idea comes from the fact that the 2n binary sequences of length n are present in the 2n+1 binary sequences of length n + 1. For instance, if Cn is the set of binary sequences of length n, then the sequences in Cn+1 are created by prefixing 0 and 1 to all the sequences in C , such that n ( 0 Cn Cn+1 = . 1 Cn

In a similar way a permutation mapping for M can be extended to M +1 by prefixing the

2-9 2. Overview of Permutation Codes

M mapping and using transpositions. This was done for 3 ≤ M ≤ 8, but an algorithm to extend it to higher M values was not given. The permutation trellis codes will be discussed later.

This led to various papers presenting mappings of binary sequences to permutation sequences [27]–[31]. Chang et al [27] found a generalised construction method of extending mappings to all M. First a systematic study was done of all mappings with M = 4. Thereafter two recursive constructions were presented. One made use of two mappings, say M1 and M2, which were then combined to create a mapping for M1 + M2. The other, being similar to that of Ferreira and Vinck’s prefix method, made use of an M mapping to create an M + 1 mapping. In this case it was generalised and could be applied up to any M value. Explicit constructions of mappings were also presented. In this case the algorithm takes any binary sequence as input and then outputs the corresponding permutation sequence for the mapping. Finally, it was shown how DPMs can be used in constructing lower bounds for PAs. Various lower bounds are known for binary codes with certain minimum distances. Since the distance of the binary code is transferred to the PA using a DPM, the lower bound for the binary codes also forms a lower bound for the PA.

Lee [28] presented new constructions for DPMs of odd lengths. Since the resulting distance after a DPM is equal to or larger than the original code’s, there is a possibility for distance increases. Lee further investigated the distance increase achieved by the mappings and showed that the distance increase in the new constructions is more than that of previous mappings.

In [29], Chang presented DPMs which were called distance-increasing mappings. Since the mapping is from binary vectors to permutations of the same length, no increase in distance can be obtained between binary vectors that are complements and their cor- responding permutations (e.g. 0001 and 1110 mapped to 1243 and 4321). All other distances can be increased. When all the distances increase, except those where it is impossible, Chang denoted such a mapping as a distance-increasing mapping. Chang’s definition contradicts the definition for various types of mappings, as will be seen in the next chapter. However, recursive and explicit constructions were presented to construct such mappings, as well as comparisons with previous constructions.

Lee [30] presented further algorithms for the construction of DPMs. In this case it was shown that the construction can be seen as cyclic when viewing the permutations

2-10 2. Overview of Permutation Codes as lying on a circle. Lee [31] also presented a simple mapping algorithm to construct distance-increasing mappings (DIMs as defined by Chang) of all lengths. Here a graph was used to illustrate the working of the algorithm. In Chapter 7 we explore the use of graphs in comparing different permutation DPMs further.

In Chapter 5 we return to this topic and will elaborate on some of these results, as well as presenting a new multilevel construction to create permutation mappings in Chapter 6.

2.6 Permutation codes and modulation

Chadwick and Kurz [32] presented a coding scheme based upon the properties of rank vectors, with the new codes based on the theory of permutation groups. Another way to view the distance of one vector to another is by considering the correlation between the received vector and the possible transmitted vectors. Rank codes are based on the correla- tion between the ranks of the observations instead of the values themselves. (Kendall [19] investigated this type of correlation.) It was also stated that this type of correlation is suitable when impulsive noise is present. The rank of the observations is then similar to permutations, and therefore they discussed group operations to be used on permutations. The weight of a permutation was defined by the Kendall correlation statistic, Q. The rela- tionship between the weight and the number of transpositions of a permutation was then proved. Also, the Kendall correlation statistic was used as the distance measure between permutations. Codes were then derived that were subgroups of the basic permutation group with properties similar to linear group codes.

Chadwick [33] showed the equivalence between the rank permutation code and a class of binary codes. Using the formula for the weight of a permutation (as given in Section 2.3) and by taking the mij values from the formula in sequence, it was shown that an equivalent binary code word could be obtained. The permutations of length M was thus shown to M(M−1) be equivalent to a set of binary code words of length 2 . The inverse transformation was also given. In a way this can be regarded as a mapping of all permutation sequences to a subset of binary sequences, similar to DPMs where all binary sequences are mapped to a subset of permutation sequences.

Blake [34] considered permutation codes to be used over discrete channels. He investi- gated the decoding of sharply k-transitive permutation groups and further compared the

2-11 2. Overview of Permutation Codes permutation codes with Reed-Solomon codes, showing that in some cases their parameters are similar.

As stated earlier, Blake, Cohen and Deza [13] also looked at decoding PAs as codes.

A decoding of the Mathieu group M12 was given as well as describing a basic decoding algorithm for any PA. Bailey [35] showed how the elements of a sharply k-transitive permutation group could be used to form error correction codes, as well as suggesting a decoding algorithm for these codes. A specific decoding algorithm was also presented for the Mathieu group M12 making use of uncoverings, a concept from design theory. This algorithm differed from the one presented in [13].

Wadayama and Vinck [36] presented a multilevel construction for permutation codes. This construction could only be used when n = 2m, with m a positive integer. They then made use of m-constant weight binary codes and combined them in a specific multilevel way to obtain permutation codes. Because of the multilevel construction, they could make use of a multi-stage decoding algorithm. A similar construction as this, with the n = 2m constraint lifted, will be used in Chapter 6 to construct new DPMs.

Permutation modulation and codes making use of the Slepian codes will now be dis- cussed. As these codes are not the primary focus of this thesis, only a brief overview will be given. Also important to note is that for these codes the Euclidian distance is used and not the Hamming distance.

In general, group codes are generated as follows: the matrix representation G of an abstract group G is used in conjunction with an initial vector, say x. The set of vectors generated by Gx is then called the group code. Slepian [6] studied the case where G is the symmetric group, SM . Thus, G is a group of permutation matrices and when combined with x generates the permutation code. He also presented a maximum likelihood decoder for the permutation codes. Given a received vector, say y and keeping (2.1) in mind, the smallest m1 components are replaced by µ1, the smallest m2 remaining components are replaced by µ2, and so forth, until all the components have been replaced, thereby decoding the vector.

Gaarder [37] investigated the error probability of binary permutation modulation with diversity for fading Gaussian channels, making use of several variables. Upper bounds were derived, as well as showing that orthogonal signals are the most efficient form of binary permutation modulation.

2-12 2. Overview of Permutation Codes

Biglieri and Elia [38] also considered permutation modulation codes. As was seen in the definition for the Slepian codes, there is an initial vector, which is then permuted to obtain all the other code words. Here they considered how to choose the components of this initial vector in such a way that the minimum distance between any two code words is maximized.

Heegard, DePedro and Wolf [39] proposed a coding scheme based upon the Slepian codes for the Gaussian broadcast channel with two receivers. They showed that both receivers could use the decoding as suggested by Slepian. However, the one had to do an additional composite hypothesis test. Downey and Karlof [40] defined group codes for the M-receiver broadcast channel and showed permutation codes to be a special case of such codes.

Karlof [41] also considered the problem of the initial vector for group codes in this case. Additionally, Slepian’s definitions were generalised and used to construct optimal initial vectors for Variant II permutation codes. Karlof and Chang [42] presented a continuation of the work in [41], listing more of the optimised permutation codes. Ingemarsson [43] also considered the problem of optimising the initial vector to obtain the largest minimum distance, as well as analysing the performance of the optimised codes.

Rahhal and Atkin [44] proposed permutation codes in a combined coding scheme to achieve source coding and channel modulation. (Permutation codes for source coding will be described in the next section.) The proposed modulation scheme was M-ary phase shift keying. The source encoding and modulation is done in one step to reduce encoding delay and to reduce the complexity of the system. Since the parameters of the Slepian codes can be optimised for source coding as well as for modulation, they considered ways of optimising these.

Peterson [45] noted that Slepian observed that the code points in an n-dimensional Variant I code lie in an n − 1-dimensional subspace. By changing the coordinates, the explicit representation in n − 1 dimensions was derived and Slepian’s decoding algorithm was adapted to the new codes.

King and Neifeld [46] proposed the use of permutation codes for holographic storage. Enumerative coding of Variant I codes provided them with a non-binary code with a high rate and unequal symbol distribution. However, since the size of permutation codes is not an integer power of two, they proposed shortened permutation codes, where only the

2-13 2. Overview of Permutation Codes

first 2k code words are used. Finally, Slepian’s decoding algorithm is adapted to be able to handle the shortened codes.

2.7 Permutation source coding and quantizers

Dunn [47] first proposed the use of Variant I codes to digitize the vectors generated by a time-discrete memoryless Gaussian source. Berger, Jelinek and Wolf [48] extended on this work by devising a procedure to generate Variant I and II codes for a specified rate and block length. It is interesting to note that the encoding algorithm used here is similar to the decoding algorithm proposed by Slepian [6].

Berger [49] showed that amplitude quantization and permutation encoding are equiv- alent in the sense that their optimum rate versus distortion performances are identical, given that the quantizer output is perfectly entropy coded and the permutation block length is infinite. The equivalence leads to a block-coding alternative to variable-length codes. Also, it is shown that methods to optimise quantizers can be translated to per- mutation codes, thereby creating algorithms to generate optimum permutation codes. In [50], Berger also showed this equivalence, as well as comparing practical permutation codes and variable-length codes.

Schroeder and Sloane [51] proposed a code for data compression that combined the fast Hadamard transform with permutation codes.

Goyal, Savari and Wang [52] presented a set of permutation codes whose performance cannot be equalled by entropy-constrained scalar quantizers, contradicting statements made in [50]. They showed that the codes do not rely on long block lengths and that the advantage diminishes as the length approaches infinity, contradicting a statement made in [49].

2.8 Other applications of permutations

As mentioned previously, permutation codes have been combined with M-ary FSK and this has been shown to be a good scheme for power-line communications ([22], [53]–[57]).

2-14 2. Overview of Permutation Codes

Vinck suggested this approach in [22], where M-ary FSK with diversity and coding was shown to be a robust transmission scheme for power-line communications. Three different types of noise are common on a power-line: background noise, impulse noise and permanent frequency disturbances (or narrowband noise). In Chapter 4 we will further elaborate on this.

Vinck and H¨aring[55] used this scheme and presented some simulation results, consid- ering different demodulators. Ferreira and Vinck [25] then introduced permutation trellis codes (as discussed earlier), combining convolutional codes with permutation codes by using distance-preserving mappings. Since constructions of permutation block codes with long lengths are a difficult problem and a general decoding algorithm for these long block codes is not known, permutation trellis codes were introduced where the Viterbi algorithm could be used for decoding. Vinck et al [56] presented some results on permutation trellis codes, as well as suggesting a method to use permutation codes as multi user signalling codes. Swart et al [57] presented some further simulation results on permutation trel- lis codes, investigating how narrow band noise affects different permutation mappings. Shum [58] used the concept of M-FSK and permutation codes in a wireless radio setting where fading of some frequencies usually occurs. Permutation arrays were used as codes and these results were compared to those of normal convolutional codes.

Golomb and Taylor [59] looked at two-dimensional synchronization patterns, used as sequences in sonar and radar. A series of distinct frequencies is sent out in consecutive time slots, then the returning echoed sequence might be shifted in both time and frequency. When the received pattern has a high correlation with the original pattern, it can be used to determine the distance (using the time shift) and the velocity (using the frequency shift) of a target. To get high correlation, patterns are chosen that agree in only one position when they are non-cyclically shifted horizontally or vertically. These patterns are similar to the binary matrix representation of permutations, and in most instances the patterns chosen are a subset of the permutations.

Nurmela, Kaikkonen and Osterg˙ard[60]¨ made use of linear permutation groups to find new constant weight codes. A permutation group is chosen for which all orbits of words of weight w are generated. Compatible orbits then have to be chosen so that the total number of words is maximal, and this is done using a heuristic, Tabu search.

Datta and McLaughlin [61] used permutation codes to construct high-rate codes that satisfy run-length limited constraints, as well as introducing an enumerative scheme to

2-15 2. Overview of Permutation Codes encode and decode the permutation codes with low complexity. Milenkovic and Vasi´c[62] also considered permutation codes and run-length limited constraints. They noted that a drawback of the scheme in [61] was that successive renumeration of symbols in the code word was necessary. Here they alleviated this problem by introducing a new enumerative encoding method, basing it on the enumeration of permutations in a multiset. Datta and McLaughlin [63] then presented general constructions for M-ary run-length limited codes, one of these constructions being based on permutation codes.

De la Torre, Colbourn and Ling [64] used an application of permutation arrays in block ciphers for encryption. Security in the system is achieved by permuting certain blocks and bits, and to achieve greater diffusion in the cipher, permutations with a Hamming distance as large as possible are required.

2-16 Overview of 3 Insertion/Deletion Correcting Codes

3.1 Introduction

In addition to reversal errors, synchronization problems can also cause a symbol to be deleted or inserted, thus causing insertion or deletion errors. Much work has been done in developing codes to correct reversal errors, while relatively little work has been done on the correction of synchronization errors. The last few years however, have seen an increase in the research towards synchronization correction codes. With digital communications becoming faster every day, some systems have shown synchronization to be a problem.

3.2 Synchronization and insertions/deletions

Synchronization aims to let two events take place at the same time, even though they are not located at the same geographical position. In a digital communication system there has to be synchronization between the transmitter and the receiver. Should the receiver lose synchronization a catastrophic failure in receiving the information follows. The reason for this will be shown shortly.

The errors that occur because of synchronization failure are modeled by using deletions and/or insertions of bits in the data. In [65] and [66], Ullman stated the definition of deletions and insertions. In [65] he described it for block codes, using the same length sequences before and after errors. A slightly altered definition is given here for the case where the lengths are not the same.

3-1 3. Overview of Insertion/Deletion Correcting Codes

Definition 3.1 Let x = x1x2 . . . xn and y = y1y2 ··· ym be two binary sequences of length n and m respectively.

• A deletion error at position j is an operation which changes x into y, where yi = xi

for i < j, yi = xi+1 for j ≤ i < n and m = n − 1. In other words, this happens when a bit that was transmitted is not present in the received data. All bits following the lost bit, move up one position in the sequence.

• An insertion error after position j is an operation which changes x into y, where

yi = xi for i ≤ j, yi = xi−1 for j + 2 ≤ i ≤ n + 1, m = n + 1 and yj+1 is either a 1 or a 0. This happens when a bit that was not transmitted is present in the received data. All bits following the extra bit, move back one position in the sequence.

• A synchronization error is the successive application of one or more deletion or

insertion errors. 2

The sequence, y, obtained after a deletion is called a subsequence of the original sequence, x. Similarly, the sequence obtained after an insertion is called a supersequence of the original sequence.

An example of the effect of a deletion and an insertion in relation to framing of code words is shown in Figure 3.1.

Frame 1 Frame 2 Frame 3 Frame 4

Word 1 Word 2 Word 3 Word 4 Word 5

Deletion(s) (a)

Frame 1 Frame 2 Frame 3 Frame 4

Word 1 Word 2 Word 3 Word 4

Insertion(s) (b)

Figure 3.1: Effect of (a) deletion(s) and (b) insertion(s) on data

3-2 3. Overview of Insertion/Deletion Correcting Codes

Most synchronization errors occur because of problems or defects in the communication hardware. Some simple examples will be given to illustrate this statement. Note that most of these cases are an oversimplification of what happens in the system, as real practical systems would make use of additional mechanisms to keep synchronization.

Consider any data storage media where information is stored on a platter that spins around and is read either magnetically (such as computer hard disks) or optically (such as CDs and DVDs). If sampling of the bits on the media is done at a constant rate, then these platters have to spin at a constant speed. Should this speed increase, it would be possible to encounter deletion errors, as the high speed causes some bits not to be sampled. Similarly, if the speed decreases, it is likely that insertions would appear, as some bits are sampled more than once.

The case of magnetic tapes is similar to that of hard disks. The system samples the data at a constant rate while the tape is moving at a constant speed. However, in this case wear of the magnetic tape, such as stretching, causes insertions to occur.

Finally, in a one-way wireless situation it is difficult for the receiver to obtain infor- mation regarding clock and synchronization timing from the transmitter. Therefore, the receiver has to make use of clock extraction, using the received data. This can be imple- mented using a phase lock loop (PLL). However, in a wireless channel there is always the possibility of signal fading, which can result in the PLL losing lock, causing the system to lose synchronization.

This last example illustrates that in addition to hardware problems, the channel itself can also be the cause of synchronization errors.

The methods used to correct insertion/deletion errors can typically be divided into two groups.

• Synchronization recovery: after an error occurs, synchronization is recovered by adjusting the framing, allowing the subsequent words to be correctly extracted from the data. The word that the error occurs in will be lost. To a certain extent data is lost, and if many errors occur, these methods will be impractical.

• Error correction: after an error occurs, synchronization is recovered by adjusting the data in such a way that the code words will again be correctly framed, where after the error can be corrected. Alternatively, by first correcting the error, correct

3-3 3. Overview of Insertion/Deletion Correcting Codes

synchronization will also be achieved.

In the following sections different synchronization correcting codes found in the liter- ature will be discussed. In most cases these codes can be divided into the two groups just discussed, as can be seen in the text to follow. However, in some cases codes may have properties or consist of techniques that associate them with both groups. These codes are discussed in both sections, each time highlighting the appropriate property or technique significant to that group.

3.3 Block codes

3.3.1 Synchronization recovery

3.3.1.1 Markers

One of the first methods to recover synchronization was by using markers [67]. A marker is a known, periodic synchronization sequence that is expected at periodic intervals, and this periodicity can be used to detect insertions and deletions. For this reason markers usually have a very high correlation so they can easily be detected in a data sequence.

Although markers can give a good indication of where an error occurred, it places further restrictions on the coding scheme that is to be used. It has to be ensured that the marker that is being used will not form part of any code word from the coding scheme. Furthermore, any misframing or reversal errors in the markers itself, can cause the marker to be incorrectly identified.

Markers are generally divided into two types: commas and prefixes. Commas are markers, independent of the code words, which are inserted after a certain number of words. Prefixes are markers that form part of the code word, where every code word starts with a prefix of some length. This is followed by a constrained data sequence of some length, as the prefix should not occur in the data. In this way, word synchronization can easily be established by searching the received data for the occurrence of the prefix. The advantage of commas is that these give a better coding rate as less redundant bits are added. The advantage of prefixes is that a word with an error can be precisely located.

3-4 3. Overview of Insertion/Deletion Correcting Codes

In [68], prefix codes are described as a subclass of comma-free codes. For our purposes however, these codes will be examined as marker codes and not comma-free codes.

Ullman [66], Sellers [67] and Ferreira et al [69] all presented codes that use commas in correcting insertions or deletions, and these will be further discussed in Section 3.3.2, as they incorporate elements of error correction as well.

Ratzer and MacKay [70] did a comparison between different marker codes and water- mark codes (to be discussed in Subsection 3.3.2.3), where these codes were used as inner codes to regain synchronization. An outer code is used to correct any further reversal errors. Specifically for marker codes, the spacing, size and types of marker codes were investigated. Fixed-sequence markers (similar to Sellers [67]) were compared to pseudo- random markers. Additionally, non-uniform markers were also considered, where different sizes and types of markers were combined. They concluded that for certain regions of er- ror probability, certain types of marker codes are better than others, and for other regions that watermark codes are better. Similarly, Marco and Neuhoff [71] studied a block code capable of correcting multiple insertion, deletion and reversal errors, also consisting of an outer code (Reed Solomon codes) and an inner code (markers). Here it was concluded that the scheme used would never be able to match the performance of the watermark codes.

As will be seen shortly, for comma-free codes an exhaustive search of the codebook is necessary to decide if a sequence is a valid code word. Prefix-synchronized codes (PS- codes) overcome this, and were introduced by Gilbert [72]. A procedure for the designing and testing of prefixes are given, as well as an upper bound on the redundancy, from which it was conjectured that the codes were optimal. A further analysis of these codes is given by Guibas and Odlyzko [73], as well as proving Gilbert’s conjecture of optimality for codes with alphabet size smaller or equal to four.

Van Wijngaarden and Morita [74] proposed a new code construction that makes use of modified markers to produce extended PS-codes. The method produces a set of prefixes that can be used to identify a frame, instead of just one, thus enlarging the code size. In [75], they presented encoding and decoding algorithms for a class of extended PS-codes.

Van Wijngaarden, Willink and Kolb [76] modified the synchronization method by removing the condition of consecutive fixed symbols for the prefix. Instead, a distributed synchronization sequence, containing positions with fixed symbols and unconstrained data

3-5 3. Overview of Insertion/Deletion Correcting Codes positions, is used. It was shown that by using distributed positions instead of consecutive fixed positions for the prefix, the probability of misframing could be reduced.

The codes by Van Wijngaarden, Morita and Vinck [68] also use prefixes and correct errors, but as they fall into the category of the codes discussed in Section 3.3.2, it will be discussed there.

Generally, the complexity of encoding and decoding PS-codes increases as the length of the code words increases, and in most cases a lookup table is required for coding. Mandelbaum [77] presented a near-optimal construction method for PS-codes where a lookup table is not necessary. An encoding and decoding procedure is presented which is based on Fibonacci encoding techniques developed by Kautz [78].

Morita, van Wijngaarden and Vinck [79] showed that systematic encoding is possible using PS-codes and presented a procedure for mapping data sequences into PS-code words, as well as doing the inverse mapping. The complexity of the entire mapping process was shown to be proportional to the length of the code words.

3.3.1.2 Comma-free codes

A method that makes the use of markers unnecessary is comma-free codes. In a comma- free code no concatenation of code words (not necessarily different) should include any code word from the same codebook as a subsequence. Thus it is possible to uniquely identify a code word in the data. A disadvantage of comma-free codes is that any additive errors cause the code to lose its synchronization ability. This led to the use of error correction along with comma-free codes.

Golomb, Gordon and Welch [80] first presented these codes as error correcting codes. They showed that several maximal comma-free codes could be constructed. However, frame recognition and data mapping were complex. They also derived an upper bound for the codebook size of a comma-free code. Eastman [81] showed that this bound is attainable for all odd values of k by giving a construction that produces maximal (in number of words) comma-free codes. Jiggs [82] did the same for even values by summarizing the known comma-free dictionary sizes for even k. In [83], Kendall and Reed constructed path-invariant comma-free codes that can be synchronized after observing k bits rather than the 2k − 2 bits required by most comma-free codes, but these are more restrictive

3-6 3. Overview of Insertion/Deletion Correcting Codes than comma-free codes.

While constructions for comma-free codes were shown in [80] and [83], the error- correcting capabilities of these codes were usually unknown and the lack of algebraic structure meant that efficient decoding was difficult. Stiffler [84] showed that by using the coset of a group code, instead of the group itself, it might be possible to get comma-free codes and still retain the original code’s error-correcting capabilities and ease of decoding. Furthermore, it was shown what conditions have to be met by a coset to be comma-free.

Scholtz [85] constructed new synchronization codes by deriving such a code from an- other synchronization code, making use of a suffix construction method, resulting in vari- able length code words. The decoding makes use of non-linear shift registers to observe the incoming data and decides whether punctuation (start of new word) is necessary after observing a certain number of bits. Thus this code is only able to recover code word framing and not correct errors. This method was extended to run-length limited codes by Immink and Hollman [86].

Jiggs [82] introduced the index of comma freedom, r, where any overlap of code words must differ in at least r positions from any other code word in the codebook. This ensures that a certain Hamming distance exists between overlaps and code words. Therefore one should be able to regain synchronization even if reversal errors occurred, given that the Hamming distance is sufficient to handle the errors.

Levy [87] showed that certain error-correcting binary cyclic block codes could be al- tered to obtain certain specified characteristics by the addition of a fixed binary vector to each code word. These altered codes have the full error-correcting ability of the original cyclic codes. Tong [88] presented a similar altering of random error correcting codes and then showed in [89] that it is also valid for burst error correcting codes.

Tavares and Fukada [90] also made use of cosets by adding a fixed vector to all the code words of a cyclic code. Alternatively, they used a vector-matrix representation and showed that coset codes exist that can correct both reversal errors and synchronization errors, even if they occur simultaneously. In [91], Tavares and Fukada presented more of these subset codes, which S´eguin[92] improved on by simply shifting every code word in the subset code so the shifted sequences have a maximum number of leading and trailing zeros.

3-7 3. Overview of Insertion/Deletion Correcting Codes

Choi [93] presented coset codes that have maximum capability in terms of synchroniza- tion correction range, achieving this by using coset codes derived from cyclic redundancy codes.

3.3.2 Error correction

3.3.2.1 General

Sellers [67] presented a block code that will correct an insertion or deletion of a bit within the block. Furthermore, there is also the possibility of correcting reversal errors that appear in the vicinity of the bit deletion or insertion. This code is constructed by inserting a marker at periodic intervals into a burst error correcting code. The marker determines the approximate position of the deletion or insertion, where a bit is then inserted or deleted from the block, depending on the type of error that occurred. Since the error correcting code can correct bursts of reversal errors, this is used to correct any erroneous bits between the position of the error and the position of the correction.

In [66], Ullman presented a block code that corrects a single synchronization error per block and encoding/decoding is simplified as the code is systematic. He used a similar construction to that of Levenshtein, which will be discussed in the next section. Ullman, however, made use of the positions and lengths of runs in a code word in his construction. He also used synchronization sequences, similar to Sellers [67], to assist in the decoding of the code.

Calabi and Hartnett [94] constructed a code that is a subset of Levenshtein’s codes (see Subsection 3.3.2.2). An integer t is defined which gives the code the ability to be changed to suit the channel conditions. It is able to correct for any t ≥ 3, either one reversal error in each one of, at the most, t − 2 words, or one insertion/deletion error in t consecutive words, but not both. Then, for t = 3, an insertion/deletion can be corrected in every third word. If the probability of insertions/deletions is low, a large t can be chosen, which gives the ability to correct a reversal error in almost every word.

Bours [95] made use of an array code to correct bursts of insertions or deletions. A reversal error correcting code is used in one dimension of the array, while a comma-free code is used in the other dimension. When a burst of insertions or deletions occurs, the

3-8 3. Overview of Insertion/Deletion Correcting Codes comma-free code is used to resynchronize the bits. If a comma-free code word is lost due to the insertions/deletions, it is replaced by erasures. These erasures are then corrected by using the reversal error correcting code. Ferreira and Vinck proposed a similar code in [96].

In Section 3.3.1 it has been seen that prefix synchronized codes are not able to correct a word in which a bit was deleted or inserted. However, Van Wijngaarden, Morita and Vinck [68] presented a prefix synchronized code that is able to correct a single deletion or insertion within a code word. A specific prefix is chosen and all the constrained data sequences in which this prefix does not occur, are then searched according to certain conditions, of which one is similar to Levenshtein’s condition for his codes [97]. By computing two syndromes, it can be determined if a deletion or insertion took place and whether it is located in the prefix or constrained data sequence, enabling the correction of the error.

Similar to the Hamming distance for reversal errors, the Levenshtein distance [97] is used to determine the insertion/deletion distance between two words. Tanaka and Kasai [98] described some sufficient conditions for synchronization-error-correcting codes in general situations as well as giving a method for constructing these codes. They made use of the weighted Levenshtein distance, which is a generalised Levenshtein metric, taking reversal errors into account and giving weights to the different types of errors. They also presented a recurrence algorithm based on dynamic programming, which can be used to calculate the weighted Levenshtein distance and therefore also the normal Levenshtein distance.

In [99], Hollman established a relation between the insertion/deletion correcting ca- pability of a code and its minimum distance, to be used for Levenshtein-type distance measures. He looked at s-insertion/deletion correcting codes and concluded with the same result as Levenshtein. However, he also considered i-insertion d-deletion correcting codes and their relation to distance. Konstantinidis [100] defined a distance that further generalises the Hamming and Levenshtein distances and used it to extend the results concerning the relationship between distances and error correcting capabilities. Clarke and Ferreira [101] presented a relationship between the cyclic shifts and the Levenshtein distance of a codebook. This was used to show that codebooks based on Levenshtein distance have limited comma-freedom. Additionally, it was showed how Boolean neural networks could be implemented to decode insertion/deletion correcting codes. Clarke

3-9 3. Overview of Insertion/Deletion Correcting Codes and Ferreira [102] also showed that a fixed length decoding window can propagate errors due to insertions/deletions, necessitating the use of stronger codes. It was shown that codes based on the Levenshtein distance are not optimal for such channels and therefore a modification of the Levenshtein distance was proposed, called the Levenshtein Decoding Distance. It was shown that codes based on this modified distance are better suited to insertion/deletion channels when using these decoding windows.

3.3.2.2 Number theoretic codes

Varshamov and Tenengolts [103] presented number theoretic constructions, which Leven- shtein [97] used to base his single insertion/deletion correcting codes on. The codes were constructed by partitioning all the binary words into different groups, according to the moment of each word. Every partition then formed a single insertion/deletion codebook. Decoding of the codes consisted of finding the value and position of the inserted/deleted bit in a code word. The decoder is presented with a code word of varying length, depend- ing on whether an insertion or deletion occurred. It was assumed that the boundaries of the code word are known. In practice, it would hence be necessary for framing to be achieved by other methods, for example markers. In Chapter 9 we will show that binary permutation sequences are subsets of the Levenshtein codes, with the sequences appearing in certain partitions, depending on the code parameters.

In [10] Levenshtein strengthened some of his previous work, showing that his inser- tion/deletion correcting codes are perfect codes for the binary case, as well as showing how the symmetric permutation set can be partitioned into perfect insertion/deletion correcting sets. In Chapter 8 we show how the multilevel construction from Chapter 6 can also be used to create permutation DPMs that can correct single insertion/deletion errors.

Tenengolts [104] presented a class of codes that corrected deletions, and with a modi- fication the code was able to correct a deletion and a reversal error in the preceding bit or it could correct two adjacent reversal errors. Tenengolts [105] also proposed a class of non-binary codes that can correct a single deletion or insertion, of which the cardinal- ity was asymptotically optimal. In [106] and [107] Dolgopolov also presented non-binary codes capable of correcting insertion, deletion and reversal errors, as well as presenting conditions on the existence on these types of codes.

3-10 3. Overview of Insertion/Deletion Correcting Codes

Helberg et al [108] presented a class of codes that combined spectral shaping properties with the ability to correct reversal errors and synchronization errors. These errors could be corrected if only one type of error occurred in a word. The codes were constructed by finding certain balanced subcodes of the single synchronization error correcting Lev- enshtein block codes.

In [69], Ferreira et al presented several results on the binary structure of Levenshtein’s single insertion/deletion correcting codes and the relation to constrained codes with nulls in the power spectral density function. Some spectral shaping markers were presented, as well as coding schemes that implemented Levenshtein codes without the need for markers. In Chapter 9 we will see a similar result for binary sequences derived from permutation matrices, having nulls in the power spectral density function.

Helberg and Ferreira [109] investigated the weight spectra and Hamming distance properties of single insertion/deletion correcting codes. These relationships were used to construct the first general number theoretic code that could correct multiple random insertions/deletions errors, though a complete decoding algorithm has not been found yet.

3.3.2.3 Other codes

Here codes are discussed that generally cannot be categorized into one of the previous sections.

Iwamura and Imai [110] proposed a code that can algebraically correct synchronization and reversal errors occurring at the same time, as long as they occur within a certain range. The code is constructed by adding parities to the information bits by calculating weight and kernel values. However, it was assumed that no errors would occur in the parity bits.

Blaum et al [111] proposed two methods for recovering from insertions or deletions of symbols in (d, k)-constrained codes. The first method made use of variable length codes derived from modulo arithmetic and allowed identification of up to three insertions and/or deletions in a given block. The second method was of block type, making use of synchronization sequences at fixed positions and allowed for the detection of large numbers of insertions and deletions.

Kløve [112] showed a code construction for (d, k)-sequences that can correct a single

3-11 3. Overview of Insertion/Deletion Correcting Codes insertion or deletion of a zero or it can correct a single peak-shift. A single peak-shift does not change the length of a sequence, but swaps a one with a zero to the left or the right. This can then be seen as a deletion of a zero before and an insertion of a zero after a one, or vice versa. Kløve made use of (d, k)-sequences of constant Hamming weight and defined perfect codes that are able to correct the errors mentioned. He also presented a systematic method to construct large classes of these perfect codes.

Roth and Siegel [113] made use of Lee metric BCH codes to generate (d, k)-constrained codes of variable length that were able to correct insertions and deletions. (The Lee metric is similar to the Hamming metric, except that it is commonly used with non- binary codes.) Similar to this, Bours [114] presented an algorithm for the construction of insertion/deletion correcting run-length limited codes, but of fixed-length. Again, binary (d, k)-constrained code words were generated by using code words from a q-ary Lee metric based code. It was shown that a decoding algorithm for the Lee metric could be extended to apply to insertion/deletion correcting run-length limited codes.

Schulman and Zuckerman [115] presented concatenated codes that are asymptotically good for channels with insertions, deletions and transpositions. The outer code is given by polynomial evaluation and is decoded by using the Welch-Berlekamp algorithm. It is also stated that any asymptotically good, efficiently encodable and decodable code can be used as an outer code. The inner code is found by brute force and is said to only need polynomial time to construct, encode and decode.

Davey and MacKay [116] presented a new block code that is capable of synchronizing after multiple insertion, deletion and reversal errors in a single block. The code consists of a non-linear inner code, called a watermark code, concatenated with a low-density parity- check (LDPC) code. The watermark code is known to the receiver and thus the entire watermark sequence acts as a marker. The data is encoded using a LDPC code and then added to the watermark code. The inner code allows for probabilistic resynchronization and provides soft outputs for the outer decoder that is capable of correcting reversal errors. Note that these watermarks have no relation to those used for authentication purposes.

A similar concatenated construction was considered by Chen et al [117]. In this case the inner code was a combination of a single deletion correcting Varshamov-Tenengolts block code and a marker code. The outer code was also a LDPC code.

Swart and Ferreira [118] made use of computer searches to find new double inser-

3-12 3. Overview of Insertion/Deletion Correcting Codes tion/deletion correcting codes, finding codebooks that are larger than those found by Helberg’s number theoretic approach [109]. They also presented alternative proofs to the size of sub- and supersequence sets after double deletions or insertions, first proved by Levenshtein [97]. Swart [119] also proposed a decoding algorithm for Helberg’s double insertion/deletion correcting codes, however only deletions could be corrected and the correction of insertions is still an open problem.

For a comprehensive survey on single deletion correcting codes and some additional properties and proofs on these codes, the reader can refer to Sloane [120].

3.4 Convolutional codes

Though research in this field has been concentrated on block codes, some work has been done regarding convolutional codes.

Mori and Imai [121] proposed a Viterbi decoder based on the weighted Levenshtein distance, implementing Unequal Length Branch Metrics. They showed that the weighted Levenshtein distance is a suitable metric in a channel where both reversal errors and in- sertion/deletion errors occur. This decoder makes it possible to continue Viterbi decoding without re-synchronization, even if insertion/deletion errors occur. A theoretical analysis was done to predict the bit error rate expected, but only considering insertions of ones. In the simulations a binary one was inserted before a sequence and then decoded. It is thus unclear how the decoder would perform should random errors occur.

Bouloutas, Hart and Schwartz [122] presented a modified Viterbi algorithm to correct insertion and deletion errors in addition to reversal errors. The received sequence is sent through an estimator which determines the estimated data sequence by assigning a cost to the different operations (reversals, insertions and deletions). The algorithm uses this estimate to determine a minimum cost path through the trellis.

Swart and Ferreira [123] presented an insertion/deletion correcting code that was based on convolutional codes. The scheme consisted of a long buffer that accumulated and truncated the encoded, blocked data and sent it in reverse over the channel. The scheme could correct only reversals, insertions or deletions, but not a combination of these errors.

3-13 3. Overview of Insertion/Deletion Correcting Codes

Dos Santos et al [124], [125] presented an insertion/deletion correcting scheme that made use of standard convolutional codes and multiple, parallel Viterbi decoders. The scheme made use of a Bit-Resynchronizer which compared the rate of change between the different survivor sequence error metrics. This was used to deduce which decoder was in synchronization and the output from that decoder was then used. Exact positions of the error could not be determined, thus it was possible to have short bursts of reversal errors after correction. For this reason a concatenated scheme, with convolutional code and Bit- Resynchronizer as inner code and Reed Solomon codes as outer code, was investigated. There is no interaction between individual Viterbi decoders as each decoder is used as normal. A next step is to create interconnections between the multiple Viterbi decoders to create a larger, single decoder. This is what Swart, Ferreira and Dos Santos did in [126], thus creating one large Viterbi decoder. This is similar to an application of watermark extraction that we will discuss in the next section.

Cheng [127] also investigated the Viterbi decoder using the Levenshtein distance as metric. In this case the simulations showed that several random errors could be corrected. Path-pruned convolutional codes were also introduced, where branches in the trellis dia- gram are periodically deleted with the aim of creating insertion/deletion correcting code words in certain time intervals in the trellis. These modified time intervals can then be used to correct insertion/deletion errors that occurred.

3.5 Other applications

Finally, we look at some examples from other applications where insertions and deletions occur and some sort of error correction is needed. Only limited references are used to illustrate the concepts and as such this should not be viewed as a complete overview of the literature available. Examples of these applications are spelling correction, speech recognition, pattern recognition and optical character recognition (OCR). Also, similar techniques are being used in DNA sequencing.

The first application of comma-free codes was in the field of DNA sequencing. Crick, Griffith and Orgel [128] proposed it as a means of encoding protein sequences. Later it was applied to coding by Golomb, Gordon and Welch [80], as was seen earlier.

Okuda, Tanaka and Kasai showed in [129] how it is possible to use the Levenshtein

3-14 3. Overview of Insertion/Deletion Correcting Codes metric to correct words in which substitution, insertion and deletion errors occurred. They made use of the weighted Levenshtein distance and showed that their approach gave better results than any other method at that time. In this case insertion/deletion correction is applied to spelling correction.

Petrovic and Golic [130] looked at the efficient computation of an where the number of edit operations is limited and the maximum number of runs of deletions and insertions is known. The edit distance is defined as the minimum sum of elementary edit distances associated with edit operations of substitutions, deletions and insertions, to transform one string into another. From this it is clear that the edit distance is similar to the Levenshtein distance. The edit distance is used in a variety of other applications.

Oommen and Loke [131] also proposed an algorithm to determine the optimum edit distance between two strings. Their scheme though takes generalised transpositions into account as well. A transposition is where two characters exchange positions and the gen- eralised transposition is where substitutions may also occur in the transposed characters. Using the algorithm, they proposed a syntactic pattern recognition scheme that corrects noisy text.

Selective embedding of an authentication watermark is used to embed the watermark in regions with high masking thresholds, such that a slight altering of the data is not easily perceived. The receiver has to identify these regions for extraction, but since the data could have been processed, these regions might change. In such cases, the decoder incorrectly identifies extra regions as containing watermark bits. This can be seen as insertions and is termed as “false alarms” by Tewfik and Mansour [132]–[134]. They made use of a similar modified Viterbi algorithm as presented in [126]. They also looked at modifying the sequential decoding algorithm in a similar manner.

Lastly, similar techniques can be used on lossy packet-based networks. Instead of random bit deletions, in this scenario entire packets are lost or “deleted”. Albanese et al [135] presented an encoding technique where packets are assigned a certain priority. This priority determines the fraction of encoding packets that is sufficient to recover parts of a message, even though packets have been lost. With the growth of the Internet and it being a packet-based network, a lot of research is now going in this direction.

3-15 4 Permutation Trellis Codes

4.1 Introduction

Where Chapter 2 only provided a brief overview of results in the literature, we will in this chapter look at results relevant to this thesis in more detail, as well as presenting some new results.

It is known from literature that M-ary frequency shift keying (M-FSK) can be com- bined with permutation codes [22] as a communication system for power-lines communi- cation (PLC). Since power-lines are designed to transmit power and not information, they are seen as very bad communication channels, with broad band, narrow band and back- ground noise being present. We look at the setup of such a system and why permutation codes are suitable for such a system.

Furthermore, using distance-preserving mappings the output of a convolutional en- coder can be mapped to permutation codes, creating a permutation trellis code [25], thus having the option to use the well known Viterbi algorithm for decoding. However, finding mappings can be a difficult and time consuming task. A mapping algorithm or construc- tion to generate such mappings is then preferable. We look at how permutation trellis codes are created and how they are decoded as well as looking at distance-preserving mappings in more detail.

Finally, the simulation setup is presented that will be used to evaluate the permutation trellis codes. This is used to obtain some preliminary performance results. The simulation setup is also used to corroborate selected results in the rest of the thesis.

4-1 4. Permutation Trellis Codes

In this chapter we will be using a loose, conversational style to become more familiar with the subject matter, thus neglecting exact mathematical definitions and notations. However, in subsequent chapters we will be using the more mathematically correct ap- proach.

4.2 Permutation codes, M-ary FSK and PLC

The communication scheme, as proposed in [22], [25] and [26], is briefly discussed.

The communication scheme works by assigning the M integers from a permutation code to the M frequencies of the M-FSK system, thus every symbol corresponds uniquely to a frequency from the M-FSK modulator. The M-ary symbols or integers from the permutation code are then transmitted in time as the corresponding frequencies over the channel, thus providing a transmitted signal with a constant envelope.

A modified, non-coherent envelope detector is used for demodulation. The normal de- modulator computes M envelopes and estimates the transmitted frequency by outputting the one frequency that corresponds to the largest envelope. However, the modified de- modulator introduces a threshold after every envelope detector and when this threshold is exceeded, it is assumed that an output is present at that frequency.

In other words, the demodulator consists of a modified envelope detector for each frequency, that outputs a 1 if the signal envelope is above a certain threshold (indicating that a signal is present) and outputs a 0 otherwise (indicating that no signal was present). Thus for each symbol transmitted, M outputs are obtained from the demodulator. These result in an M × M binary matrix that is used for decoding, where the rows represent the frequencies used and the columns represent the position or time in the code word. When combined with convolutional codes (as described in the next section) this binary matrix is used in the Viterbi decoder.

On a power-line there are generally three types of noise present (see [22] and references therein) and these will affect the demodulator in different ways.

• Background noise, which is equivalent to the normal Gaussian white noise. This noise causes a signal to be present on a demodulator even though no signal was

4-2 4. Permutation Trellis Codes

sent, or causes a signal to be absent although a signal was sent. Causes of this are usually related to natural sources, such as thermal vibrations of atoms or radiation from the sun.

• Impulse noise, which is noise with a broadband frequency character and which is only present for very short periods of time. This noise causes signals to be present in all the demodulators, but only over a limited time period. Causes of this include switching equipment, power-line transients or lightning strikes.

• Permanent frequency disturbance, which is noise present in a very narrow band for long periods of time. This noise causes a signal to be present in a demodulator for an indefinite time period. Causes of this include equipment that produces higher harmonics in the frequency spectrum, such as computer monitors.

We illustrate the above with the following example.

Example 4.1 The M = 4 permutation code word (1, 4, 2, 3) is sent. If received correctly, the output of the demodulator would be

f1 1 0 0 0

f2 0 0 1 0

f3 0 0 0 1, (4.1)

f4 0 1 0 0

t1 t2 t3 t4 where fi represents the output for the detector at frequency i and tj represents the time interval j in which it occurs, for 1 ≤ i, j ≤ 4.

Channel noise causes errors in the received matrix, which can be represented by the following matrices.

• Background noise - a one becomes a zero, or vice versa.

0 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0

4-3 4. Permutation Trellis Codes

• Impulse noise - a complete column is received as ones.

1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 0

• Narrow band noise - a complete row is received as ones.

1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1

2

This same principle will be used in the simulation setup in Section 4.4.

4.3 Permutation trellis codes and distance-preserving mappings

Using convolutional codes it is possible to easily decode permutation codes using a trellis and the Viterbi algorithm. The n-length outputs of a binary convolutional encoder are mapped to the code words from an M-length permutation code. A mapping consists of the convolutional base code’s binary output sequences being mapped to an ordered subset of 2n permutation sequences, chosen from the full set of permutations. The subset is chosen such that the Hamming distance between any two permutation sequences is at least as large as the distance between the corresponding convolutional code’s output sequences from which they are mapped.

One of the most important considerations in an error correcting code is the distance. Therefore it has to be ensured that the distance properties of the binary code are trans- ferred to the permutation code when a mapping takes place. This can be achieved by making use of Hamming distance matrices [53] and creating DPMs. Matrices D and E show the distance relationships between the binary sequences and the permutation se-

4-4 4. Permutation Trellis Codes quences respectively. The entries denote the distance that each sequence has in relation to the other sequences in the codebook. (For an exact mathematical definition for D and E, refer to Section 5.2.) The following example illustrates this.

1 Example 4.2 Using the standard R = 2 , ν = 2, dfree = 5 convolutional code, we map n = 2 → M = 3 by applying the mapping {00, 01, 10, 11} → {231, 213, 132, 123}. In Figure 4.1 we compare the state diagram for the normal binary convolutional code with that of the state diagram for the resulting permutation trellis code after the mapping is done.

For this mapping, the Hamming distance matrices are 00 01 10 11   00 0 1 1 2   01  1 0 2 1  D =   , 10  1 2 0 1    11 2 1 1 0

00 (0) 231 (0)

0 0 11 (0) 11 (1) 123 (0) 123 (1) 00 (1) 231 (1)

2 10 (0) 1 2 132 (0) 1

01 (0) 01 (1) 213 (0) 213 (1) 3 3

10 (1) 132 (1)

(a) (b)

Figure 4.1: State systems for (a) convolutional base code and (b) permutation trellis code

4-5 4. Permutation Trellis Codes 231 213 132 123   231 0 2 2 3   213  2 0 3 2  E =   , 132  2 3 0 2    123 3 2 2 0 where the code words are included for easy verification of the distance entries in the matrices.

It can easily be verified that the distance between any permutation sequences and the corresponding binary outputs increases by one. The shortest merging paths in the trellis, which for this code determine the free distance, have a length of three steps. Thus for 0 each step there is an increase in distance of one, resulting in a free distance of dfree = 8. 0 (The variable dfree is used to denote the free distance of the resulting permutation trellis code.) 2

Using these Hamming distance matrices, the following types of distance-preserving mappings can be realised.

Definition 4.1 [54] A distance-conserving mapping (DCM) is a distance-preserving map- ping that only guarantees conservation of the base code’s minimum distance. Hence at least one eij = dij while for all other i and j, eij ≥ dij, i 6= j. 2

Definition 4.2 [54] A distance-increasing mapping (DIM) is a distance-preserving map- ping that guarantees that the resulting code’s distance will have some increase above the base code’s minimum distance. Hence, eij ≥ dij + δ for i 6= j, where δ ∈ {1, 2,...}, depending on the increase required. 2

Definition 4.3 [54] A distance-reducing mapping (DRM) is a distance-preserving map- ping that yields a mapping of which the distance is lower than that of the base code, although this decrease is controlled. The decrease is guaranteed to be not more than a fixed amount, determined by the length of the shortest merging paths in the trellis diagram, with eij ≥ dij + δ, δ ∈ {−1, −2,...} and i 6= j. 2

For convolutional base codes where the shortest merging paths determine the free distance, the free distance of the resulting permutation trellis code is then lower bounded by 0 dfree ≥ dfree + τδ, (4.2)

4-6 4. Permutation Trellis Codes where τ is the length of the shortest merging paths in the trellis diagram.

4.4 Simulation setup

A simple error model, which generates errors in the received matrix according to certain error parameters, was used to evaluate the different mappings. The error parameters were assumed to be equal for all frequency sub-bands. The different types of noise are generated as follows (similar to Example 4.1)

• background noise - each entry in the received matrix has a probability, pb, of being in error,

• impulse noise - each column in the received matrix has a probability, pi, of resulting in an impulse noise error,

• permanent frequency disturbance (or narrow band noise) - all received matrices will have 1s in the row that corresponds to the frequency error.

The M × M received matrix is used to compare with the branches in the trellis. To do this we use X 0 ρbranch = (yij ⊕ yij), 1≤i,j≤M

0 where ρbranch represents the branch metric, yij are the entries in the branch matrix, yij are the entries in the received matrix and ⊕ represents the binary XOR function.

Equivalently, with the aim on multi-user systems [56], we can also use

" # X 0 ρbranch = M − (yij ∧ yij) , 1≤i,j≤M where ∧ represents the binary AND operation.

4-7 4. Permutation Trellis Codes

4.5 Preliminary performance results

Preliminary results were obtained for a range of different M values combined with different convolutional base codes. These were investigated under all three different noise types.

These results were obtained to get an understanding of how the mappings and convo- lutional codes combine, and how different combinations perform under different circum- stances. The aim was then to ascertain the feasibility of further work and to determine which aspects we could possibly improve on.

Certain results raised key issues concerning permutation mappings, and this led di- rectly to the research we will be presenting in the next chapter.

The results of Figures 4.2–4.4 were presented in [26] and the results of Figures 4.5 and 4.6 in [57]. The exact parameters of the convolutional codes are listed in Appendix A.

In Figures 4.2–4.4 the performance of three different permutation trellis codes under different noise conditions is investigated. We made use of well known convolutional codes, 1 n−1 such as the R = n and R = n codes.

For the first simulations, the following codes and mappings were used

1 • n = 2 → M = 3 mapping with an R = 2 , ν = 2, dfree = 5, convolutional base code,

1 • n = 4 → M = 4 mapping with an R = 4 , ν = 2, dfree = 8, convolutional base code,

4 • n = 5 → M = 5 mapping with an R = 5 , ν = 2, dfree = 2, convolutional base code.

For comparison, the equivalent uncoded data were sent at the same rate as the overall system for each case. Table 4.1 lists the exact mappings used for these simulations.

For Figure 4.2 background noise was introduced into the system, for Figure 4.3 impulse noise was introduced into the system and for Figure 4.4 background noise in conjunction with 0, 1 or 2 permanent frequency disturbances were introduced into the system. It can be seen that for all the noise scenarios investigated that the permutation trellis codes offer a significant performance improvement over the uncoded communications. As expected, the codes with the higher free distance perform better than those with a lower free distance.

4-8 4. Permutation Trellis Codes

In addition, we also looked at the performance when using some selected DCMs, DIMs and DRMs when the overall rate of the system is the same. In this case permanent frequency disturbances were used in the presence of background noise to evaluate the performance.

At this point it is necessary to again point out that obtaining mappings can be very difficult and time consuming if no algorithm or construction is available. Other methods used to obtain mappings are the tree search [25], trial-and-error searches or exhaustive

Table 4.1: DPMs used in simulations

Description Mapping n = 2 → M = 3 DIM {231, 213, 132, 123}

1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, n = 4 → M = 4 DCM 3214, 3241, 2314, 2341, 3421, 3412, 3124, 3142

51234, 51243, 51324, 51342, 51423, 51432, 52134, 52143,   53214, 53241, 52314, 52341, 53421, 53412, 53124, 53142, n = 5 → M = 5 DCM 41235, 41253, 41325, 41352, 41523, 41532, 42135, 42153,    43215, 43251, 42315, 42351, 43521, 43512, 43125, 43152 

1

10-1

10-2

10-3

10-4 Bit error rate Bit

-5 M = 3, uncoded 10 M = 4, uncoded M = 5, uncoded 10-6 M = 3, R = 1/2 base M = 4, R = 1/4 base M = 5, R = 4/5 base 10-7 1 10-1 Background noise probability Figure 4.2: BER for background noise

4-9 4. Permutation Trellis Codes

1

10-1

10-2

10-3

10-4 Bit error rate Bit

-5 M = 3, uncoded 10 M = 4, uncoded M = 5, uncoded 10-6 M = 3, R = 1/2 base M = 4, R = 1/4 base M = 5, R = 4/5 base 10-7 1 10-1 Impulse noise probability Figure 4.3: BER for impulse noise

1

10-1

10-2

10-3 Bit error rate Bit -4 10 M = 3, uncoded (0 freq. err.) M = 3, uncoded (1 freq. err.) M = 3, uncoded (2 freq. err.) 10-5 M = 3, R = 1/2 base (0 freq. err.) M = 3, R = 1/2 base (1 freq. err.) M = 3, R = 1/2 base (2 freq. err.) 10-6 1 10-1 Background noise probability Figure 4.4: BER for background noise with permanent frequency disturbances

4-10 4. Permutation Trellis Codes searches. The following mappings were used, found by some of these methods,

1) DIM, mapping n = 4 → M = 5 while increasing the distance by 1, found by trial and error,

2) DCM1, mapping n = 5 → M = 5 while conserving the distance, obtained by applying the prefix construction [25],

3) DCM2, mapping n = 5 → M = 5 while conserving the distance, found by exhaustive search [26],

4) DRM, mapping n = 6 → M = 5 while decreasing the distance by at most 1, found by trial and error.

The exact mappings used can be found in Table 4.2. While it is still feasible to use these methods for small values of M, finding mappings for larger M values it becomes impractical.

Table 4.2: DIM, DCMs and DRM used in simulations

Description Mapping 12345, 13452, 14523, 15234, 23514, 25143, 21435, 24351, n = 4 → M = 5 DIM 31542, 32154, 34215, 35421, 52413, 53241, 51324, 54132

51234, 51243, 51324, 51342, 51423, 51432, 52134, 52143,   53214, 53241, 52314, 52341, 53421, 53412, 53124, 53142, n = 5 → M = 5 DCM 1 41235, 41253, 41325, 41352, 41523, 41532, 42135, 42153,    43215, 43251, 42315, 42351, 43521, 43512, 43125, 43152 

12534, 21435, 13254, 24153, 21354, 12345, 23514, 23145,   15243, 51423, 25134, 53241, 41325, 21543, 31524, 35142, n = 5 → M = 5 DCM 2 14235, 12453, 34251, 54132, 42513, 32415, 34512, 43152,    54321, 52431, 45231, 35421, 52314, 45312, 43521, 53412 

12345, 12354, 12543, 12534, 13245, 13254, 13542, 13524,   14325, 14352, 14523, 14532, 15324, 15342, 15423, 15432,   21345, 21354, 21543, 21534, 23145, 23154, 23541, 23514,   24315, 24351, 24513, 24531, 25314, 25341, 25413, 25431, n = 6 → M = 5 DRM 42153, 42135, 42513, 42531, 41253, 41235, 41523, 41532,   45123, 45132, 45213, 45231, 43251, 43215, 43521, 43512,   32154, 32145, 32514, 32541, 31254, 31245, 31524, 31542,    35241, 35214, 35421, 35412, 34251, 34215, 34521, 34512 

4-11 4. Permutation Trellis Codes

These M = 5 mappings were combined with the following convolutional base codes

3 1) DIM was used to map n = 4 → M = 5 with an R = 4 , ν = 2, dfree = 3, punctured convolutional base code,

3 2) DCM1 was used to map n = 5 → M = 5 with an R = 5 , ν = 2, dfree = 4, punctured convolutional base code,

3 3) DCM2 was used to map n = 5 → M = 5 with an R = 5 , ν = 2, dfree = 4, punctured convolutional base code,

3 4) DRM was used to map n = 6 → M = 5 with an R = 6 , ν = 2, dfree = 5, punctured convolutional base code.

These rates ensured that the overall system rate was the same in all four cases. Also, in 0 all cases the guaranteed free distance of the permutation trellis code, dfree, is equal to 4.

The mappings only guarantee a minimum increase or maximum loss of distance. Thus, it is generally able to exceed these, with even the DRM showing an increase of distance on average. As we saw in Example 4.2, the entries in the E matrix show an increase over those in the D matrix. Therefore, by subtracting the values in the D matrix from those in the E matrix, and dividing by the number of entries contributing to the distance, the average distance increase in a mapping can be calculated. (See Section 5.5 for the mathematical definition.)

For the mappings used, we have an average distance increase as follows: DIM with

2.10, DCM1 with 1.06, DCM2 with 1.54 and DRM with 0.91. This would suggest that the DCM2 should perform better than the DCM1.

Figure 4.5 compares the mappings when only one permanent frequency disturbance occurs in the presence of background noise. This was done with the disturbance present on a different frequency position each time. The DIM is performing the best, with the performance independent of the frequency the disturbance is on. The DCM1 is the worst with performance varying, depending on the position of the disturbance.

This raises the question: why does the position of the disturbance affect one mapping but not another? Our research on the distance optimality of permutation mappings in the next chapter answers this question.

4-12 4. Permutation Trellis Codes

Figure 4.6 compares the mappings when zero, one (in position 1), two (in positions 1 and 2) and three (in positions 1, 2 and 3) frequency disturbances respectively occur at the same time in the presence of background noise. Again, the DIM is performing the best, with the DCM2 and DRM very close to each other. While the DCM1 was close to the others for no disturbances, its performance degrades significantly as the number of disturbances increases. The previous result has shown that this mapping’s performance depends on the position of the disturbances, thus certain combinations of disturbances can render it useless (as in the case of disturbances on positions 1, 2 and 3). Other combinations might result in slightly better performance.

This again raises the question of why one mapping’s performance is so different from that of another. Can one find a mapping and predict its performance without having to run simulation results? The next chapter will also answer this to some extent.

4.6 Summary

In this chapter the permutation trellis codes, distance-preserving mappings and the effect of noise on decoding were discussed in more detail, leading to the simulation setup to be used for performance evaluations. Preliminary results showed permutation trellis codes to be a viable scheme for power-lines. However, mappings with similar parameters showed differing performance results, prompting the investigation into the optimality of mappings in the following chapter.

4-13 4. Permutation Trellis Codes

1 1

10-1 10-1

10-2 10-2

10-3 10-3 Bit error rate Bit 10-4 error rate Bit 10-4 PFD in pos. 1 PFD in pos. 1 PFD in pos. 2 PFD in pos. 2 10-5 PFD in pos. 3 10-5 PFD in pos. 3 PFD in pos. 4 PFD in pos. 4 PFD in pos. 5 PFD in pos. 5 10-6 10-6 1 10-1 10-2 1 10-1 10-2 Background noise probability Background noise probability (a) (b)

1 1

10-1 10-1

10-2 10-2

10-3 10-3 Bit error rate Bit 10-4 error rate Bit 10-4 PFD in pos. 1 PFD in pos. 1 PFD in pos. 2 PFD in pos. 2 -5 10 PFD in pos. 3 10-5 PFD in pos. 3 PFD in pos. 4 PFD in pos. 4 PFD in pos. 5 PFD in pos. 5 -6 10 10-6 -1 -2 1 10 10 1 10-1 10-2 Background noise probability Background noise probability (c) (d)

Figure 4.5: Single permanent frequency disturbance (PFD) in different positions for (a) DIM, (b) DCM1, (c) DCM2 and (d) DRM

4-14 4. Permutation Trellis Codes

1 1

10-1 10-1

10-2 10-2

10-3 10-3

10-4 10-4 Bit error rate Bit error rate Bit 10-5 10-5 M = 5 DIM M = 5 DIM M = 5 DCM M = 5 DCM 10-6 1 10-6 1 M = 5 DCM2 M = 5 DCM2 M = 5 DRM M = 5 DRM 10-7 10-7 1 10-1 10-2 1 10-1 10-2 Background noise probability Background noise probability (a) (b)

1 1

10-1 10-1

10-2 10-2

10-3 10-3

10-4 10-4 Bit error rate Bit error rate Bit 10-5 10-5 M = 5 DIM M = 5 DIM M = 5 DCM M = 5 DCM 10-6 1 10-6 1 M = 5 DCM2 M = 5 DCM2 M = 5 DRM M = 5 DRM 10-7 10-7 1 10-1 10-2 1 10-1 10-2 Background noise probability Background noise probability (c) (d)

Figure 4.6: Comparison of various number of permanent frequency disturbances (PFDs) with (a) 0 disturbances, (b) 1 disturbance, (c) 2 disturbances and (d) 3 disturbances

4-15 Distance Optimality of 5 Permutation and Other Mappings

5.1 Introduction

Different mappings can be found to satisfy the criterion of distance-preserving mappings (DPMs). Therefore, an analytical method is necessary to determine the “optimality” of a given mapping. In this chapter we will see that there exists an upper bound on the sum of all the Hamming distances between sequences in a mapping. A similar sum of Hamming distances was used in [23], where a Hamming distance sum test was used to determine whether a given subset of constrained codes could be used to construct a DPM.

First, some definitions associated with DPMs will be formally presented. Second, we will propose an upper bound on the sum of Hamming distances for permutation mappings and for mappings in general, thereafter showing that similar bounds for q-ary (n, k) codes and the permutation mappings are special cases of this upper bound. Finally, the upper bound is used to determine the average increase in distance when using a mapping.

5.2 Distance-preserving mappings

In Chapter 2 and 4 some of these concepts were only briefly described. Now we will for- malize the definitions of codebooks for binary sequences as well as permutation sequences, DPMs and other types of mappings, and other related concepts.

Definition 5.1 A binary code, Cb, consists of |Cb| sequences of length n, where every

sequence contains zeros and ones as symbols. 2

5-1 5. Distance Optimality of Permutation and Other Mappings

Definition 5.2 A permutation code, Cp, consists of |Cp| sequences of length M, where every sequence contains the M different integers 1, 2,...,M as symbols. 2

Definition 5.3 The symmetric group, SM , consists of |SM | = M! sequences obtained by permuting the symbols 1, 2,...,M in all the possible ways. 2

We consider mappings where Cb consists of all the possible binary sequences of length n n with |Cb| = 2 and Cp consists of some subset of SM with |Cb| = |Cp|. In addition, the distances between sequences for one set are preserved amongst the sequences of the other set.

(1) (2) (n) Let xi be the i-th binary sequence in Cb, and let xi = (xi , xi , . . . , xi ). The Ham- ming distance dH (xi, xj) is defined as the number of positions in which the two sequences differ

dH (xi, xj) = w(xi ⊕ xj), (5.1) with w(.) denoting the Hamming weight and ⊕ denoting modulo 2 addition.

Construct a matrix D whose entries are the distances between binary sequences in Cb, where

D = [dij] with dij = dH (xi, xj). (5.2)

Similarly for permutation sequences, let yi be the i-th permutation sequence in Cp, and (1) (2) (M) let yi = (yi , yi , . . . , yi ). The Hamming distance dH (yi, yj) is defined as the number of positions in which the two sequences differ

(k) (k) dH (yi, yj) = |{1 ≤ k ≤ M | yi 6= yj }|. (5.3)

Construct a matrix E whose entries are the distances between permutation sequences in Cp, with

E = [eij] with eij = dH (yi, yj). (5.4)

Example 5.1 The following is a possible mapping of n = 2 → M = 3 (for subsequent mappings we will omit the binary sequences, which will follow the usual lexicography)

{00, 01, 10, 11} → {123, 132, 213, 231}.

5-2 5. Distance Optimality of Permutation and Other Mappings

Using (5.1)–(5.4), we have for the above mapping

    0 1 1 2 0 2 2 3     1 0 2 1 2 0 3 2 D =   and E =   . 1 2 0 1 2 3 0 2     2 1 1 0 3 2 2 0

In this case all entries had an increase in distance (except the main diagonal where there is always zero distance). 2

Three different types of mappings can be obtained, depending on how the Hamming distance is preserved. Previously this was defined in terms of trellis codes (Chapter 4 and [26]), but since only the mapping itself is considered, we will redefine it purely in terms of distances between the binary and permutation sequences.

Definition 5.4 A distance-conserving mapping (DCM) guarantees conservation of the binary sequences’ Hamming distance, such that eij ≥ dij for all i 6= j and ei0j0 = di0j0 for 0 0 some i 6= j . 2

Definition 5.5 A distance-increasing mapping (DIM) guarantees that the permutation sequences’ distance will always have some increase above the binary sequences’ distance, such that eij ≥ dij + δ, δ ∈ {1, 2,...} for all i 6= j. 2

Definition 5.6 A distance-reducing mapping (DRM) guarantees that the permutation sequences’ distance loss will not be more than a fixed amount compared to the binary sequences’ distance, such that eij ≥ dij + δ, δ ∈ {−1, −2,...} for all i 6= j. 2

Thus, in general, δ defines the type of DPM, with δ = 0 indicating a DCM, δ > 0 indi- cating a DIM and δ < 0 indicating a DRM. We now introduce the notation M(n, M, δ) to denote DPMs from n-binary sequences to M-permutation sequences with δ indicating the mapping type and the lower bound on the distance change. The mapping in Example 5.1 would thus be an M(2, 3, 1) mapping.

As we noted in Section 2.5, the mappings in [29] are called increasing mappings, although by the definitions presented above these are still distance-conserving mappings. This can be clarified more clearly using the formal definitions. Equal length sequences were used, i.e. n = M, and since max{dH (xi, xj)} = n and max{dH (yi, yj)} = M we have

5-3 5. Distance Optimality of Permutation and Other Mappings that δ = 0. These mappings did indeed show an increase, except where it was impossible to do so, on the skew diagonal in the matrices where the maximum distances are located.

If one is able to construct a DIM, then it implies that a DCM and a DRM are also possible for the same parameters. As an example, if we have a mapping M(2, 4, 2), we can also have mappings M(2, 4, 1), M(2, 4, 0), M(2, 4, −1), etc. In general, δ ≤ M − n, but since a mapping with a higher δ is better than a mapping with a lower δ, it is only necessary to consider mappings with δ = M − n. A consequence of this is that DIMs can only exist for n < M and that for n > M a DRM will always be obtained.

5.3 Upper bound on the sum of distances in permutation mappings

Since several different mappings can be found, we need a means to compare different mappings. In [28] and [29] the distance expansion distribution was used to compare different mappings. This is an M × M matrix, G, with entries gkl denoting the number n of corresponding sequences for which dij = k and eij = l, 1 ≤ i, j ≤ 2 . In other words, G indicates the number of binary sequences with Hamming distance k and corresponding permutation sequences with Hamming distance l.

We use the example from [29] to illustrate the distance expansion distribution. Three 4 mappings, h5, l5 and r5, were compared with each other, where

0 80 0 0 0    0 96 64 0 4  h5 0 112 48 ,   16 64   16  0 64 6 2 8   4 68 64 24  l5 14 76 70 ,   22 58   16

5-4 5. Distance Optimality of Permutation and Other Mappings

 0 49 8 10 13   0 68 68 24  r5 0 93 67 .   0 80   16

Since this is a distance-preserving mapping, gkl = 0 for l < k, and to make the reading of the matrices easier, these values are omitted. The diagonal contains the number of sequences which show no increase in distance. One can see that r5 shows an increase in all sequences, except the 16 which are not able to.

Comparing such matrices for different mappings is not easy to do, especially when M gets very large. To compare mappings we will use the sum of the distances between sequences and show that there is an upper bound on this value. This is the same upper bound that was presented in [136] and [137]. This makes comparisons much easier, as a single value is used, regardless of the value of M.

In addition to the distances in (5.3) and (5.4), we now define the distance that a symbol in position k contributes towards the sum over the entries of E as

 (k) (k) (k) 1, if yi 6= yj , d (yi, yj) = (5.5) H (k) (k) 0, if yi = yj .

Let the matrix obtained from the distances for symbols in position k, represented by E(k), be constructed as

(k) h (k)i (k) (k) E = eij with eij = dH (yi, yj). (5.6)

Clearly, it holds that M X E = E(k). (5.7) k=1

Let |E| and |E(k)| be the sum of all the Hamming distances in the matrices E and E(k)

5-5 5. Distance Optimality of Permutation and Other Mappings respectively, with

|Cb| |Cb| |Cb| |Cb| X X (k) X X (k) |E| = eij and |E | = eij . (5.8) i=1 j=1 i=1 j=1

(From the context it is used in, it will be clear when |.| denotes cardinality, as in |Cb|, and when it denotes the sum of distances in the matrix, as in |E|. Therefore it will not be specified each time.)

To test the optimality of a mapping, it is necessary to know what the maximum achievable distance sum is and since

M X |E| = |E(k)|, k=1 |E| will be maximized if all |E(k)|, 1 ≤ k ≤ M, are maximized.

Example 5.2 Consider the M(2, 4, 1) mapping {1234, 1342, 1423, 2341}. The symbols in each position are

Position 1: 1, 1, 1, 2, Position 2: 2, 3, 4, 3, Position 3: 3, 4, 2, 4, Position 4: 4, 2, 3, 1.

This mapping produces the following matrices     0 3 3 4 0 0 0 1     3 0 3 2 (1) 0 0 0 1 E =   , E =   , 3 3 0 4 0 0 0 1     4 2 4 0 1 1 1 0     0 1 1 1 0 1 1 1     (2) (3) 1 0 1 0 (4) 1 0 1 1 E = E =   , E =   , 1 1 0 1 1 1 0 1     1 0 1 0 1 1 1 0 with |E| = 38, |E(1)| = 6, |E(2)| = |E(3)| = 10 and |E(4)| = 12. Clearly the symbols in position 1 (1, 1, 1, and 2) do not build the same distance as the symbols in position 4 (4,

5-6 5. Distance Optimality of Permutation and Other Mappings

2, 3, and 1). This is to be expected, since M(2, 4, 1) is a sub-optimal mapping compared to an M(2, 4, 2) mapping.

Therefore, consider the M(2, 4, 2) mapping {1234, 2341, 3412, 4123}, with the follow- ing symbols in each position

Position 1: 1, 2, 3, 4, Position 2: 2, 3, 4, 1, Position 3: 3, 4, 1, 2, Position 4: 4, 1, 2, 3.

This mapping produces     0 4 4 4 0 1 1 1     4 0 4 4 (1) (2) (3) (4) 1 0 1 1 E =   , E = E = E = E =   , 4 4 0 4 1 1 0 1     4 4 4 0 1 1 1 0 with |E| = 48 and |E(1)| = |E(2)| = |E(3)| = |E(4)| = 12. In all positions the maxi- mum distance is built because all the symbols differ from each other, hence |E| is also maximized. 2

A total of 2n binary sequences have to be mapped to the permutation sequences. With length M permutation sequences being used, there are M different symbols that can be used. Thus, to maximize |E(k)|, all the symbols in position k must differ as much as possible by using all M symbols. This can be accomplished by letting each consecutive sequence have a different symbol. When all the symbols have been used, the process starts over again. As an example, looking at the first position in an arbitrary Cp, let (1) (1) (1) (1) (1) x1 = 1, x2 = 2, . . . , xM = M, xM+1 = 1, xM+2 = 2, and so forth. Therefore, the first group of M sequences will all have different symbols, the second group of M sequences will all have different symbols, but the same as the first group, and this repeats for any group of size M thereafter. Hence, the 2n symbols will be divided into groups, each of size M. If 2n is not divisible by M, then one group will exist of size smaller than M.

5-7 5. Distance Optimality of Permutation and Other Mappings

We define the following symbols

 2n  α = , M

β ≡ 2n (mod M), where b.c produces the integer part after division and mod produces the remainder after division. Thus, the 2n symbols will be divided into α groups of size M and if 2n is not divisible by M, then there will be one more group of size β. Also, from the definitions, it follows that 2n = αM + β.

To make the following part of the argument easier, an example will be used to illustrate the ideas.

Example 5.3 Let n = 5 and M = 5. Next, consider only the first position of each sequence with the intent of maximising |E(1)|. As already mentioned, to maximise it, different symbols will be assigned to the first position of each sequence. With n = 5, there are 32 binary sequences and hence also 32 permutation sequences. Let the symbols assigned to first position of the permutation sequences then be the following set

{1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2}. | {z } | {z } | {z } | {z } | {z } | {z } #1 #2 #3 #4 #5 #6

From the equations α = 6 and β = 2. This can be verified by the symbols above, where it can be seen that there are indeed 6 groups, containing symbols {1, 2, 3, 4, 5}, of size 5, and one final “incomplete” group, containing symbols {1, 2}, of size 2. To calculate |E(1)|, the first symbol (in this case “1”) has to be compared with all the other symbols in the set. Whenever the symbol is different it will contribute distance towards |E(1)|. Similarly, the second symbol (in this case “2”) has to be compared with all the symbols, and so forth, repeating it for all 32 symbols. Now, to calculate |E(1)|, two possibilities will have to be considered: whether the symbol under consideration falls into the last incomplete group or not. If, for example, we consider all “2” symbols, then the distance will be less since “2” occurs in the last group of size 2. If we consider all “5” symbols, the distance will be more since “5” is not in this last group of size 2.

5-8 5. Distance Optimality of Permutation and Other Mappings

Specifically, for the first symbol, “1”, it differs from 25 symbols in the set. Similarly, the second symbol, “2”, differs from 25 symbols in the set. The third symbol, “3”, differs from 26 symbols in the set. The same holds for the fourth and fifth symbol, “4” and “5” respectively. Thereafter, the sixth symbol is again “1”, so it differs from 25 symbols. Therefore, the distance contributed by each symbol in the set will be as follows

 25, 25, 26, 26, 26, 25, 25, 26, 26, 26, 25, 25, 26, 26, 26,    25, 25, 26, 26, 26, 25, 25, 26, 26, 26, 25, 25, 26, 26, 26, .  25, 25 

It can be seen that 14 symbols contributed 25 distance units and that 18 symbols con- (1) tributed 26 distance units. Summing all these distances results in |E | = 818. 2

Note that the symbols in the previous example could have been arranged in any order and the same result would have been obtained. This is important as we chose the symbols in this example only to emphasize how the symbols are distributed. In a mapping the symbols would be arranged in any arbitrary way. The point is that although the symbols in a mapping are not distributed in the same structured way as in the example, the result is still the same as it depends only on the number of symbols used and not their positions.

The same reasoning used in the example will be used to prove the propositions.

Proposition 5.1 The upper bound on the distance that symbols in the k-th position can contribute is (k) 2n 2 |Emax| = 2 − (2αβ + β + α M), (5.9)

 2n  n where α = M and β = 2 (mod M). 2

Proof To simplify the generalisation and proof to follow, a distinction between symbols in the incomplete group and symbols not in the incomplete group will be made. Let Type 1 symbols be symbols that are in the incomplete group, in Example 5.3 this would be symbols {1, 2}. Let Type 2 symbols be symbols that are not in the incomplete group, in Example 5.3 this would be symbols {3, 4, 5}.

To generalise this, it is first necessary to know how many Type 1 and Type 2 symbols there are and second how much distance Type 1 and Type 2 symbols contribute toward the distance.

(k) Consider position k in an arbitrary Cp. To maximize |E |, let each consecutive

5-9 5. Distance Optimality of Permutation and Other Mappings

(k) (k) (k) sequence have a different symbol in position k, such that y1 = 1, y2 = 2, . . . , yM = M, (k) (k) yM+1 = 1, yM+2 = 2, and so forth. Note that the symbols are only assigned in this way to emphasize how they are distributed, in a mapping they would be arranged in any arbitrary way. The result only depends on the number of the symbols and not their positions. Also, the size of the set is 2n, but since it is not known if 2n is divisible by M, the last few symbols are not known at this stage.

First, consider Type 1 symbols. This type of symbol occurs α+1 times in the set since it is in all α complete groups as well as once in the incomplete group. Next, it contributes 2n − (α + 1) to the distance since it differs from all the symbols, except itself (there are 2n symbols, and itself occurs α + 1 times). Thus, each Type 1 symbol contributes (α + 1)(2n − α − 1) distance. However, from the definition there are β Type 1 symbols and therefore the distance contribution from all Type 1 symbols is

β(α + 1)(2n − α − 1).

Second, consider Type 2 symbols. This type of symbol occurs α times, since it only occurs in the complete groups. Next, it contributes 2n − α to the distance since it differs from all the symbols, except itself (as before, there are 2n symbols, and itself occurs α times). Thus, each Type 2 symbol contributes α(2n−α) distance. Since there are β Type 1 symbols, there have to be M − β Type 2 symbols. Therefore the distance contribution from all Type 2 symbols is α(M − β)(2n − α).

The total distance contributed by symbols in position k is then calculated as

|E(k)| = β(α + 1)(2n − α − 1) + α(M − β)(2n − α) = (αβ + β)(2n − α − 1) + (αM − αβ)(2n − α) n¨¨ 2 n n 2 n¨¨ 2 = ¨2 αβ − α β − αβ + 2 β − αβ − β + 2 αM − α M − ¨2 αβ + α β = 2n(αM + β) − 2αβ − β − α2M = 22n − (2αβ + β + α2M), recalling that 2n = αM + β. Since the symbols were chosen to achieve the most distance, this must also be the maximum that |E(k)| can obtain. 

5-10 5. Distance Optimality of Permutation and Other Mappings

Returning to Example 5.3, the values used were n = 5, M = 5, α = 6 and β = 2. Thus,

(k) 2n 2 |Emax| = 2 − (2αβ + β + α M) = 210 − (24 + 2 + 180) = 1024 − 206 = 818, which is the same value that was obtained in the example.

Proposition 5.2 The upper bound on the distance that any permutation mapping can produce is 2n 2 |Emax| = M[2 − (2αβ + β + α M)], (5.10)

2n n where α = b M c and β = 2 (mod M). 2

Proof This follows directly from Proposition 5.1 and (5.9). If all the symbols in the k-th position, 1 ≤ k ≤ M, contribute their maximum distance, then

(1) (2) (M) |Emax| = |Emax| + |Emax| + ··· + |Emax| = [22n − (2αβ + β + α2M)] + ··· + [22n − (2αβ + β + α2M)] = M[22n − (2αβ + β + α2M)]. 

Optimal mappings can now be defined in terms of the upper bound.

Definition 5.7 A distance-preserving mapping is said to be distance optimal if the total sum of the Hamming distances between sequences is equal to the upper bound of the attainable distance sum for such a mapping. 2

As we will see in Chapter 6, distance optimal mappings can be attained for certain values of M. The distance sum and upper bound will be used in Chapter 7 to compare the new mappings with the previously known mappings.

5-11 5. Distance Optimality of Permutation and Other Mappings

5.4 General upper bound on the sum of distances in a mapping

Before continuing with permutation mappings, we will generalise these upper bounds for any mapping. The upper bounds depended on

1) the cardinality of the set that is being mapped from, which is 2n if all binary sequences of length n are considered,

2) the number of symbols in the set that is being mapped to, which is M for the permutation sequences, and

3) the length of the sequences that is being mapped to, which is also M for the per- mutation sequences.

To generalise, consider mapping from some arbitrary set C to another arbitrary set C0. The above variables will then respectively be

1) |C|, the cardinality of C,

2) q, the number of symbols used in C0, and

3) l, the length of sequences in C0.

Although the same proof can be used as that of Proposition 5.1, an alternative proof will be used for the general upper bound.

Proposition 5.3 The upper bound on the distance that symbols in the k-th position can contribute in a mapping is

(k) 2 2 |Emax| = |C| − (2αβ + β + α q), (5.11)

|C| where α = b q c and β ≡ |C| (mod q), with b.c the floor function, producing the integer part after division and mod producing the remainder after division. 2

Proof Let mi denote the number of times that symbol i appears in position k in any of the |C| sequences, with |C| = m1 + m2 + ··· + mq. The contribution of a single symbol i

5-12 5. Distance Optimality of Permutation and Other Mappings

(k) to |E | is |C| − mi, as it differs from all the symbols, except itself. The contribution of (k) all the i symbols to |E | is mi(|C| − mi). Therefore,

(k) |E | = m1(|C| − m1) + m2(|C| − m2) + ··· + mq(|C| − mq) 2 2 2 = m1|C| − m1 + m2|C| − m2 + ··· + mq|C| − mq 2 2 2 = |C|(m1 + m2 + ··· + mq) − (m1 + m2 + ··· + mq) 2 2 2 2 = |C| − (m1 + m2 + ··· + mq). (5.12)

(k) 2 2 2 2 To maximise |E |, we can equivalently minimise (m1 +m2 +···+mq), as |C| is a constant 2 2 2 value. Using a Lagrange multiplier, (m1 + m2 + ··· + mq) has to be minimised with the constraint |C| = m1 + m2 + ··· + mq. Let

2 2 2 f(m) = m1 + m2 + ··· + mq and g(m) = m1 + m2 + ··· + mq − |C|.

Then,

h(m) = f(m) − λg(m) 2 2 2 = m1 + m2 + ··· + mq − λm1 − λm2 − · · · − λmq + λ|C|, and for 1 ≤ i ≤ q we have ∂h = 2mi − λ. ∂mi

To obtain a minimum, set ∂h = 0, which leads to ∂mi

2mi − λ = 0 ⇒ λ = 2mi, which results in

m1 = m2 = ··· = mq. (5.13)

This confirms our observation that the symbols must be as different as possible to attain the maximum distance. However, from (5.13) we have

|C| = m1 + m2 + ··· + mq

= qmi,

5-13 5. Distance Optimality of Permutation and Other Mappings which results in |C| m = . i q

Should |C| not be divisible by q, then the mi will not be integers, contradicting the fact that all mi should be integers.

l |C| m In this case assume that an arbitrary j of the mi = q and that q − j of the j |C| k mi = q , with d.e the ceiling function and b.c the floor function. As before, let

|C| α = , q leading to

|C| |C| = + 1 q q = α + 1.

|C| Thus the assumption is that α and α + 1 are the closest integer values to q able to |C| minimising f(m). To prove it, consider integer values further away from q , by subtracting an arbitrary integer r from α and adding r to α + 1. (We add r to one and subtract r from the other to satisfy the constraint |C| = m1 + m2 + ··· + mq.) Therefore, we have

α2 + (α + 1)2 < (α − r)2 + (α + 1 + r)2 2 2 ¨ 2 2 ¨ 2 2α + 2α + 1 < (α − ¨2αr¨ + r ) + (α + 2α + ¨2αr¨ + 2r + r + 1) 1 < 2r2 + 2r, which is true for r < −1 and r > 0. For −1 < r < 0 the right hand side of the equation would be less, but this is not possible as only integer values of r can be considered. This proves that any values other than α and α + 1 would result in f(m) not being minimised, and therefore the assumption was correct.

Then,

|C| = m1 + m2 + ··· + mq = j(α + 1) + (q − j)α

5-14 5. Distance Optimality of Permutation and Other Mappings

= jα + j + qα − jα = αq + j.

We know that |C| = αq + β, hence j = β. Thus, β of the mi = α + 1 and q − β of the mi = α, substituting this into (5.12) results in

(k) 2 2 2 |Emax| = |C| − [β(α + 1) + (q − β)α ] = |C|2 − [β(α2 + 2α + 1) + α2q − α2β] 2 2 2 2 = |C| − (α β + 2αβ + β + α q − α β) = |C|2 − (2αβ + β + α2q), proving the proposition. 

Proposition 5.4 The upper bound on the sum of the distances for any mapping is

2 2 |Emax| = l[|C| − (2αβ + β + α q)]. (5.14) 2

Again, this follows directly from Proposition 5.3. Proof 

The following are special cases of these general upper bounds.

5.4.1 q-ary (n, k) codes

The q-ary (n, k) codes where k input bits are encoded to n output bits can be seen as a k → n mapping. For this case we have |C| = qk and l = n. The upper bound in (5.14) then simplifies to 2k−1 |Emax| = n(q − 1)q , (5.15) with α = qk−1 and β = 0.

Example 5.4 Any input bits u can be encoded to output bits v using the generator matrix G as follows v = uG.

5-15 5. Distance Optimality of Permutation and Other Mappings

Suppose a binary (7, 4) Hamming code is used with

  1 0 0 0 1 1 0   0 1 0 0 1 0 1 G =   . 0 0 1 0 0 1 1   0 0 0 1 1 1 1

This is equivalent to mapping k = 4 binary sequences to n = 7 binary sequences, where we get

0000 → 0000000 0001 → 0001111 0010 → 0010011 0011 → 0011100 0100 → 0100101 0101 → 0101010 0110 → 0110110 0111 → 0111001 1000 → 1000110 1001 → 1001001 1010 → 1010101 1011 → 1011010 1100 → 1100011 1101 → 1101100 1110 → 1110000 1111 → 1111111.

Summing all the distances between the code words, |E| = 896 is obtained. Using the upper bound in (5.15), |Emax| = 896 is obtained.

For the next two codes we will not explicitly list the code words obtained. For a binary

5-16 5. Distance Optimality of Permutation and Other Mappings

(23, 12) Golay code with

  10000000000001111111111   01000000000011101110001   00100000000011011100010     00010000000010111000101   00001000000011110001011     00000100000011100010110 G =   , 00000010000011000101101     00000001000010001011011   00000000100010010110111     00000000010010101101110   00000000001011011011100   00000000000110110111000

|E| = 192937984 is obtained and using the upper bound |Emax| = 192937984 is obtained.

Similarly, for a ternary (11, 6) Golay code with

  10000001111   01000010122   00100011012   G =   , 00010012101   00001012210   00000111221

|E| = 3897234 and |Emax| = 3897234 are obtained. 2

Achieving the upper bound does not guarantee that a code will be a good error cor- rection code. Rather, it should be used as a measure to compare codes with known error correcting capabilities. For instance, a code can be created using   1 0 0 0 0 0 0   0 1 0 0 0 0 0 G =   , 0 0 1 0 0 0 0   0 0 0 1 1 1 1

5-17 5. Distance Optimality of Permutation and Other Mappings which results in

0000 → 0000000 0001 → 0001111 0010 → 0010000 0011 → 0011111 0100 → 0100000 0101 → 0101111 0110 → 0110000 0111 → 0111111 1000 → 1000000 1001 → 1001111 1010 → 1010000 1011 → 1011111 1100 → 1100000 1101 → 1101111 1110 → 1110000 1111 → 1111111.

The upper bound is attained in this case, but the minimum Hamming distance is only 1.

It has been shown that if all the qk codewords of a linear code is listed as rows in a matrix, with the n columns corresponding to the symbol positions, then each column of the matrix contains either all zeroes or exactly qk−1 entries of each symbol. Therefore, the upper bound in (5.15) is attained for all linear codes that have no columns containing all zeroes. It is also interesting to note that the upper bound in (5.15) is used as an upper bound in the derivation of the Plotkin bound [138].

5.4.2 M(n, M, δ) permutation codes

This is the upper bound that was proved in Proposition 5.2. It is easy to verify that (5.14) simplifies to (5.10) with |C| = 2n, q = M, and l = M. Example 5.5 In [136] an exhaustive search was done for M = 5 where the following

5-18 5. Distance Optimality of Permutation and Other Mappings mapping was found   12534, 21435, 13254, 24153, 21354, 12345, 23514, 23145,   15243, 51423, 25134, 53241, 41325, 21543, 31524, 35142, . (5.16) 14235, 12453, 34251, 54132, 42513, 32415, 34512, 43152,    54321, 52431, 45231, 35421, 52314, 45312, 43521, 53412 

Summing all the distances between the sequences, |E| = 4090 is obtained. Using the upper bound in (5.10), |Emax| = 4090 is also obtained. 2

It needs to be noted that a mapping attaining the upper bound does not guarantee that the mapping is distance-preserving. For instance, if in a distance-preserving mapping the permutation sequences themselves are permuted in relation to the binary sequences, the same sum of distances will be retained, but the relation to the binary sequences is lost. This could result in a mapping that attains the upper bound but that is not distance preserving.

These upper bounds will be used in Chapter 7 to evaluate the optimality of some previously published mappings as well as comparing those to the new mappings found in Chapter 6.

5.5 Average distance increase in a mapping

Similar to (5.8), the sum of the distance in the D matrix can be calculated as

|Cb| |Cb| X X |D| = dij. i=1 j=1 Another approach is to see it as a mapping to itself, or an n → n mapping, and use the upper bound in (5.15) to calculate the sum of the Hamming distances in the matrix. With k = n, this results in |D| = n22n−1.

Using |Emax| and |D| it is now possible to determine what the average increase (or decrease) in distance is for the mappings. The increase in distance is given by E−D, with

5-19 5. Distance Optimality of Permutation and Other Mappings the total increase then given by |E − D|. To obtain the average, it is needed to divide by the number of entries in the matrix. The total increase is given by

|E − D| = M[22n − (2αβ + β + α2M)] − n22n−1, and the total number of entries under consideration is 22n −2n, since the size of the matrix is 2n × 2n and the entries on the diagonal do not contribute toward the distance. The average distance increase for any mapping is thus given by

M[22n − (2αβ + β + α2M)] − n22n−1 ∆ = . (5.17) avg 22n − 2n

Table 5.1 provides a summary of different mappings and their average increase (or decrease) in distance, as well as listing the maximum distances attainable in the E matrix.

Because of the extra distance that permutation sequences can contribute, an increase is seen in all cases. This would suggest that a mapping with a higher average distance increase would perform better, however, where certain sequences’ distance increase, other critical sequences’ distance might show no increase. This is especially true in the case of permutation trellis codes, where the free distance is generally built by the maximum distance sequences. In a permutation mapping, it is these maximum distance sequences which cannot build extra distance.

In Table 5.1 the average extra distance increase is also presented, which is the distance gained in addition to the guaranteed δ increase (or decrease). More specifically,

∆avg extra = ∆avg − δ. (5.18)

One can see that as n increases, the average extra distance also increases. (An increase of approximately 0.5 is observed for each increase of n.) When n is constant, the average extra distance also increases when M is increased, though this increase is not as significant.

This behaviour can be explained by looking at the average extra distance increase when n tends to infinity. In (5.17) the denominator can be simplified when n → ∞, with

22n − 2n ≈ 22n.

5-20 5. Distance Optimality of Permutation and Other Mappings

Table 5.1: Average increase (or decrease) in distance for any permutation map- ping attaining the upper bound

n M |D| |Emax| δ ∆avg ∆avg extra 4 4 512 768 0 1.067 1.067 4 5 512 1020 1 2.117 1.117 4 6 512 1272 2 3.167 1.167 4 7 512 1526 3 4.225 1.225 4 8 512 1792 4 5.333 1.333 5 5 2560 4090 0 1.542 1.542 5 6 2560 5112 1 2.573 1.573 5 7 2560 6132 2 3.601 1.601 5 8 2560 7168 3 4.645 1.645 6 5 12288 16380 –1 1.015 2.015 6 6 12288 20472 0 2.030 2.030 6 7 12288 24570 1 3.046 2.046 6 8 12288 28672 2 4.063 2.063 7 6 57344 81912 –1 1.511 2.511 7 7 57344 98294 0 2.519 2.519 7 8 57344 114688 1 3.528 2.528 8 6 262144 327672 –2 1.004 3.004 8 7 262144 393204 –1 2.008 3.008 8 8 262144 458752 0 3.012 3.012

Similarly for αM = 2n − β, when n → ∞, we have

αM ≈ 2n ⇒ β ≈ 0.

From (5.17) and (5.18) we have

M[22n − (2αβ + β + α2M)] − n22n−1 ∆ = − (M − n) avg extra 22n − 2n M(22n − α2M) − n22n−1 − 22n(M − n) ≈ 22n   M22n − 22n − n22n−1 − M22n + n22n = 22n 2n 2n −1 2n n2 − n2 2 − 2 = 2n 2 n = n − − 1 2 n − 2 = . 2

5-21 5. Distance Optimality of Permutation and Other Mappings

Therefore, ∆avg extra increases by approximately 0.5 each time n increases by one, just as we observed in Table 5.1.

5.6 Summary

In this chapter the distance-preserving mappings and distance matrices were formally defined, leading to an upper bound on the sum of distances attainable in permutation mappings. This upper bound was then generalised to apply to any arbitrary mappings, with the upper bound on (n, k) error correction codes and permutation mappings shown to be special cases of this bound.

5-22 Multilevel Construction of 6 Permutation DPMs

6.1 Introduction

In this chapter we will briefly look at previous constructions, as some of these will form the basis for the new construction to be presented. The binary representation of permutations is then investigated, which leads to the new multilevel construction. This construction was also presented in [137] and [139]. We prove that the construction generates all the

permutations from the symmetric group, SM . If we choose a suitable subset from these, we obtain the desired permutation mapping. Finally, we also prove that for certain values of M the new mappings are distance optimal.

6.2 Previous constructions

As was mentioned in Chapter 2, Wadayama and Vinck [36] made use of a multilevel construction for permutation codes. A more detailed description of their scheme will be given in this introduction, making use of the example that they provided in their paper. This will form the basis for our new construction.

Assume that n = 2m, with m any positive integer. Wadayama and Vinck observed that when a permutation code is represented in a binary multilevel representation, a certain balanced binary structure exists. As an example, consider n = 8, M = 8 and the permutation sequence 13205764 (note that {0,..., 7} are used as symbols instead of {1,..., 8}). If each symbol’s binary representation is used and it is written in a column,

6-1 6. Multilevel Construction of Permutation DPMs then 11001100   13205764 = 01100110 , 00001111 where the bottom row contains the most significant bits. It is obvious that the binary sequences in the rows are balanced, with four ones and four zeros each. Using this knowledge, they could then construct a permutation code by making use of three balanced binary codebooks. Note that in [36] the first row was used as the most significant bit in the multilevel representation, however as stated earlier, we will use the last row as the most significant bit.

Example 6.1 Using the example from [36], consider m = 3 with n = 8 and use the following codebooks

C0 = {00001111, 11110000},

C1 = {0110, 1001},

C2 = {01, 10}. All sequences are balanced, even though their lengths differ. These were chosen in such a way that the resulting sequence after the next step is still a valid permutation sequence.

A permutation sequence is then constructed by using a component from C0, using a component from C1 and repeating it twice, and using a component from C2 and changing it to a repetition code and repeating it twice. Therefore, if components 00001111, 1001 and 10 are used, the result is

C0 : 00001111 C : 1001 → 10011001 1 . C2 : 10 → 1100 → 11001100 31027546

Choosing any other combination of components from C0, C1 and C2 will then result in another permutation code word. 2

This was called the basic construction. Clearly some permutation code words will not be used because of the repetitions in the structure. By using q-ary codebooks with different balanced codebooks, they were able to increase the cardinality of the resulting permutation codes, calling it the extended construction. Since the basic construction is sufficient to describe the concept, we will not elaborate on the extended construction.

6-2 6. Multilevel Construction of Permutation DPMs

We also present the Chang et al [27] algorithm for their Construction 3, as an exam- ple of what have been done regarding mapping algorithms. They presented a mapping construction, h2m, mapping 2m-length binary sequences, x1x2 ··· x2m, to permutation sequences, π1π2 ··· π2m, where m is some positive integer. In this case we have M = 2m.

Mapping algorithm for h2m

Input: (x1, x2, . . . , x2m)

Output: (π1, π2, . . . , π2m) = h2m(x1, x2, . . . , x2m) begin

(π1, π2, . . . , π2m) ← (1, 2,..., 2m) for i from 1 to m do

if xi = 1 then swap(π2i−1, π2i) for i from m + i to 2m do

if xi = 1 then swap(πi−m, πi) end.

The binary ones in the input sequence determine which transpositions occur to generate the permutation sequence.

Even though the new construction is not for M in general, we will see that each of our new multilevel constructions can be presented using a similar structured algorithm.

6.3 Binary representation of any permutation

The previous construction in [36] was limited to the case where n = 2m with m any positive integer. Also, the aim of the construction was to obtain a codebook with certain parameters and only constant weight code words were used. Now the constraint on n will be lifted with the aim of constructing DPMs where all the possible binary inputs are considered. To understand the new construction method, we first have to look at how per- mutations can be represented in a binary multilevel format and what effect transpositions have on this representation.

Any permutation sequence with the symbols {1,...,M}, or alternatively {0,...,M − 1}, can be converted to the binary multilevel representation, with each symbols’ equiv- alent binary sequence used as columns, while the rows form the levels of the multilevel representation, as was shown in [36]. For instance, the identity sequences for M = 4,

6-3 6. Multilevel Construction of Permutation DPMs

M = 5 and M = 6 respectively are

    " # 01010 010101 0101 0123 = , 01234 = 00110 and 012345 = 001100 . (6.1) 0011     00001 000011

Before continuing, the number of levels that will be used in the multilevel construction needs to be defined.

Proposition 6.1 The number of levels, L, necessary to represent a permutation sequence with symbols 0, 1,...,M − 1, is given by

L = dlog2 Me,

where d.e represents the ceiling function. 2

Proof The number of levels is determined by the symbol with the largest value. Since M − 1 is the largest value, we need dlog Me bits to represent the number of levels. 2 

We define the multilevel identity matrix, B, as the matrix obtained when each integer in the permutation identity sequence, 012 ...M − 1, is converted to binary and the resulting sequence is placed in the corresponding column in B, with the least significant bit in the first row, with   b11 b21 ··· bM1   b12 b22 ··· bM2  B =  . . .  .  ......   . . .  b1L b2L ··· bML The three matrices in (6.1) are the B matrices for M = 4, M = 5 and M = 6 respectively.

The multilevel representation allows for several possible multilevel sequences on each level. We call this set of possible sequences the multilevel permutations and use Pk to denote this set for level k.

Permuting the permutation symbols then equivalently permutes the columns of the multilevel representation. If only the bits in a single row are to be permuted, then certain constraints exist, as permuting them in just any way could result in a non-permutation. If the second and third bits are transposed in the first row of the B matrix for M = 5,

6-4 6. Multilevel Construction of Permutation DPMs then 00110   00110 = 00334, 00001 which clearly is not a valid permutation. The problem in this case is that the bits below the second and third bits, i.e. 00 and 10, are different. To again obtain a valid permuta- tion, the transpositions must result in a multilevel representation with the same columns, only permuted. Thus, to obtain the multilevel permutations for level k by swapping (or transposing) the columns in B, we must adhere to the following rule: column i can only be swapped with column j if bik 6= bjk and bim = bjm for (k + 1) ≤ m ≤ L.

For brevity, swap(i, j) will be used to denote swapping of columns i and j.

Example 6.2 Again using the B matrix for M = 5, it can be seen that in the top row, bits in position 1 and 2 can be transposed as well as bits in position 3 and 4, as the bits below them in the respective columns are the same,

0 1 0 1 0 0 0 1 1 0. 0 0 0 0 1

Possibilities for the first row then include {01010, 01100, 10010, 10100} making use of no swaps, swap(3,4), swap(1,2) and swap(1,2)(3,4) respectively. Each swap again results in a valid permutation. Similarly, if we look at permuting the bits in the second row, then the bits below in the third row should all be equal. Note that when bits in the second row are swapped, the corresponding bits in the first row also have to be swapped to keep it a valid permutation. Thus, 0 1 0 1 0 0 0 1 1 0, 0 0 0 0 1 where the first four columns can be swapped in any way while still producing a valid permutation. The possibilities are {00110, 01010, 10010, 01100, 10100, 11000}, using no swaps, swap(2,3), swap(1,3), swap(2,4), swap(1,4) and swap(1,3)(2,4) respectively.

Since there is no level below the third row, we can permute the bit in this row in any way. The possibilities for the third row then include {00001, 00010, 00100, 01000, 10000}, using no swaps, swap(4,5), swap(3,5), swap(2,5) and swap(1,5) respectively.

6-5 6. Multilevel Construction of Permutation DPMs

The multilevel permutations for M = 5 then are

P1 = {01010, 01100, 10010, 10100},

P2 = {00110, 01010, 10010, 01100, 10100, 11000}, 2

P3 = {00001, 00010, 00100, 01000, 10000}.

In Section 6.5 these observations and the multilevel permutations will be used to construct new DPMs.

6.4 Generating SM from the multilevel construction

It is possible to generate the symmetric group, SM , by using the multilevel construction. If all the allowable swaps are used, the resulting permutation sequences are those from the symmetric group.

Example 6.3 Let M = 3 and write the identity permutation sequence, 012, as a multi- level identity matrix, such that " # 010 012 = . 001

In this case columns 1 and 2 can be transposed as we have a zero and a one in them in the first row, with both having a zero below them.

The set of possibilities after transpositions for the first level is {010, 100} using swap(1,2), and this results in " # " # 010 100 = 012 and = 102, 001 001 where the binary to decimal conversion is used on each column to obtain the permutation symbols again.

Since there is no level below the second level, any transposition can take place. There- fore swap(1,3) and swap(2,3) can be used. The set of possibilities after transpositions for

6-6 6. Multilevel Construction of Permutation DPMs the second level is {001, 010, 100}. Thus, we have

" # " # 010 100 = 012 = 102 001 001 .&.& " # " # " # " # 001 010 100 001 = 021 = 210 = 120 = 201 010 100 010 100 where all the permutation sequences from S3 have now been generated.

The multilevel permutations are

P1 = {010, 100},

P2 = {001, 010, 100}.

The number of possibilities for the first level is |P1| = 2 and for the second level it is

|P2| = 3, thereby giving the total number of possibilities as 6, which is in agreement with

|S3| = 6. 2

Example 6.4 Returning to Example 6.2, we see that |P1| = 4, |P2| = 6, and |P3| = 5. This gives the total number of possibilities as 4 × 6 × 5 = 120, again in agreement with

|S5| = 120. 2

To be able to choose a subset from the multilevel construction for a DPM, it must first be proved that the multilevel construction generates all the possible permutation sequences from SM . This has been shown for M = 3 and M = 5 and will now be proved for the general case.

Proposition 6.2 If the multilevel permutations, Pk, 1 ≤ k ≤ L are used for the multilevel construction, then for M it generates all the permutation sequences from the symmetric group, SM , with |SM | = M!. 2

Proof Let φM denote the total number of transpositions possible for M, i.e. φM =

|P1||P2| · · · |PL|. As L is a function of M, let the number of levels be denoted by L(M). L(M)−1 L(M)−1 Let M = M1 + M2, with M1 = 2 and M2 = M − 2 . We choose M1 and M2 this way since the last level will always contain M1 zeroes and M2 ones. As an example,

6-7 6. Multilevel Construction of Permutation DPMs for M = 7 we have 0 1 0 1 0 1 0 0 0 1 1 0 0 1 . 0 0 0 0 1 1 1 | {z } | {z } M1=4 M2=3

For M = 1 we have φ1 = 1! = 1 since the only possibility is {0} and M = 2 we have

φ2 = 2! = 2 since the possibilities are {01, 10}. For M = 3 a combination of φ1 and φ2 is obtained, combined with the possibilities for the last level,

φ3

z }| { φ2 φ1 C(3,1) 010 ⇒ z}|{01 × z}|{0 × z}|{001 . 001

Therefore φ3 = φ2 × φ1 × C(3, 1). Next, φ4 is dependent on φ2 and the possibilities for the last level, φ4

z }| { φ2 φ2 C(4,2) 0101 ⇒ z}|{01 × z}|{01 × z0011}|{ . 0011

Therefore φ4 = φ2 × φ2 × C(4, 2). For M = 5 we have

φ5 z }| { φ4 φ1 01010 z }| { z}|{ C(5,1) 0101 0 z }| { 00110 ⇒ × × 00001 . 0011 0 00001

Following this same reasoning, the following φ values are obtained

φ5 = φ4 × φ1 × C(5, 1)

φ6 = φ4 × φ2 × C(6, 2)

φ7 = φ4 × φ3 × C(7, 3)

φ8 = φ4 × φ4 × C(8, 4)

φ9 = φ8 × φ1 × C(9, 1)

φ10 = φ8 × φ2 × C(10, 2)

φ11 = φ8 × φ3 × C(11, 3)

φ12 = φ8 × φ4 × C(12, 4)

6-8 6. Multilevel Construction of Permutation DPMs

φ13 = φ8 × φ5 × C(13, 5) . .

φM = φM1 × φM2 × C(M,M2).

We know that φk = k! for k ≤ 3 and using induction it will be proved for the general case that

φM = M!.

Let S be the set of all positive integers for which

L(M)−1 φM = φ2L(M)−1 × φM−2L(M)−1 × C(M,M − 2 ) = M!.

Since φ1 = 1! and φ2 = 2!, it follows that {1, 2} ∈ S. For M = 3, with L = 2, we have

2−1 φ3 = φ22−1 × φ3−22−1 × C(3, 3 − 2 )

= φ2 × φ1 × C(3, 1)  3! = 2!×1! ×  1!(3 − 1)! = 3!.

Thus, it also follows that 3 ∈ S. Assume all positive integers at most equal to k are in S, then it holds that

L(k)−1 φk = φ2L(k)−1 × φk−2L(k)−1 × C(k, k − 2 ) = k!, and since k > 2L(k)−1 and k > k + 1 − 2L(k)−1, it will also hold that

L(k)−1 L(k)−1 φ2L(k)−1 = 2 ! and φk+1−2L(k)−1 = (k + 1 − 2 )!.

Now for k + 1 we have

L(k+1)−1 φk+1 = φ2L(k+1)−1 × φk+1−2L(k+1)−1 × C(k + 1, k + 1 − 2 )

6-9 6. Multilevel Construction of Permutation DPMs

= 2L(k+1)−1! × (k + 1 − 2L(k+1)−1)!× (k + 1)! (k + 1 − 2L(k+1)−1)!(k + 1¡ − k − 1¡ + 2L(k+1)−1)!  (((( (k + 1)! L(k+1)−1 ((L((k+1)−1 = 2 ! × (k(+( 1(− 2 )! × ((((  (((L((k+1)−1 L(k+1)−1 (k(+( 1 − 2 )!2 ! = (k + 1)!.

Therefore, k + 1 ∈ S. It was shown that {1, 2, 3} ∈ S and k ∈ S implies k + 1 ∈ S. By the axiom of induction, all the positive integers are in S. Therefore it holds that φM = M!, and since all the columns we started with were unique and all the transpositions were unique, M! unique permutation sequences are constructed. 

Any multilevel starting matrix can be used, as long as the columns are all distinct and the swaps are done as described previously. As an example, for M = 5 instead of using the multilevel identity matrix 01010   01234 = 00110 , 00001 the following multilevel starting matrix can also be used

10000   01000   01234 = 00100 ,     00010 00001 which will be recognized as the usual binary matrix representation of a permutation. For the first row no swaps are allowed as no columns underneath are equal, therefore only {10000} is possible. For the second row, two swaps are possible, {10000, 01000}. For the third row three swaps are possible, {10000, 01000, 00100}. For the fourth row {10000, 01000, 00100, 00010} are possible and finally for the fifth row {10000, 01000, 00100, 00010, 00001} are possible. In summary, for this case the multilevel permutations are

P1 = {10000},

P2 = {10000, 01000},

P3 = {10000, 01000, 00100},

6-10 6. Multilevel Construction of Permutation DPMs

P4 = {10000, 01000, 00100, 00010},

P5 = {10000, 01000, 00100, 00010, 00001}.

The number of possibilities then are |P1| = 1, |P2| = 2, |P3| = 3, |P4| = 4, and |P5| = 5, with the total number of possibilities equal to 1 × 2 × 3 × 4 × 5 = 5! = 120, confirming the previous result for the multilevel construction as well as the known result for permutations in general. In Section 6.6 we will show how a mapping with a higher sum of Hamming distances can be obtained be using a different multilevel starting matrix.

Proposition 6.3 Two different multilevel starting matrices for M are equivalent in that both produce multilevel permutations that generate all the permutation sequences from the symmetric group, SM , with |SM | = M!, provided all the columns in the starting matrices are unique. 2

Proof Following the same reasoning as the proof for Proposition 6.2, it can be shown that any multilevel starting matrix with M unique columns will produce multilevel per- mutations which generate all the permutation sequences from S . M 

In the next section it will be shown that by using a subset of the multilevel permu- tations and taking into account some distance criteria, it will be possible to construct distance-preserving mappings using the multilevel construction.

6.5 DPMs from the multilevel construction

In the construction from Section 6.2 and Example 6.1, if input bits were assigned to the components in C0, C1 and C2, then a mapping from the input bits to the balanced sequences to the permutation sequences would exist. Using the parameters from Exam- ple 6.1, m = 3 input bits are mapped to n = 8 balanced sequences, which are mapped to M = 8 permutation sequences. Therefore, a complete mapping from m = 3 to M = 8 would be

00110011   000 → 01100110 → 02314675, 00001111

6-11 6. Multilevel Construction of Permutation DPMs

11001100   001 → 01100110 → 13205764, 00001111 00110011   010 → 10011001 → 20136457, 00001111 11001100   011 → 10011001 → 31027546, 00001111 00110011   100 → 01100110 → 46750231, 11110000 11001100   101 → 01100110 → 57641320, 11110000 00110011   110 → 10011001 → 64572013, 11110000 11001100   111 → 10011001 → 75463102. 11110000

Using the terminology for DPMs, this would be an n = 3 to M = 8 mapping with δ = 5. (In fact it forms an equidistant permutation array with distance 8.)

Now, using the mapping idea from above and the observations from Section 6.3, a new DPM construction method can be derived. To construct a DPM we choose a subset of the multilevel permutations for each level and assign input bits to each. We call these subsets the multilevel components and use Ck to denote the subset for level k. Thus, Ck ⊆ Pk

nk with |Ck| = 2 for 1 ≤ k ≤ L.

In Figure 6.1 the concept of a normal mapping is compared with that of the new mapping using the multilevel construction. Figure 6.1(a) shows how normally the binary bits are mapped directly to the permutation symbols. However, using the multilevel construction an intermediate step is introduced. In Figure 6.1(b) it is shown how the

6-12 6. Multilevel Construction of Permutation DPMs

Multilevel Input bits Components

n1 C1

Input Bits Permutation Input Bits n2 C2 Permutation n M n . . M . .

nL CL

(a) (b)

Figure 6.1: Comparison of (a) mapping using standard lexicography and (b) mapping using the multilevel construction n-length input sequence is divided into shorter input subsequences for each level, with n = n1 + n2 + ··· + nL.

The following example is used to show how the multilevel components are chosen.

Example 6.5 Let n = 6 and M = 6 and start with the identity sequence,

010101   012345 = 001100 . 000011

Recall from the previous section that symbols in the first row can only be swapped if the columns below are the same. Therefore, the multilevel permutations for level one are

P1 = {010101, 100101, 011001, 101001, 010110, 100110, 011010, 101010},

with |P1| = 8. In this case, a three bit input subsequence can be assigned to all the possibilities. We choose n1 = 3 such that

000 → 010101, 001 → 100101, 010 → 011001, 011 → 101001, 100 → 010110, 101 → 100110, 110 → 011010,

6-13 6. Multilevel Construction of Permutation DPMs

111 → 101010.

0 If we use Dk and Dk to denote the distances between input subsequences and the dis- tances between multilevel components for level k respectively, then the following distance matrices are obtained

D1 000 001 010 011 100 101 110 111 000 0 1 1 2 1 2 2 3 001 1 0 2 1 2 1 3 2 010 1 2 0 1 2 3 1 2 011 2 1 1 0 3 2 2 1 100 1 2 2 3 0 1 1 2 101 2 1 3 2 1 0 2 1 110 2 3 1 2 1 2 0 1 111 3 2 2 1 2 1 1 0 and

0 D1 010101 100101 011001 101001 010110 100110 011010 101010 010101 0 2 2 4 2 4 4 6 100101 2 0 4 2 4 2 6 4 011001 2 4 0 2 4 6 2 4 101001 4 2 2 0 6 4 4 2 010110 2 4 4 6 0 2 2 4 100110 4 2 6 4 2 0 4 2 011010 4 6 2 4 2 4 0 2 101010 6 4 4 2 4 2 2 0.

It can be seen that the distances between the first row’s multilevel components are exactly twice that of the input subsequences. Later it will be proved that the distances have to be double or more to be able to produce a DCM.

The multilevel permutations for level two are

P2 = {001100, 010100, 100100, 011000, 101000, 110000},

with |P2| = 6. A two bit input subsequence can be assigned, with n2 = 2, to any four of

6-14 6. Multilevel Construction of Permutation DPMs the possibilities, provided that the distance is double or more. Choosing {001100, 100100, 011000, 110000}, we obtain

D2 00 01 10 11 00 0 1 1 2 01 1 0 2 1 10 1 2 0 1 11 2 1 1 0 and

0 D2 001100 100100 011000 110000 001100 0 2 2 4 100100 2 0 4 2 011000 2 4 0 2 110000 4 2 2 0.

Finally, the third row has no row below it, so it can be permuted in any way. The multilevel permutations for level three are

000011, 000101, 001001, 010001, 100001,   P3 = 000110, 001010, 010010, 100010, 001100, ,  010100, 100100, 011000, 101000, 110000  with |P3| = 15. With n = 6, n1 = 3 and n2 = 2, it follows that n3 = 1. Any two possibilities can be chosen, provided that the distance is double or more that of the input bit. As will be seen later on, if the distance can be increased here, the distance in the resulting DPM will also increase. Therefore, {000011, 110000} are used, resulting in

D3 0 1 0 0 1 1 1 0 and

0 D3 000011 110000 000011 0 4 110000 4 0.

0 It can be seen that for all levels dij ≥ 2dij is satisfied for all i 6= j.

6-15 6. Multilevel Construction of Permutation DPMs

Summarizing, we then have the following mappings from binary input subsequences to binary multilevel components ( ) ( ) 000, 001, 010, 011, 010101, 100101, 011001, 101001, → , 100, 101, 110, 111 010110, 100110, 011010, 101010 {00, 01, 10, 11} → {001100, 100100, 011000, 110000}, {0, 1} → {000011, 110000}.

The multilevel components for this mapping then are ( ) 010101, 100101, 011001, 101001, C1 = , 010110, 100110, 011010, 101010

C2 = {001100, 100100, 011000, 110000},

C3 = {000011, 110000}. 2

We saw that C3 was constructed by choosing two components from a possible fifteen.

This can be changed so four are chosen from fifteen with two input bits being used. C2 still uses two input bits while C1 is changed so two input bits are also used. In this way numerous different DCMs can be constructed. We will return to this in Chapter 7.

The number of input bits that can be mapped to a multilevel component is limited by the weight of rows in the multilevel identity matrix.

Proposition 6.4 The number of input bits that the k-th level can have is

nk ≤ w(bk), 1 ≤ k ≤ L,

where nk is the number of input bits for the k-th level, w(.) denotes the weight and bk is the k-th row of the multilevel identity matrix, B. 2

Proof If the length of the input subsequence is nk, then the maximum distance that can exist between input subsequences is nk (i.e. when the two subsequences are complements). Also, it will be shown that the distance of the multilevel components has to be double or more that of the input bits, therefore the component’s distance has to be greater than or equal to 2nk. The weight of bk, the k-th row, is w(bk) and the maximum distance that this sequence can generate is 2w(bk). Therefore, it has to hold that twice the input

6-16 6. Multilevel Construction of Permutation DPMs distance must be less than or equal to the component distance, hence

2nk ≤ 2w(bk) ⇒ nk ≤ w(bk).

Thus the number of input bits that can be assigned to a level is limited by the number of ones on a level. 

To illustrate this, consider b3 = [00001] for M = 5. With w(b3) = 1, we know that only one input bit can be used. The maximum distance that this sequence can achieve is 2, between 00001 and 00010 as example. Thus, a two bit input can not be used, as the maximum distance achievable is 2, say between 00 and 11, and this is too large for the distance achievable by b3. Even though we can assign four different transpositions to produce {00001, 00010, 00100, 01000}, the overall distance produced is not sufficient.

Remark 6.1 The transpositions throughout a construction should be done consistently, e.g. if we have {0011, 1001, 0110, 1100}, then

 swap(1, 3) → 1001  0011 swap(2, 4) → 0110   swap(1, 3), (2, 4) → 1100, or if we have {0011, 1010, 0101, 1100}, then

 swap(1, 4) → 1010  0011 swap(2, 3) → 0101   swap(1, 4), (2, 3) → 1100.

As will be shown in Example 6.7, each single input bit that is 1 (e.g. 1000, 0100, 0010, 0001), is assigned a transposition or a set of transpositions. If more than one bit is 1 (e.g. 1100 = 1000 + 0100), then a combination of the transpositions assigned to the respective single bits is used. Therefore, if in our mapping we are using swap(1,3) and swap(2,4), then we can not use swap(1,4)(2,3), although it produces the same multilevel component.

6-17 6. Multilevel Construction of Permutation DPMs

In general, the following transpositions will be used for each level

Level 1: (1, 2), (3, 4), (5, 6), (7, 8), (9, 10), (11, 12), (13, 14), (15, 16), ··· Level 2: (1, 3), (2, 4), (5, 7), (6, 8), (9, 11), (10, 12), (13, 15), (14, 16), ··· Level 3: (1, 5), (2, 6), (3, 7), (4, 8), (9, 13), (10, 14), (11, 15), (12, 16), ··· . Level 4: (1, 9), (2, 10), (3, 11), (4, 12), (5, 13), (6, 14), (7, 15), (8, 16), ··· . . . .

It is not necessary to use these transpositions, but this choice does have a nice struc- ture that simplifies finding mappings from the binary input sequences to the multilevel components. 2

Remark 6.2 As the size of M increases, extra consideration should be given for assigning input bits. As an example, for M = 11 the multilevel identity matrix is   01010101010   00110011001 B =   . 00001111000   00000000111

First, consider only the first eight columns where there are twelve ones which we can assign transpositions (or equivalently input bits), as shown in Remark 6.1. A possible assignment of input bits are n1 = 4, n2 = 4, n3 = 2 and n4 = 1. If the first three levels’ transpositions are all limited to the first eight columns, it would mean that a maximum distance of 10 between input bits will only result in a maximum distance of 8 between permutation sequences. Therefore, the input bits can be assigned in such a way that the first three levels will only have eight input bits, or it has to be ensured that the first three levels’ transpositions are not limited to the first eight columns. If the mapping is written in the form we will present in Example 6.7, this becomes easy to check. 2

Having the multilevel components, we can now map binary sequences to permutation sequences. The binary input sequence is broken into L input subsequences of lengths n1, n2, . . . , nL. Each input subsequence is then mapped to a multilevel component, and the corresponding L multilevel components are used to determine the required permutation sequence. Start with the multilevel identity matrix and swap the columns (using the swaps set out in Remark 6.1) until the first level is the same as the chosen multilevel component. Then proceed to the next level and repeat, until all the levels have been

6-18 6. Multilevel Construction of Permutation DPMs done, then convert each column to a decimal number to obtain the permutation sequence. The next example illustrates this procedure.

Example 6.6 We use the multilevel components found in Example 6.5 to construct the final mapping. Suppose 100101 is used as input and break it up into subsequences 100,

10 and 1. The corresponding components from C1, C2 and C3 are 010110, 011000 and 110000. Using the multilevel identity matrix as starting point, we have

010101   001100 . 000011

The first row should be 010110, so swap(5,6) is used, giving

010101 010110     001100 → 001100 . 000011 000011

The second row should be 011000, so swap(2,4) is used, giving

010110 010110     001100 → 011000 . 000011 000011

The third row should be 110000, so swap(1,5)(2,6) is used, giving

010110 100101     011000 → 001001 . 000011 110000

The binary columns are converted to decimal, remembering that the bottom row is the most significant bit, resulting in a permutation sequence of 542103. Thus, this DCM maps 100100 to 542103. The same procedure can be followed to obtain all the permutation sequences for the other possible binary inputs. 2

A more elegant method to obtain the permutations from the multilevel components is shown in the following example.

6-19 6. Multilevel Construction of Permutation DPMs

Example 6.7 Consider the same multilevel components for M = 6 as in Example 6.5, with the binary sequence (x1, x2, x3, x4, x5, x6) being mapped to the permutation sequence

(y1, y2, y3, y4, y5, y6).

The permutation (y1, y2, y3, y4, y5, y6) is transposed according to C1 by input bits

(x1, x2, x3),

x1x2x3 C1 swap 000 → 010101 → − 001 → 100101 → (1, 2) 010 → 011001 → (3, 4) 011 → 101001 → (1, 2)(3, 4) 100 → 010110 → (5, 6) 101 → 100110 → (1, 2)(5, 6) 110 → 011010 → (3, 4)(5, 6) 111 → 101010 → (1, 2)(3, 4)(5, 6), according to C2 by input bits (x4, x5),

x4x5 C2 swap 00 → 001100 → − 01 → 100100 → (1, 3) 10 → 011000 → (2, 4) 11 → 110000 → (1, 3)(2, 4), and according to C3 by input bit (x6),

x6 C3 swap 0 → 000011 → − 1 → 110000 → (1, 5)(2, 6).

The M(6, 6, 0) mapping can then be written more concisely as

Input: (x1, x2, x3, x4, x5, x6)

Output: (y1, y2, y3, y4, y5, y6) begin

(y1, y2, y3, y4, y5, y6) ← (0, 1, 2, 3, 4, 5)

if x3 = 1 then swap(y1, y2)

6-20 6. Multilevel Construction of Permutation DPMs

if x2 = 1 then swap(y3, y4)

if x1 = 1 then swap(y5, y6)

if x5 = 1 then swap(y1, y3)

if x4 = 1 then swap(y2, y4)

if x6 = 1 then swap(y1, y5)(y2, y6) end.

Using the same input sequence as in Example 6.6, 100101, and using the steps above we have 012345

x3 = 0 → − → 012345

x2 = 0 → − → 012345

x1 = 1 → swap(y5, y6) → 012354

x5 = 1 → swap(y2, y4) → 032154

x4 = 0 → − → 032154

x6 = 1 → swap(y1, y5)(y2, y6) → 542103, where the same result is obtained. 2

In this same way, the components of any multilevel construction can be written in terms of input bits and swaps.

Let x be the binary input sequence of length n and break it up into subsequences of input bits for each level, with the i-th input subsequence of length nk on level k being denoted by xi,k. Assign ci,k to denote the i-th multilevel component for level k, such that

Ck = {c1,k, c2,k, . . . , c2nk ,k}. Thus, a mapping of xi,k → ci,k on level k is obtained.

Proposition 6.5 For 1 ≤ k ≤ L, choose a subset of the multilevel permutations, Pk, to form the multilevel components, Ck, such that Ck ⊆ Pk, and assign input bits of length nk

nk to each possibility in Ck, such that |Ck| = 2 with n1 + n2 + ··· + nL = n. A DPM from binary sequences to permutation sequences is obtained if

1) dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k), for DRMs and DCMs, or

2) dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k) + δ − 1, for DIMs,

for all i 6= j. 2

6-21 6. Multilevel Construction of Permutation DPMs

Proof We will first prove 1) for the case of mapping any binary sequence to the multilevel components on a certain level and then prove that if 1) holds for DCMs and DRMs and 2) holds for DIMs on all levels, the result will be a DPM for mapping binary sequences to permutation sequences.

All the transpositions on a level are independent, as set out in Remark 6.1. Each bit that has value one, is assigned a transposition or a set of transpositions from a certain level. Any other combination of ones can then be obtained by making use of a linear combination of all the single one bits. Since all the transpositions on a level are independent, all the transpositions in the linear combination are going to contribute 2 to the distance for that level. Thus, only considering distances for a certain level, say k, it will hold that dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k).

For different levels, any additional transpositions will contribute a minimum of 1 distance unit, such as swap(1,2)(1,3) (only three columns are involved, thus distance of only 3 can result), up to the maximum distance, which is M. If Remark 6.2 is taken into account, then we ensure that there is not more input bits than distance being built anywhere in the mapping (except in the case of a reducing mapping where the loss of distance is allowed). Also, as transpositions are done for each level, there is no way for a symbol to return to its original position. Thus, it must always build distance whenever it is transposed.

Since the first transposition contributes 2 to the distance and any subsequent trans- position contributes a minimum distance of 1, up to the maximum of M, in general the following will hold.

a) If the distance between the input sequences is di < M, then the distance between

the resulting permutation sequences will be dp ≥ di + 1.

b) If the distance between the input sequences is di ≥ M, then the distance between

the resulting permutation sequences will be dp = M.

Since n < M for DIMs, a) will always hold, providing a minimum increase of 1, therefore to obtain a DIM with an increase of δ, an additional increase of δ − 1 is needed, and we obtain the expression in 2). For DCMs and DRMs both a) and b) will hold and we get the expression in 1).

Since linear combinations are being used, we only have to compare sequences to the

6-22 6. Multilevel Construction of Permutation DPMs all zeros input sequence (or alternatively, the identity permutation sequence with no transpositions). The argument can then be generalised to any other sequence combination. Thus, if 1) or 2) holds for all sequences, depending on the mapping type, then a DPM is obtained. 

The general construction for an M(n, M, δ) mapping and the mapping process from binary to permutation sequences can be summarised as follows:

1) Determine the number of levels, L = dlog2 Me.

2) Determine the multilevel permutations, Pk, 1 ≤ k ≤ L.

3) Break the input sequence of length n into L subsequences of length nk, 1 ≤ k ≤ L for each level.

4) Choose the multilevel components, Ck, to satisfy Proposition 6.5.

5) Start on level k = 1 and swap the columns of the multilevel identity matrix, trans- 0 0 forming B → B , until bik = ci,k, 1 ≤ i ≤ M.

6) Proceed to the next level, k ← k + 1, and repeat the previous step for that level. Continue until the last level is reached, k = L.

0 7) Determine the permutation, p1, p2, . . . , pM , according to the columns of B as

L X j−1 0 pi = 2 bij. j=1

The number of ones in B determines the number of input bits that can be assigned, and therefore also determines the lower bound on the value that can be used for δ.

Proposition 6.6 The lower bound on δ, when used in the multilevel construction, is given by δ ≥ M − w(B), (6.2) where w(B) is the weight of B. 2

Proof Only mappings with δ = M − n are considered, and since M is a constant, we can determine a lower bound on δ by determining an upper bound on n. As stated earlier, n is bounded by the number of ones that is present in B for M.

6-23 6. Multilevel Construction of Permutation DPMs

Let ϕM denote the number of ones in B. The same reasoning is used as in the proof of L−1 Proposition 6.2 where φM was determined. As before, let M = M1 + M2 with M1 = 2 L−1 and M2 = M − 2 . For M = 1 we have ϕ1 = 0 and for M = 2 we have ϕ2 = 1. For

M = 3, add ϕ1, ϕ2 and the number of ones on the last level,

ϕ3

z }| { ϕ2 ϕ1 1 010 ⇒ z}|{01 + z}|{0 + z}|{001 . 001

Therefore ϕ3 = ϕ2 + ϕ1 + 1.

Following the same reasoning again, the following is obtained for M in general

ϕM = ϕM1 + ϕM2 + M2.

We can not assign more input bits than there are ones in B, therefore ϕM is the upper bound on n, making the lower bound on δ

δ ≥ M − ϕ . M 

In Table 6.1 we list the lower bound for δ when making use of the multilevel construc- tion. We see for M = 16 a lower bound of δ ≥ −16, which is impractical as some sequences would show no distance between them. Although this is a mathematically proven lower bound, practical mappings will rarely make use of such low δ values.

Similar to the weight determining the number of input bits that a level can have in Proposition 6.4, the weight also determines the upper bound on δ. However, this is much more complicated as the weight as well as the number of input bits and how these are distributed plays a role.

As an example, for M = 6 a mapping with δ = 3 can be created, but not with δ = 2. We have 0 1 0 1 0 1   B = 0 0 1 1 0 0 , 0 0 0 0 1 1 where n1 = 1, n2 = 1 and n3 = 1 are chosen to create a δ = 3 mapping. From Proposi-

6-24 6. Multilevel Construction of Permutation DPMs

Table 6.1: Lower bound on δ

M Lower bound 2 δ ≥ 1 3 δ ≥ 1 4 δ ≥ 0 5 δ ≥ 0 6 δ ≥ −1 7 δ ≥ −2 8 δ ≥ −4 9 δ ≥ −4 10 δ ≥ −5 11 δ ≥ −6 12 δ ≥ −8 13 δ ≥ −9 14 δ ≥ −11 15 δ ≥ −13 16 δ ≥ −16 tion 6.5 it is known that for DIMs we require

dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k) + δ − 1.

Since each level can produce a distance of 4 or more when all the transpositions are used and the input sequences produce a distance of 1, we have

4 ≥ 2 + δ − 1 ⇒ δ ≤ 3.

Should n1 = 2, n2 = 1 and n3 = 1 be chosen to create a δ = 2 mapping, for the second and third level we have 4 ≥ 2 + δ − 1 ⇒ δ ≤ 3, which satisfies the condition. For the first level we have

6 ≥ 4 + δ − 1 ⇒ δ ≤ 3, which at first glance appears to satisfy the condition. However, the first level has two input bits which can be assigned to three transpositions. This means that one input bit will be assigned two transpositions while the other input bit will only be assigned one

6-25 6. Multilevel Construction of Permutation DPMs transposition. Therefore, for the input bit with only one transposition we have

2 ≥ 2 + δ − 1 ⇒ δ ≤ 1, which clearly does not satisfy the condition if a mapping with δ = 2 is requiered.

A general upper bound on δ for the multilevel construction can thus not be proposed. For each case one would have to determine whether the distribution of input bits and the transpositions available will be sufficient to satisfy the conditions of Proposition 6.5.

6.6 Distance optimality of new DPMs

When M is a power of 2, such that M = 2l, l ∈ {1, 2, 3,...}, then the resulting DPM will achieve the upper bound on the sum of distances, provided that the maximum distances were obtained in the multilevel construction.

Proposition 6.7 Any multilevel DPM with M = 2l, l ∈ {1, 2, 3,...} will attain the upper bound |Emax|, provided the maximum distances were achieved between all the multilevel components. 2

Proof The maximum distance between multilevel components is achieved when each component’s complement is also in the set. The only values of M for which it is possible to have complements with the same weight, is for M = 2l, l ∈ {1, 2, 3,...}. For instance, for M = 4 the complement of 0011 is 1100, however for M = 5 the complement of 00011 is 11100.

With M = 2l, α and β in (5.10) become α = 2n−l and β = 0. There will be no incomplete group and each symbol will appear 2n−l times in all the positions. Thus, we need to proof that if every component’s complement is present among the multilevel components, then all the symbols will appear 2n−l times in all the positions.

Recall from Example 6.5 that we start with the multilevel identity matrix and then transpose the columns until the required permutation is obtained. Now consider starting with the permutation identity sequence, of length M, with symbol 0 in position 1 for each of the 2n sequences. Since each component’s complement is present, we have that n n−1 C1 = {01 ··· 01,..., 10 ··· 10}. Thus, of the 2 sequences, 2 components will still have

6-26 6. Multilevel Construction of Permutation DPMs symbol 0 in position 1 and 2n−1 will have symbol 0 in position 2 (recalling that for the

first level swap(1,2) is used). For the second level we have C2 = {00 ··· 11,..., 11 ··· 00} and use swap(1,3). Of the 2n−1 sequences that still have symbol 0 in position 1, 2n−2 will now have symbol 0 in position 1 and 2n−2 will have symbol 0 in position 3.

Thus, for each additional level the number of symbol 0s in position 1 is halved. With M = 2l, the number of levels is L = l. After the transpositions are done for all levels, symbol 0 will be in position 1, 2n−l times. This same reasoning can be used for symbol 0 in any other position, as well as for any other symbol in any position. Therefore, all the symbols will appear 2n−l times in all the positions. 

In Appendix B one can see that all the M = 4 and M = 8 mappings achieved the upper bound on the distance sum.

For other values of M it is also possible to increase the distance between multilevel components to get mappings that have |E| values closer to the upper bound. However, this is on a “trial-and-error” basis as a DPM cannot be guaranteed. As an example, C1 and C2 of M3(6, 6, 0) in Table B.1 can be used with

C3 = {000011, 000110, 011000, 110000}.

(In this case the transpositions for C3 cannot be written as combinations of others, as in

Example 6.7.) The distance between components in C3 is increased, thereby increasing the overall distance for the mapping with |E| = 20224. This suggests that it could be possible to construct mappings that attain the upper bound for all values of M, however at present this remains an open problem.

Another possibility is to use a different multilevel starting matrix. Instead of using the permutation identity sequence as starting matrix, one can use any arbitrary starting matrix, provided all the columns are unique.

Example 6.8 For M = 5, use 0 0 1 0 1   0 1 0 0 0 , 0 0 0 1 1 as the starting matrix. The multilevel permutations can be determined using the same rules as set out previously, from which the multilevel components can then be chosen. A

6-27 6. Multilevel Construction of Permutation DPMs possible choice of multilevel components is

C1 = {00101, 10001, 00110, 10010},

C2 = {01000, 10000},

C3 = {00011, 01001, 00110, 01100}. In this case the overall distance for the mapping is |E| = 3776, which is slightly larger than the |E| = 3712 of the M(5, 5, 0) mapping listed in the Appendix.

For M = 9, use   0 1 0 0 0 0 1 0 0   0 0 1 0 1 0 0 0 1   , (6.3) 0 0 0 1 1 0 0 1 1   0 0 0 0 0 1 1 1 1 as the starting matrix. The multilevel components are chosen as

C1 = {010000100, 100000100, 010001000, 100001000},

C2 = {001010001, 100100010},

C3 = {000110011, 110000011, 000111100, 110001100},   000001111, 100000111, 010001011, 110000011,   001001101, 101000101, 011001001, 111000001, C4 = . 000101110, 100100110, 010101010, 110100010,    001101100, 101100100, 011101000, 111100000 

For this mapping, |E| = 2023424, which is larger than |E| = 1982464, obtained when using B as the starting matrix. 2

In both the M = 5 and M = 9 multilevel identity matrix there is a single one on the last level. These two alternative starting matrices suggest that by having more ones on the last level in the starting matrix, it is possible to attain a larger sum of distances. An explanation for this is provided in Section 7.5, where a graph representation is used to compare different mappings with each other.

6-28 6. Multilevel Construction of Permutation DPMs

6.7 Summary

In this chapter it was shown that permutation sequences can be converted to a multi- level representation and how, following certain transposition rules, the entire permutation symmetric group can be generated using this representation. A multilevel construction was then created by using a subset of the generated sequences and adhering to certain distance requirements. For certain lengths of M, the new construction was shown to be distance optimal.

6-29 Comparison and Analysis of 7 Different Mappings

7.1 Introduction

In this chapter we will be investigating the sum of Hamming distances for some of the mappings used in earlier chapters. This is done with the aim of explaining the performance behaviour of these mappings, as well as confirming that our new results can be used to predict the performance to some extent.

Mappings found using the multilevel construction are investigated, looking more specif- ically at the structure of different mappings for the same set of parameters.

The sums of Hamming distances are compared for all known M = 8 mappings, show- ing that mappings from the new multilevel construction improve on previous ones. In addition, simulation results are used to show that the new mappings are indeed better than previous ones.

Finally, a graph representation of permutation DPMs is used to illustrate differences between mappings, as well as using it to understand the symbol distribution in a mapping, which plays an important role in the sum of the Hamming distances.

7.2 Mappings used in PLC simulations

In the following examples, |E| and |E(k)| will be calculated for various known mappings (k) and this will be compared with |Emax| and |Emax|.

7-1 7. Comparison and Analysis of Different Mappings

Example 7.1 Consider the following distance-preserving mapping n = 4 → M = 4, from Ferreira and Vinck [25]

( ) 1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, . 3214, 3241, 2314, 2341, 3421, 3412, 3124, 3142

Using the equations from Chapter 5, the following can be calculated: |E| = 732, |E(1)| = 168, |E(2)| = 192, |E(3)| = 186 and |E(4)| = 186. From Propositions 5.1 and 5.2 it is (k) known that the maxima obtainable is |Emax| = 768 and |Emax| = 192. It is obvious that this mapping is not optimal in terms of distance attainable.

Next, consider the distance-preserving mapping n = 4 → M = 4, from Chang et al [27] as well as Ferreira et al [26]

( ) 1234, 1243, 2134, 2143, 1324, 1342, 3124, 3142, . 4231, 4213, 2431, 2413, 4321, 4312, 3421, 3412

In this case |E| = 768, |E(1)| = 192, |E(2)| = 192, |E(3)| = 192 and |E(4)| = 192 which is exactly the maxima attainable. 2

The distance optimality of Definition 5.1 can be redefined mathematically by the following definition.

Definition 7.1 The distance optimality of a mapping is given by

|E| η = , |Emax| where |E| is the sum of the Hamming distances for the mapping and |Emax| is the upper bound on the sum of the Hamming distances for the mapping. 2

When η = 1, a mapping is distance optimal and it attained the upper bound. The lower η is, the less distance optimal a mapping will be.

Example 7.2 We now return to the mappings used in the simulation results in Sec- tion 4.5, to see whether the |E(k)| and |E| values can be used to explain the performance results.

(k) (k) The mappings from Table 4.2 are used, with the |E | and |E| values as well as |Emax| and |Emax| for these mappings being listed in Table 7.1.

7-2 7. Comparison and Analysis of Different Mappings

Table 7.1: |E(k)| and |E| values values for mappings used in simulations

(1) (2) (3) (4) (5) (k) Mapping |E | |E | |E | |E | |E | |Emax| |E| |Emax| DIM 192 204 204 204 204 204 1008 1020 DCM1 512 672 800 816 816 818 3616 4090 DCM2 818 818 818 818 818 818 4090 4090 DRM 3072 3264 3080 3266 3266 3276 15948 16380

The DIM is very close to being distance optimal, with only |E(1)| not reaching the value of the upper bound. The DCMs are good examples of optimum and non-optimum (k) mappings, as in the previous example. None of the |E | values for DMC1 attains the upper bound, only |E(4)| and |E(5)| come close. On the other hand, all the |E(k)| values for

DCM2 attain the upper bound. The DRM also does not attain the upper bound, though it does come close.

Calculating the distance optimality for these mappings, we have

DIM : η = 0.988,

DCM1 : η = 0.884,

DCM2 : η = 1.000, DRM : η = 0.974.

Clearly DCM2 is distance optimal, as has already been seen. It can also be seen that even though the DIM and DRM are not distance optimal, their η values are very close to 1 and can be regarded as near-optimal. Compared to the other mappings, DCM1 is too far from the upper bound.

To further emphasise the difference between the two DCMs, we again present the simulation results that we obtained in Section 4.5. The results of Figure 4.5(b) are combined with that of Figure 4.5(c) and presented in Figure 7.1.

The DCM2 performs the best, with performance exactly the same, regardless of which frequency the permanent frequency disturbance is on (the deviation for very low error rates will be discussed shortly). In the case of DCM1 it can be seen that the performance is dependent on the position of the permanent frequency disturbance. This result can now be explained by considering the |E(k)| values for both mappings. The |E(k)| values for

DCM2 are exactly the same, while the values for DCM1 vary from one value to another.2

7-3 7. Comparison and Analysis of Different Mappings

1

10-1

10-2

DCM1, PFD in pos. 1 10-3 DCM1, PFD in pos. 2

DCM1, PFD in pos. 3 Bit error rate Bit DCM1, PFD in pos. 4 10-4 DCM1, PFD in pos. 5

DCM2, PFD in pos. 1

DCM2, PFD in pos. 2 10-5 DCM2, PFD in pos. 3

DCM2, PFD in pos. 4

DCM2, PFD in pos. 5 10-6 1 10-1 10-2 Background noise probability

Figure 7.1: Comparison of optimum and non-optimum mappings, with background noise and permanent frequency disturbances

It should be remembered that the |E(k)| values for the mappings are for symbols in position k, which would be equivalent to symbols in time slot k, as in (4.1). Therefore, if we want to evaluate a mapping’s performance as a permutation trellis code, then it would make more sense to determine the |E0(l)| values in terms of symbols in frequency slot l. The matrix representation of 1423 is   1 0 0 0   0 0 1 0   , 0 0 0 1   0 1 0 0 where as before the k-th symbol indicates where a one is to appear in the k-th column. Similarly, we can determine the l-th symbol in the permutation sequence by determining where the one appears in the l-th row. Alternatively, determine the permutation as usual

7-4 7. Comparison and Analysis of Different Mappings from the transposed matrix, as in

 T   1 0 0 0 1 0 0 0     0 0 1 0 0 0 0 1   =   . 0 0 0 1 0 1 0 0     0 1 0 0 0 0 1 0

Then we can state that 1423 ≡ 1342. If this is done for every sequence in a mapping, then the distance contribution from symbols in the l-th frequency slot can be determined. Let |E0(l)| be the sum of the Hamming distances for symbols in position l in this case.

Let ηk be the distance optimality for symbols in position k, with

|E(k)| ηk = (k) , |Emax|

0 and let ηl be the distance optimality for symbols in position l for the equivalent sequences, with 0(l) 0 |E | ηl = (k) . |Emax|

Example 7.3 We return to DCM1 from Example 7.2 and use the equivalent sequences to determine 0(1) 0 |E | = 744 → η1 = 0.910, 0(2) 0 |E | = 768 → η2 = 0.939, 0(3) 0 |E | = 744 → η3 = 0.910, 0(4) 0 |E | = 680 → η4 = 0.831, 0(5) 0 |E | = 680 → η5 = 0.831.

This now explains why DCM1 performed so badly in Figure 4.6. Recall that for the case where three permanent frequency disturbances were present, they appeared on frequencies 1, 2 and 3, which are also the positions where most of DCM1’s distance is 0 built according to the ηl values.

This also explains the performance results in Figure 7.1. On closer inspection, one can see that the worst performance is when the disturbance is on frequency 2, exactly the frequency where the most distance is built. Next in performance is disturbances on 0 0 frequencies 1 and 3, lying very close to each other on the graph, as expected since η1 = η3. Similarly, the performances when disturbances are on frequencies 4 and 5 are also very

7-5 7. Comparison and Analysis of Different Mappings

0 0 close on the graph, as expected with η4 = η5. Since the least distance is built in positions

4 and 5, one would also expect to find the best performance here, as is indeed the case.2

In the same way the equivalent distance optimality for any other mapping can be calculated and used to explain or predict the performance for that mapping. In the previous example we only determined the equivalent distance optimality for DCM1, since the other mappings all have values very close to each other.

Even though a mapping has values very close to each other, or even attaining the upper bound, deviations can still be observed in the performance graphs of permutation trellis codes. In such cases these deviations can be attributed to the structure of the convolutional code combined with that of the mapping.

An example of such a deviation can be seen in Figure 7.1 for the DCM2 mapping, a mapping which is known to attain the upper bound. The performance graphs are near identical at first, but as the background noise probability lowers, it can be seen that four of the graphs are deviating away from the graph representing a disturbance on frequency 3. 3 Since this code uses an R = 5 base code, the maximum distance, which is obtained when all the symbols differ in the two sequences, is 5. In the case where a distance of 4 is obtained, one of the symbols in the two sequences must agree. An analysis of the trellis and the paths being compared reveals that many of the sequences in the trellis producing a distance of 4 have the symbol 3 as the agreeing symbol. Therefore, symbol 3 builds less distance than the other symbols and as we have seen previously, if the permanent frequency disturbance is in the same position as the position where the least distance is built, then the best performance is achieved.

This shows that even though a mapping is distance optimal, it does not guarantee optimal performance when combined with a convolutional code, an occurrence that we will see in Section 7.4 as well. Clearly distance optimal mappings are better than non- optimal mappings, but to achieve the best performance it seems that one would have to search amongst all the distance optimal mappings to find the best one suited to a certain convolutional code.

7-6 7. Comparison and Analysis of Different Mappings

7.3 Mappings from the multilevel construction

In this section we will compare different mappings found using the multilevel construction.

Example 7.4 To illustrate how different numbers of input bits can be assigned, consider the M(6, 6, 0) mappings in Table B.1. Three different M(6, 6, 0) mappings are listed, with the following input bits assigned respectively

•M1(6, 6, 0) with n1 = 3, n2 = 2, and n3 = 1,

•M2(6, 6, 0) with n1 = 2, n2 = 2, and n3 = 2,

•M3(6, 6, 0) with n1 = 3, n2 = 1, and n3 = 2.

In each case |E| = 19456, thus the sum of the distances are the same, but for each mapping the distance is distributed differently. This is illustrated in Figure 7.2 where the entries of the E matrix are shaded according to the value of the entry.

The figure clearly shows that the structure of the mappings are different, and therefore one can expect to find different performance results when these mappings are combined with the same convolutional code. 2

M1(6, 6, 0) M2(6, 6, 0) M3(6, 6, 0)

Distance: 0 2 3 4 5 6

Figure 7.2: Visualisation of distance distribution for different M(6, 6, 0) mappings

7-7 7. Comparison and Analysis of Different Mappings

In the Appendix, M(6, 6, 0) and M(8, 8, 0) are the only parameters for which mul- tiple mappings are listed. Although it is possible to have different mappings for other parameters as well, these are not explicitly listed.

Example 7.5 To illustrate the effect which the distance between multilevel components has, consider an M(8, 8, 0) mapping with   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = , 10010101, 10010110, 10011001, 10011010,    10100101, 10100110, 10101001, 10101010  ( ) 00110011, 00110110, 01100011, 01100110, C2 = . 10011001, 10011100, 11001001, 11001100

It is easy to verify that the complement of each component in C1 and C2 is also in C1 and

C2.

Any of the following C3 components generates a DCM when combined with the above

C1 and C2. Alongside each C3 the respective |E| values are listed.

C3 = {00001111, 10000111}, |E| = 409600,

C3 = {00001111, 11000011}, |E| = 425984,

C3 = {00001111, 11100001}, |E| = 442368,

C3 = {00001111, 11110000}, |E| = 458752.

It can be seen that as the distance between the C3 components increases, the distance of the entire mapping, |E|, also increases. For this case |Emax| = 458752 and this is attained by the last C3, the only set where the component’s complement is also a component. This also verifies Proposition 6.7 that the upper bound is attained when all the complements are also in the set.

In Figure 7.3 the distance increase distribution for the four different C3 components can be seen. The entries of the D matrix are subtracted from those of the E matrix, thus providing us with the increase. The bar graphs show the number of entries in the E − D matrix that shows a certain distance increase. The graphs show that as the distances between the components increase, the overall distance in the mappings increases, indicated by the shift of the distribution towards the right. 2

7-8 7. Comparison and Analysis of Different Mappings

16000 14000 12000 10000 8000 6000 4000

Number of entries of Number 2000 0 0123456 0123456 0123456 0123456 Distance increase (E – D) (a) (b) (c) (d)

Figure 7.3: Distance increase distribution for four different C3 components, (a) {00001111, 10000111}, (b) {00001111, 11000011}, (c) {00001111, 11100001} and (d) {00001111, 11110000}

7.4 Permutation DPM constructions

In Table 7.2 the distance sums of known mappings for 4 ≤ M ≤ 16 and n = M are compared with the upper bound. Mappings are used from [25] using their prefix method, [27] using their Constructions 2 and 3, from [28] using his construction, from [29] using Construction 2 and from [31] using Constructions A–C. Note that the prefix construction is only defined for M ≤ 8, Construction 3 [27] is only defined for even M and the construction from [28] only for odd M. From [31], Construction A is defined for even M, Construction B for M = 4z − 1 and Construction C for M = 4z + 1 with z some integer value. Thus, Constructions A–C together produce mappings for all values of M.

In Table 7.3 the distance optimality, η, is used to compare the same mappings as used in Table 7.2. In Figure 7.4 a graph of the η values is presented. A trend that is obvious from this graph, is that all the previous mappings’ distance optimality is decreasing as M is increasing. On the other hand, the multilevel construction’s distance optimality increases towards one as it approaches the values where it is distance optimal, i.e. M = 2l with l some positive integer.

A possible explanation for this is that all the previous constructions make use of some algorithm where only a set number of transpositions are used, regardless of the value for M. The multilevel construction has shown that the higher M is, the more transpositions can be applied. Example 7.5 also showed what the effect is of applying more transpositions

7-9 7. Comparison and Analysis of Different Mappings in a mapping.

Although the construction by Wadayama and Vinck [36] was not used to create DPMs and can therefore not be compared directly, we can make the following observations. Each constant weight code word in their construction can be assigned input bits (as shown in Section 6.5), thereby creating a mapping from all binary sequences to constant weight codes to permutation codes. However, since the n-length constant weight codes are subsets of the code containing all the 2n n-length binary sequences, the length of the input sequences in this case would have to be smaller than n and therefore only DIMs can be constructed. Using their construction, M(2, 4, 2) and M(3, 8, 5) DIMs can be

Table 7.2: Comparison of distance sums for various mappings

M |Emax| Prefix [25] Construction 2 [27] Construction 3 [27] 4 768 732 768 768 5 4090 3616 3712 – 6 20472 17072 17536 18432 7 98294 78528 81024 – 8 458752 355840 367744 393216 9 2097144 – 1645696 – 10 9437160 – 7281792 7864320 11 41943022 – 31923328 – 12 184549344 – 138878080 150994944 13 805306346 – 600251520 – 14 3489660888 – 2579963008 2818572288 15 15032385480 – 11035679872 – 16 64424509440 – 47006030976 51539607552

M Construction [28] Construction 2 [29] Construction A–C [31] Multilevel 4 – 768 768 768 5 3872 4020 3968 3712 6 – 18432 18432 19456 7 91016 88064 87040 94208 8 – 413312 393216 458752 9 1911000 1802240 1802240 1982464 10 – 8110080 7864320 9043968 11 37741432 36330496 34865152 40108032 12 – 154927104 150994944 180355072 13 717371576 677117952 662700032 780140544 14 – 2957164544 2818572288 3422552064 15 13282894648 12444499968 12146704384 14831058944 16 – 53448015872 51539607552 64424509440

7-10 7. Comparison and Analysis of Different Mappings created, both attaining the upper bound on the distance sum. Using their construction it is not possible to create DCMs or DRMs, and as we stated previously, it is also limited to certain values of M.

Table 7.3: Comparison of distance optimality, η, for various mappings

M Prefix Constr. 2 Constr. 3 Constr. Constr. 2 Constr. A–C Multilevel [25] [27] [27] [28] [29] [31] constr. 4 0.953 1.000 1.000 – 1.000 1.000 1.000 5 0.884 0.908 – 0.947 0.983 0.970 0.908 6 0.834 0.857 0.900 – 0.900 0.900 0.950 7 0.799 0.824 – 0.926 0.896 0.886 0.958 8 0.776 0.802 0.857 – 0.901 0.857 1.000 9 – 0.785 – 0.911 0.859 0.859 0.945 10 – 0.772 0.833 – 0.859 0.833 0.958 11 – 0.761 – 0.900 0.866 0.831 0.956 12 – 0.753 0.818 – 0.839 0.818 0.977 13 – 0.745 – 0.891 0.841 0.823 0.969 14 – 0.739 0.808 – 0.847 0.808 0.981 15 – 0.734 – 0.884 0.828 0.808 0.987 16 – 0.730 0.800 – 0.830 0.800 1.000

1

0.9 η

0.8 Prefix [25] Constr. 2 [27] Distance optimality, Constr. 3 [27] Constr. [28] 0.7 Constr. 2 [29] Constr. A-C [31] Multilevel constr.

4 6 8 10 12 14 16 M Figure 7.4: Distance optimality, η, for various mappings

7-11 7. Comparison and Analysis of Different Mappings

We now compare all the M = 8 mappings (as listed in Tables 7.2 and B.1 in the Appendix) in a communication system simulation. A permutation trellis code is created using an R = 4/8 convolutional code (making use of four time intervals from the generic

R = 1/2, ν = 2, dfree = 5 code). In Figure 7.5 the bit error rate results are presented for M = 8 mappings using 8 frequencies with background noise present, using the simulation setup of Section 4.4. Note that the M = 8 mappings from [27] and [31] are exactly the same and therefore only the results for one is included.

It is evident from Figure 7.5 that the mappings with higher distance sums are indeed performing better. For high values of error probability one can see that the new distance optimum mappings are performing the best. However, as the error probability lowers the performance of Construction 2 [29], M1(8, 8, 0), M3(8, 8, 0), and M4(8, 8, 0) tends to coincide. Overall M2(8, 8, 0) is the best mapping in this case, outperforming the others.

This highlights the advantage of having a flexible construction where different map- pings can be constructed. Figure 7.5 shows that even four distance optimal mappings can have different performance results when used in a permutation trellis code. This is due

1

10-1

10-2

10-3

Prefix [25] 10-4 Constr. 2 [27] Bit error rate Bit Constr. 3 [27] 10-5 Constr. 2 [29] 41(8,8,0)

42(8,8,0) 10-6 43(8,8,0)

44(8,8,0) 10-7 1 10-1 Background noise probability Figure 7.5: Simulation comparing M = 8 mappings using M-FSK on a power-line communica- tions channel with background noise

7-12 7. Comparison and Analysis of Different Mappings to the fact that the extra distance available from permutation sequences is distributed differently (as was illustrated in Figure 7.2) and the performance will then depend on the convolutional code’s structure. It therefore becomes necessary to optimise a mapping for a specific convolutional code, but that is beyond the scope of this thesis and is left as future research.

7.5 Graph representation of permutation mappings

Lee [30], [31] made use of a graph representation to illustrate how his new algorithms work. In [30] it was shown that the permutation symbols can be seen as lying on a circle. Using the mapping algorithm, these symbols are then transposed according to the binary input, until the resulting permutation is obtained.

As an example, in [30] the following algorithm was presented,

k Mapping algorithm for ζn

Input: (x1, x2, . . . , xn)

Output: (p1, p2, . . . , pn) begin

(p1, p2, . . . , pn) ← (1, 2, . . . , n) for i from 1 to n do

if xi = 1 then swap(pi, pi+k) end.

2 In Figure 7.6 the graph from [30] of the ζ7 mapping is presented, with n = 7 and k = 2.

The permutation symbols, 1,..., 7, are placed in positions p1, . . . , p7, and are transposed according to the binary input bits, x1, . . . , x7. The graph is an exact visual representation of the algorithm’s structure. Every possible swap in the algorithm is represented by a connecting line between the symbols to be swapped. Each input bit is represented by the xi associated with each connecting line.

The graph is used in the same step by step way that the algorithm is followed. Start with x1: if it is equal to one, then swap the symbols connected to the line associated with x1, in this case p1 and p3, otherwise leave it as is. Continue to x2: if it is equal to one, then swap the symbols in p2 and p4, otherwise leave it as is. Repeat this process for all input bits, up to x7. The resulting permutation sequence is then read off the graph with

7-13 7. Comparison and Analysis of Different Mappings

p1

p2 x7 p7 x 1 x6

x2 x5 p3 p6

x 3 x4

p4 p5

2 Figure 7.6: Graph representation of ζ7 mapping [30]

the first symbol in the p1 position, the second symbol in the p2 position, and so forth.

These graphs led to the work that will be presented here. We look more closely at such graph representations for permutations in general, as well as graph representations for some of the previous mapping algorithms, using it to compare and analyse the mappings. Although this concept is applicable to DIMs and DRMs as well, we will restrict the work in this section to DCMs only.

7.5.1 Graph representation of symbols and transpositions

It has been seen that a mapping algorithm consists of transpositions or swaps of permu- tation symbols according to the binary input symbols. Using the graph representation of the symbols and swaps, any mapping algorithm can be represented graphically. From here on only the symbols, 1,...,M, will be displayed in the graphs and not the positions, p1, . . . , pM .

All the M permutation symbols are represented by placing the actual symbols in arbi- trary positions, but for convenience they are placed on a circle, as in [30]. Transpositions between symbols are then represented by a bidirectional connecting line between the two symbols to be transposed, i.e. the connecting line represents swap(.,.). In Figure 7.7 the graphs for 4 ≤ M ≤ 9 are shown. Clearly, the larger M is, the more possible swaps are

7-14 7. Comparison and Analysis of Different Mappings

M = 4 M = 5 M = 6 1 1 1

2 6 2 5

2 4

3 5 3 4 3 4

M = 7 M = 8 M = 9 1 1 1 2 9 2 7 2 8

3 8 3 7 3 6

4 7 4 6 4 5 5 5 6

Figure 7.7: Graph representation of all possible transpositions between symbols available to be used in a construction. Using combinations of these swaps, it is possible to generate all the permutation sequences from the symmetric group, SM .

In graph theory, a graph with M nodes and lines connecting all the nodes, is normally referred to as a KM graph. Similarly, we will use KM to denote the graph with M permutation symbols, containing all the bidirectional connecting lines that represents the swapping of the symbols, as in Figure 7.7.

7.5.2 Graph representation of permutation DPMs

Similar to choosing a subset of SM to construct a DPM, a subset of the connecting lines in the graph is chosen to construct a DPM, or stated in terms of graph theory, a subgraph of KM is used. However, different mappings can be obtained for the same subgraph,

7-15 7. Comparison and Analysis of Different Mappings depending on the order in which swaps are done. We will elaborate on this later.

Example 7.6 We make use of the Construction 2 algorithm presented in [27], with the position function a constant 1. In Figure 7.8 the graph representation of this algorithm for 4 ≤ M ≤ 9 can be seen. A binary sequence of x1x2 . . . xn is used as input. When xi = 1, the symbols connected to the corresponding line in the graph are transposed, and this is done in the specific order of i = 1, 2, . . . , n.

This construction is based on the idea of the prefix construction where an M +1-length mapping is created from an M-length mapping in a recursive process. This can clearly be seen in the figure, where each successive graph makes use of the previous one, with swap(1,M) being added each time for the input bit xn = 1 (except for M = 4, which is the starting point of the recursion). If the position function is another constant, say 4, then swap(4,M) will be added to the previous graph each time.

M = 4 M = 5 M = 6 1 1 1 x1 x1 x5 x6 x1

x x 2 x3 6 3 2 3 5 x5 x 2 4 4

x4 x4 3 5 x2 3 4 x2 3 x2 4

M = 7 M = 8 M = 9

1 x 1 x1 1 x1 x7 1 x8 x9 2 8 2 9 2 7 x3 x3 x3 x7 x8 x6 3 8 x4 x5 3 x5 x6 7 x4 x7 3 6 x2 x5 x4 x2 x6 x2 4 7 4 6 4 5 5 5 6

Figure 7.8: Graph representation of Construction 2 [27]

7-16 7. Comparison and Analysis of Different Mappings

As we observed previously, each input bit is assigned to one swap only, and this can also be seen in the graphs.

The mappings found by the multilevel construction are illustrated in Figure 7.9. A greater number of transpositions is used in this case, where input bits can be assigned to multiple swaps, as opposed to those in Figure 7.8. This results in the sum of Hamming distances being greater, as shown in the previous section.

Here we can see that the swaps being used are always the same, as was specified in Remark 6.1. Different multilevel mappings are obtained by assigning the input bits in different ways. In other words, the connecting lines in Figure 7.9, or alternatively the subgraph, will be the same for different mappings, but the assignment of input bits to swaps will be different. As was shown in Section 6.5, any of the transpositions on the same level can be assigned the same input bit. 2

M = 4 M = 5 M = 6 1 1 1 x1 x1 x1 x5

x3 2 x6 6 2 x3 5 x4 x6 x 2 x4 4 3

x4 3 x5 5 x2 3 4 x2 3 x2 4

M = 7 M = 8 M = 9 1 1 x1 x1 x1 1 x9 x x4 x 2 x5 8 2 5 9 2 7 7 x 7 x7 x x4 7 x x7 7 x6 3 8 x7 x 3 8 7 x8 x5 3 x5 6 x x x6 5 x8 x2 x6 4 x2 x8 x 4 7 x2 3 x 4 6 6 x6 4 5 x3 6 5 5 x3

Figure 7.9: Graph representation of multilevel construction

7-17 7. Comparison and Analysis of Different Mappings

Level 1 Level 2 Level 3 1 1 1 2 8 2 8 2 8

3 7 3 7 3 7

4 6 4 6 4 6 5 5 5

Figure 7.10: Independent transpositions for M = 8 multilevel mapping

It is important to note that the swaps assigned with the same input bit are all in- dependent, therefore it does not matter in which order these swaps are done. This is a direct result of the multilevel construction, where swaps are used from different levels. Figure 7.10 illustrates how the swaps for each level are independent in the M = 8 mapping from the multilevel construction.

7.5.3 Symbol distribution and symbol paths

We know from Section 6.6 that the M = 8 multilevel mapping attains the upper bound on the sum of the Hamming distances, the reason being that all the symbols appear in all the positions in the mapping, thus building the maximum distance. Using the graph it is easy to see why this happens. We have to consider all the positions that symbol 1 can appear in. Working through the graph step by step and taking swaps into account, we can keep track of where symbol 1 can appear in each step. On the graph this can be seen as a path that symbol 1 follows, and such paths will be called the symbol paths.

Example 7.7 The symbol 1 path of the M2(8, 8, 0) mapping is shown in Figure 7.11.

Initially symbol 1 is only in position 1. If x1 = 1, then swap(1,2) is used and symbol 1 also appears in position 2. For x2 = 1, x3 = 1 and x4 = 1, swap(3,4), swap(5,6) and swap(7,8) are used respectively (shown as dashed lines), but none of these swaps involve positions where symbol 1 appears at this stage. For x5 = 1, swap(1,3)(2,4) is used, and since symbol 1 can appear in both position 1 and position 2, it can now also appear in position 3 and position 4. If x6 = 1, then swap(5,7)(6,8) is used, but at this stage

7-18 7. Comparison and Analysis of Different Mappings

x1 x2 x3 x4 1 1 1 1 2 8 2 8 2 8 2 8

3 7 3 7 3 7 3 7

4 6 4 6 4 6 4 6 5 5 5 5

x5 x6 x7 x8 1 1 1 1 2 8 2 8 2 8 2 8

3 7 3 7 3 7 3 7

4 6 4 6 4 6 4 6 5 5 5 5

Figure 7.11: Symbol 1 path for M2(8, 8, 0) mapping

symbol 1 does not appear in any of those positions. For x7 = 1, swap(1,5)(2,6) is used, where symbol 1 can now appear in position 5 and position 6 as well. Finally, if x8 = 1, then swap(3,7)(4,8) is used and symbol 1 can also appear in position 7 and position 8. 2

Recall from the proof of Proposition 6.7 that we start with 2n binary and permutation sequences. For n = M = 8, there are 256 sequences and of these, 128 have x1 = 0 and 128 have x1 = 1. Therefore, in Figure 7.11, after the swaps for x1, symbol 1 appears 128 times in position 1 and 128 times in position 2. Of the 128 sequences with x1 = 0, there are

64 sequences with x2 = 0 and 64 sequences with x2 = 1. Similarly, of the 128 sequences with x1 = 1, there are 64 sequences with x2 = 0 and 64 sequences with x2 = 1. After the swaps for x5, symbol 1 appears 64 times in positions 1, 2, 3 and 4. After the swaps for x7, symbol 1 appears 32 times in positions 1, 2, 5 and 6, and 64 times in positions 3 and 4. After the swaps for x8, symbol 1 appears 32 times in all the positions. (It will be shown in Appendix D how this same procedure can be used to calculate the |E(k)| and |E| values of a mapping.)

The symbol paths that each symbol follows in the M2(8, 8, 0) mapping are presented in Figure 7.12. (To better differentiate the paths, the symbol positions are rearranged in these graphs.) Just as symbol 1 appeared 32 times in all the possible positions, the other

7-19 7. Comparison and Analysis of Different Mappings

Symbol 1 Symbol 2 Symbol 3 Symbol 4 5 7 5 7 5 7 5 7 x7 x8 x7 x8 x7 x8 x7 x8 1 x5 3 1 x5 3 1 x5 3 1 x5 3

x1 x1 x2 x2

2 x5 4 2 x5 4 2 x5 4 2 x5 4 x7 x8 x7 x8 x7 x8 x7 x8 6 8 6 8 6 8 6 8

Symbol 5 Symbol 6 Symbol 7 Symbol 8 5 x6 7 5 x6 7 5 x6 7 5 x6 7 x7 x8 x7 x8 x7 x8 x7 x8 1 3 1 3 1 3 1 3

x3 x3 x4 x4 2 4 2 4 2 4 2 4

x7 x8 x7 x8 x7 x8 x7 x8 6 x6 8 6 x6 8 6 x6 8 6 x6 8

Figure 7.12: Symbol paths for M2(8, 8, 0) mapping seven symbols also appear 32 times in all the possible positions. Any multilevel mapping with M = 2l, with l some integer, will have a graph representation where the symbol paths connect to all the positions.

For other values of M this method of calculating the number of times a symbol will appear in a position, suggests that mappings attaining the upper bound on the distance sum might not be possible using a “simple algorithm” of swaps alone. Since xi = 0,

1 ≤ i ≤ n, for half of the binary sequences and xi = 1, 1 ≤ i ≤ n, for the other half, the number of times a permutation symbol will appear in a certain position will always be a power of 2, such as 2n−j, 0 ≤ j ≤ n. The problem is that these values are not the values that satisfy the upper bound in Proposition 5.1. We know mappings attaining the upper bound for these other M values are possible (as found by exhaustive search for M = 5 [26]), but it seems that more complex algorithms would be necessary to create a construction.

Returning to other mappings, one will see that by inspecting the graphs, all the symbol paths do not connect to all the positions, thus resulting in mappings which do not attain the upper bound on the distance sum. An example of this can be seen in Figure 7.13, where the symbol paths for the M = 8 mapping, obtained from Construction 2 [27], are illustrated. Although symbols 1, 2, 3 and 4 connect to all the positions, the remaining

7-20 7. Comparison and Analysis of Different Mappings

Symbol 1 Symbol 2 Symbol 3 Symbol 4

x1 1 x8 x1 1 x8 1 x8 1 x8 2 8 2 8 2 8 2 8 x3 x3 x3 x3

x7 x7 x7 x7 3 7 3 7 3 7 3 7 x4 x4 x4 x4 x6 x6 x6 x6 x2 x5 x5 x5 x2 x5 4 6 4 6 4 6 4 6 5 5 5 5 Symbol 5 Symbol 6 Symbol 7 Symbol 8

1 x8 1 x8 1 x8 1 x8 2 8 2 8 2 8 2 8

x7 x7 x7 3 7 3 7 3 7 3 7 x6 x6 x5 4 6 4 6 4 6 4 6 5 5 5 5

Figure 7.13: Symbol paths for M = 8 mapping, using Construction 2 [27] symbols do not, resulting in some of the symbols not appearing in all the possible positions. This is true for the symbol paths of any mapping that is not distance optimal.

Next, in Section 6.6 we saw that using an alternative starting matrix, in the multilevel construction, can result in mappings that are closer to being distance optimal. Using the graph representation and symbol paths, a possible explanation for this can be found.

In Figure 7.14 the symbol paths for an M(9, 9, 0) mapping using the usual identity starting matrix, B, are shown. Symbols 1 to 8 connect to all the possible positions, however symbol 9 only connects to position 1. This means that symbol 9 only occurs in position 1 and position 9, and it does not contribute to distance in any of the other positions.

In Figure 7.15 the symbol paths for an M(9, 9, 0) mapping using an alternative starting matrix, given in (6.3), are shown. Only symbols 1 and 2 connect to all the possible positions. In contrast to the previous mapping, symbol 9 connects to more positions in this case. Although the other symbols do not connect to all the positions, overall this mapping produces a better distribution of symbols throughout the positions. As was observed in Chapter 5, a larger sum of distances is obtained if the symbols differ from each other as much as possible.

7-21 7. Comparison and Analysis of Different Mappings

Symbol 1 Symbol 2 Symbol 3 Symbol 4 Symbol 5 1 1 1 1 1 2 9 2 9 2 9 2 9 2 9

3 8 3 8 3 8 3 8 3 8

4 7 4 7 4 7 4 7 4 7 5 6 5 6 5 6 5 6 5 6 Symbol 6 Symbol 7 Symbol 8 Symbol 9 1 1 1 1 2 9 2 9 2 9 2 9

3 8 3 8 3 8 3 8

4 7 4 7 4 7 4 7 5 6 5 6 5 6 5 6

Figure 7.14: Symbol paths for M(9, 9, 0) mapping using B as starting matrix

Symbol 1 Symbol 2 Symbol 3 Symbol 4 Symbol 5 1 1 1 1 1 2 9 2 9 2 9 2 9 2 9

3 8 3 8 3 8 3 8 3 8

4 7 4 7 4 7 4 7 4 7 5 6 5 6 5 6 5 6 5 6 Symbol 6 Symbol 7 Symbol 8 Symbol 9 1 1 1 1 2 9 2 9 2 9 2 9

3 8 3 8 3 8 3 8

4 7 4 7 4 7 4 7 5 6 5 6 5 6 5 6

Figure 7.15: Symbol paths for M(9, 9, 0) mapping using alternative starting matrix

In this section we only presented selected examples of permutation DPMs represented as graphs. Further examples of mappings and symbol paths can be found in Appendix D.

A final observation can be made by looking at the symbol paths in this section, as well as those in Appendix D. For a permutation DCM this is also one of the most important aspects: a symbol path may never merge with itself at another position. Recall that a symbol appears in a certain position after swaps, dictated by the binary input bits. If that symbol appears in the same position, but following another path, it means that two

7-22 7. Comparison and Analysis of Different Mappings different binary input sequences swap that symbol to the same position.

Example 7.8 Figure 7.16(a) and Figure 7.17(a) show the graph representation of two different mappings for M = 6 and δ = 0. Figure 7.16(b) and Figure 7.17(b) show the respective symbol 1 paths for each mapping.

In Figure 7.16(b) the symbol 1 path can be seen merging with itself in position 1. Both binary inputs 000000 and 111111 will have symbol 1 in position 1, with permutation sequences 123456 and 134562 respectively being mapped to. A distance of 6 exists between the binary sequences, while a distance of only 5 exists between permutation sequences, meaning that this can not be a DCM. This mapping is the same as the e0 mapping defined by Construction B in [30], where it was also shown that the construction is not a DCM.

1 1 x1 x1 x6 x6

2 6 2 6

x2 x2 x5 x5

3 5 3 5

x3 x4 x3 x4 4 4 (a) (b)

Figure 7.16: M = 6 non-DCM with (a) graph representation and (b) symbol 1 path

1 1 x1 x1 x6 x6

2 6 2 6

x4 x3 x4

3 5 3 5

x5 x2 4 4 (a) (b)

Figure 7.17: M = 6 DCM with (a) graph representation and (b) symbol 1 path

7-23 7. Comparison and Analysis of Different Mappings

Figure 7.17(b) shows that the symbol 1 path does not merge with itself. In this case the mapping is a DCM, as also shown in [30]. This mapping is the same as the z2m mapping defined by Construction E in [30]. 2

This example also highlights a point we touched on earlier: different mappings can be obtained for the same subgraph, depending on the order in which swaps are done. The subgraphs of K6 in Figure 7.16(a) and Figure 7.17(a) are the same, with only the order in which the swaps are done being different. In this instance one ordering of swaps resulted in a mapping that is not a DCM, while another ordering of swaps resulted in a DCM. Therefore, the subgraph and the ordering of swaps play an important role in whether a mapping will be a DCM or not.

The same principles and observations apply when considering DIMs or DRMs, the only difference being that the number of input bits are less or more than M, respectively.

7.6 Summary

In this chapter a comparison between different mappings was provided, making use of distance sums, simulations and graphs. Simulation results confirmed that the distance sums could be used to predict the performance of mappings, as well as showing that distance optimal mappings perform better than non-optimal mappings. Permutation DPM graphs were introduced as a visual representation of mapping algorithms, helping in the analysis of such mappings.

7-24 Multilevel Construction of 8 Other Mappings

8.1 Introduction

The previous chapters about the multilevel construction only dealt with mappings from binary sequences to permutation sequences. In this chapter we will show that the mul- tilevel construction can also be used for other similar mappings, where either a different set is used to map from or a different set is mapped to.

8.2 Permutations with repeating symbols

We now look at mappings with permutations having repeating symbols. Recall from Chapter 2 that a simplified form of Slepian codes was used. Using (2.1), permutations

were obtained by letting m1 = m2 = ··· = mj = 1. By lifting the constraint that mi = 1 for 1 ≤ i ≤ j, permutations with repeating symbols can be obtained.

Example 8.1 In (2.1), set µ1 = 0, µ2 = 1 and µ3 = 2, as well as setting m1 = 1, m2 = 1

and m3 = 2. Thus permutations of length M will be used, but only consisting of three symbols: 0, 1 and 2. The complete set then is ( ) 0122, 0212, 0221, 1022, 1202, 1220, . 2012, 2021, 2102, 2120, 2201, 2210

Using the multilevel construction and the same rules as set out previously, a mapping from all binary sequences to the sequences in this set can be obtained. Start with an

8-1 8. Multilevel Construction of Other Mappings initial sequence of " # 0 1 0 0 0122 = . 0 0 1 1

As previously, all the possibilities for the various levels are obtained, with

P1 = {0100, 1000},

P2 = {0011, 0101, 1001, 0110, 1010, 1100}, and then choose the multilevel components as

C1 = {0100, 1000},

C2 = {0011, 1001, 0110, 1100}.

This results in the following n = 3 → M = 4 mapping ( ) ( ) 000, 001, 010, 011, 0122, 1022, 2102, 2012, → . 100, 101, 110, 111 0221, 1220, 2201, 2210

This mapping produces a δ = 1 increasing mapping with |E| = 160, while |Emax| = 168, 3 where |C| = 2 , q = 3 and l = 4 are used to calculate the upper bound. 2

We now prove that the multilevel construction generates all the possible permutation sequences with repeating symbols, as we did for normal permutation sequences in Propo- sition 6.2. To make the proof easier, an alternative starting matrix will be used, but as was seen in Proposition 6.3, this is equivalent to using the multilevel identity matrix, B. A starting sequence, similar to the initial vector in Slepian’s Variant I codes, is used with the following symbols m1 m2 mj z1,...,}| 1{, 2z,...,}| 2{,..., j,z .}| . . , j,{

where m1 + m2 + ··· + mj = M. Each unique symbol will be assigned a level, therefore j levels will be used.

Proposition 8.1 If the multilevel permutations, Pk, 1 ≤ k ≤ j are used for the multilevel construction, then it generates all the permutation sequences with repeating symbols, where

8-2 8. Multilevel Construction of Other Mappings the cardinality is M! . j 2 Q mi! i=1

Proof The following starting matrix is used

 m1 m2 mj  z }| { z }| { z }| { 1 ... 1 0 ... 0 ··· 0 ... 0   0 ... 0 1 ... 1 ··· 0 ... 0   .  . . . .   . . .. .    0 ... 0 0 ... 0 ··· 1 ... 1

As before, transpositions can only take place if the two symbols are different and all the symbols below these two are the same. The number of possibilities for the first level is 1, or equivalently C(m1, m1), for the second level the number of possibilities is C(m1 + m2, m2) and for the j-th level the number of possibilities is C(m1 + m2 + ··· + mj, mj).

Pr Let γr = i=1 mi and γr−1 = γr − mr. Then the total number of possibilities is

C(γ1, m1) × C(γ2, m2) × · · · × C(γj, mj) γ ! γ ! γ ! γ ! = 1 × 2 × · · · × j−1 × j m1!(γ1 − m1)! m2!(γ2 − m2)! mj−1!(γj−1 − mj−1)! mj!(γj − mj)! γ! γ! γ ¨¨! γ ! = 1 × 2 × · · · × ¨j−1 × j  ¨ ¨ m1!γ0! m2!γ1! mj−1!¨γj¨−2! mj!¨γj¨−1! γ ! = j γ0!m1!m2! ··· mj! M! = , j Q mi! i=1 where all the γ’s cancel out, except γ0! = 1 and γj! = M!. All the possible permutation sequences with repeating symbols are then generated. 

In Tables C.1–C.3 we list several multilevel components for mappings with repeating symbols, as well as the |E| and |Emax| values for each. The notation R(n, M, δ) is used to differentiate it from the mappings for the usual permutation sequences. In each case the identity sequence, I, is also included to easily see which symbols are repeated.

8-3 8. Multilevel Construction of Other Mappings

8.3 Non-binary sequences to permutation sequences

We saw that the upper bound could only be achieved with the multilevel construction when M = 2l, with l some integer, and q0 = 2 where q0 is the number of symbols used in the input sequences. This leads us to asking: if q0 is some other value besides 2, would the upper bound be achieved for other values of M? As an example, if q0 = 3 and M = 3l with l some integer, will a mapping be obtained that achieves the upper bound? The following example will show that this is indeed the case.

Example 8.2 With q0 = 3 the symbols {0, 1, 2} will be used. A mapping from n = 6 to M = 9 will be considered. The multilevel identity matrix will be " # 0 1 2 0 1 2 0 1 2 . 0 0 0 1 1 1 2 2 2

Using the same transposition rule that was used for the binary case, the multilevel permutations can be found. Since |P1| = 216 and |P2| = 1680, all the possible sequences will not be listed here.

We break n into n1 = 3 for the first level and n2 = 3 for the second level. The following multilevel components are then used

  012012012, 120012012, 201012012,   012120012, 120120012, 201120012,     012201012, 120201012, 201201012,   012012120, 120012120, 201012120,   C1 = 012120120, 120120120, 201120120, ,   012201120, 120201120, 201201120,     012012201, 120012201, 201012201,   012120201, 120120201, 201120201,    012201201, 120201201, 201201201 

8-4 8. Multilevel Construction of Other Mappings

  000111222, 100211022, 200011122,   010121202, 110221002, 210021102,     020101212, 120201012, 220001112,   001112220, 101212020, 201012120,   C2 = 011122200, 111222000, 211022100, .   021102210, 121202010, 221002110,     002110221, 102210021, 202010121,   012120201, 112220001, 212020101,    022100211, 122200011, 222000111 

6 (k) Using the upper bound with q = 9, l = 9 and |C| = 3 = 729, we have |Emax| = 472392 for 1 ≤ k ≤ 9 and |Emax| = 4251528 and this is exactly what this mappings achieves.

In this case however, only a δ = 2 mapping was created and not a δ = 3 mapping. It can be verified using the components that each transposition affects three columns and can thus only build a distance of 3. A distance of 1 between input subsequences will only be able to produce a distance of 3 between permutation sequences and therefore, this can only be a δ = 2 mapping.

Using the equation from Proposition 6.5, we have

dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k) + δ − 1 3 ≥ 2 × 1 + δ − 1 δ ≤ 2,

also showing that a δ = 3 mapping is impossible using this method. 2

The example also illustrates that for non-binary inputs the mappings become very complicated. Where previously a single transposition was assigned to an input bit that is 1, now two different transpositions have to be assigned to an input bit which is either 1 or 2.

Even though the same principles can be used for the multilevel construction as in the binary case, a general theory does not follow directly.

8-5 8. Multilevel Construction of Other Mappings

8.4 Single insertion/deletion correcting codes

In [10], Levenshtein showed that the symmetric group, SM , can be partitioned into M sets, with each set forming an s = 1 insertion/deletion correcting code and containing (M − 1)! words. He used the same binary sequences that Chadwick used in [33], i.e. the binary sequences obtained from the weight of the permutation sequences. Levenshtein showed that if these binary sequences are partitioned according to his usual binary in- sertion/deletion correcting codes, then the corresponding permutation sequences will be partitioned into sets capable of correcting insertion/deletion errors.

We will show that a subset of the multilevel permutation constructions can also be used as insertion/deletion correcting codes, though the subset may not be the same as those of Levenshtein.

The most simple way to construct these codes is by starting with the symmetric group, choosing a sequence to be in the codebook and then removing all the sequences which have the same subword after a single deletion. As an example, if 12345 is chosen as the first sequence, then 13245 may not be included, as both have 1245 and 1345 as subwords, with

12345 −−−−→delete 3 1245 ←−−−−delete 3 13245, 12345 −−−−→delete 2 1345 ←−−−−delete 2 13245.

Equivalently, a sequence can be chosen to be in the codebook, then a symbol is deleted and inserted in any other position in this sequence. All sequences obtained in this way may not be included in the same codebook as the first sequence. This is illustrated in the following example.

Example 8.3 For M = 6, select the sequence 123456 to be in the codebook and delete symbol 1 to obtain the subword 23456. Sequences with the same subword can now be obtained by inserting symbol 1 anywhere into this subword. Symbol 1 can be inserted into any position with an underscore, as in

2 3 4 5 6 .

Each sequence obtained is this way can be described by swaps relative to 123456, as

8-6 8. Multilevel Construction of Other Mappings follows

213456 → 123456 swap(1, 2), 231456 → 123456 swap(1, 2)(2, 3), 234156 → 123456 swap(1, 2)(2, 3)(3, 4), 234516 → 123456 swap(1, 2)(2, 3)(3, 4)(4, 5), 234561 → 123456 swap(1, 2)(2, 3)(3, 4)(4, 5)(5, 6), where the swaps are done from left to right.

The same process can be used for all the other symbols as well. Consider deleting symbol 4, then the subword 12356 is obtained, with symbol 4 being inserted into any position denoted by an underscore in

1 2 3 5 6 .

Again, each sequence obtained can be described by swaps relative to 123456, as follows

412356 → 123456 swap(3, 4)(2, 3)(1, 2), 142356 → 123456 swap(3, 4)(2, 3), 124356 → 123456 swap(3, 4), 123546 → 123456 swap(4, 5), 123564 → 123456 swap(4, 5)(5, 6).

To summarise, if 123456 is in the codebook, all the following sequences may not be included in the same codebook,

Symbol 1 Symbol 2 Symbol 3 Symbol 4 Symbol 5 Symbol 6 213456 213456 312456 412356 512346 612345 231456 132456 132456 142356 152346 162345 234156 134256 124356 124356 125346 126345 234516 134526 124536 123546 123546 123645 234561 134562 124563 123564 123465 123465.

Note that some sequences appear more than once, such as 213456 in both the symbol 1 and symbol 2 columns.

8-7 8. Multilevel Construction of Other Mappings

With 123456 included and the above sequences excluded, we choose the next sequence to include in the codebook, say 214356, and repeat the process. When there is no se- quences left to choose from, the codebook will be a single insertion/deletion correcting codebook. 2

This example clearly shows that any permutation sequences formed by using swap(1, 2), swap(2, 3), swap(3, 4), etc., or certain combinations of these, cannot be in an s = 1 code- book.

Proposition 8.2 If a permutation sequence, say p1p2 . . . pM , is included in a single in- sertion/deletion correcting codebook, then any other permutation sequence obtained by using

1) swap(x, x+1)(x+1, x+2) ··· (x+r−1, x+r), with 1 ≤ x ≤ M −1 and 1 ≤ r ≤ M −x, or

2) swap(x−1, x)(x−2, x−1) ··· (x−r0, x−r0 +1), with 2 ≤ x ≤ M and 1 ≤ r0 ≤ x−1,

on p1p2 . . . pM may not be included in the same codebook. 2

Proof Let p1p2 . . . pM be included in an s = 1 insertion/deletion correcting codebook. To obtain all the sequences that have the same subword as the included sequence, a single symbol is deleted and again inserted in all the other possible positions. Since every symbol is unique in a permutation sequence, the symbols in every possible position must be considered when deleting.

Suppose the symbol in position x, 1 ≤ x ≤ M, is deleted and inserted into position y. Recall from Definition 3.1 that a deletion shifts all the symbols following the deleted symbol to the left and that an insertion shifts all the symbols following the inserted symbol to the right. Thus, a deletion in position x followed by an insertion in position y will cause all the symbols between positions x and y to be shifted left or right, depending whether x < y or x > y. Since all the symbols are shifted left or right when the deleted symbol is again inserted, the whole process can be described using swaps. Equivalently, the symbol in position x is repeatedly swapped with the symbol next to it, until it reaches position y.

First, if x < y, then the symbols between positions x and y will be shifted to the left. We use swap(x, x + 1)(x + 1, x + 2) ··· (y − 1, y) to transform p1p2 . . . pM into

8-8 8. Multilevel Construction of Other Mappings

p1p2 . . . px−1px+1 . . . pypxpy+1 . . . pM . In this case, it holds that 1 ≤ x ≤ M − 1 and x + 1 ≤ y ≤ M. Let r = y − x, then swap(x, x + 1)(x + 1, x + 2) ··· (x + r − 1, x + r) is used to make the swaps, and

x + 1 ≤ x + r ≤ M ⇒ 1 ≤ r ≤ M − x.

Second, if x > y, then the symbols between positions x and y will be shifted to the right. We use swap(x − 1, x)(x − 2, x − 1) ··· (y, y + 1) to transform p1p2 . . . pM into p1p2 . . . py−1pxpy . . . px−1px+1 . . . pM . In this case, it holds that 2 ≤ x ≤ M and 1 ≤ y ≤ x − 1. Let r0 = x − y, then swap(x − 1, x)(x − 2, x − 1) ··· (x − r0, x − r0 + 1) is used to make the swaps, and

1 ≤ x − r0 ≤ x − 1 ⇒ 1 ≤ r0 ≤ x − 1.

Any sequence obtained by using these swaps on p1p2 . . . pM will result in a sequence which has the same subword after a single deletion as p1p2 . . . pM , and can therefore not be included in the same s = 1 insertion/deletion correcting codebook. 

At first glance it would seem that we only need to discard the first level in the multilevel construction, as these are the same transpositions that are not allowed.

Example 8.4 An M = 8 DCM can be found, which at the same time is an s = 1 insertion/deletion correcting code. The following multilevel components are used

C1 = {01010101},   00110011, 10010011, 01100011, 11000011,   00111001, 10011001, 01101001, 11001001, C2 = , 00110110, 10010110, 01100110, 11000110,    00111100, 10011100, 01101100, 11001100    00001111, 10000111, 01001011, 11000011,   00101101, 10100101, 01101001, 11100001, C3 = . 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000 

In this case, Hamming distance has been sacrificed for the insertion/deletion correcting capability, since the first level was not used. Where |Emax| = 458752 for a distance optimal

8-9 8. Multilevel Construction of Other Mappings mapping, this s = 1 permutation mapping only achieves |E| = 393216. The minimum

Levenshtein distance for the resulting codebook has been calculated as min{dL} = 4, confirming that it is indeed an s = 1 codebook. 2

Proposition 8.2 showed that swaps of the form swap(1, 2)(2, 3)(3, 4) ··· cannot be used, however, recall from Remark 6.1 that only swap(1, 2), swap(3, 4), etc. are used for the first level. Therefore, swap(1, 2), swap(3, 4) or any of the other swaps on their own cannot be used, but swap(1, 2)(3, 4) or any other combination can be used as they are not in the form of the transpositions to be excluded.

Since we have freedom in how the input bits can be assigned in certain cases, we only have to ensure that the transpositions on the first level do not appear as a single transposition per input bit. Therefore, if the first level swaps can appear together in combinations per input bit, the first level can still be used in the construction.

Example 8.5 The following is the multilevel components for an M = 8 DCM and s = 1 insertion/deletion correcting code, with

C1 = {01010101, 10100101, 01011010, 10101010},

C2 = {00110011, 11000011, 00111100, 11001100},   00001111, 10000111, 01001011, 11000011,   00101101, 10100101, 01101001, 11100001, C3 = . 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000 

The first level components are obtained as follows

 swap(1, 2), (3, 4) → 10100101  01010101 swap(5, 6), (7, 8) → 01011010   swap(1, 2), (3, 4), (5, 6), (7, 8) → 10101010.

It can be seen that all the input bits for the first level are assigned combinations of swaps.

In this case an s = 1 codebook is found which at the same time attains the upper bound of |Emax| = 458752. 2

By carefully choosing the first level components in the multilevel construction, s = 1 insertion/deletion correcting permutation DPMs can be created. The following proposi-

8-10 8. Multilevel Construction of Other Mappings tion formally states the necessary requirements to create such a DPM, following the same structure as Proposition 6.5.

Proposition 8.3 For 1 ≤ k ≤ L, choose a subset of the multilevel permutations, Pk, to form the multilevel components, Ck, such that Ck ⊆ Pk, and assign input bits of length

nk nk to each possibility in Ck, such that |Ck| = 2 with n1 + n2 + ··· + nL = n. An s = 1 insertion/deletion correcting DPM from binary sequences to permutation sequences is obtained if

1) dH (ci,1, cj,1) ≥ 4dH (xi,1, xj,1), for DRMs and DCMs, or

2) dH (ci,1, cj,1) ≥ 4dH (xi,1, xj,1) + δ − 1, for DIMs, for all i 6= j and

1) dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k), for DRMs and DCMs, or

2) dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k) + δ − 1, for DIMs,

for 2 ≤ k ≤ L and all i 6= j. 2

Proof Proposition 8.2 has shown sequences obtained by using swap(x, x + 1)(x + 1, x + 2) ··· (x + r − 1, x + r) or swap(x − 1, x)(x − 2, x − 1) ··· (x − r0, x − r0 + 1) may not be included in an s = 1 codebook. Also, according to Remark 6.1, only swap(1,2), swap(3,4), swap(5,6), ... are used for the first level. Since swap(2,3), swap(4,5), swap(6,7), ... are not used for the first level, the only swaps to be excluded are those when r = r0 = 1.

Thus, for the first level swaps of the form swap(x, x + 1), x ∈ {1, 3, 5,...} must be excluded but swaps of the form swap(x, x + 1)(x + 2, x + 3) or any other combination are permissible. Combinations of two or more first level swaps can then be assigned to an input bit. Since each single swap contributes a distance of 2, two or more swaps will contribute a distance of 4 or more. Accordingly, for the first level

1) dH (ci,1, cj,1) ≥ 4dH (xi,1, xj,1), for DRMs and DCMs, or

2) dH (ci,1, cj,1) ≥ 4dH (xi,1, xj,1) + δ − 1, for DIMs,

8-11 8. Multilevel Construction of Other Mappings must be satisfied for all i 6= j.

Swaps for other levels are all permissible as none of them are in the form of those in Proposition 8.2. As in Proposition 6.5, for levels 2 ≤ k ≤ L

1) dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k), for DRMs and DCMs, or

2) dH (ci,k, cj,k) ≥ 2dH (xi,k, xj,k) + δ − 1, for DIMs, must be satisfied for all i 6= j.

Since the mappings from this construction form a subset of the DPMs from Propo- sition 6.5, it follows directly that these mappings are also DPMs, and thus s = 1 inser- tion/deletion correcting DPMs. 

It is important to note that this construction of s = 1 insertion/deletion correcting DPMs is only valid for the usual mapping of binary sequences to permutation sequences, as in Chapter 6. Permutation sequences with repeating symbols (as in Section 8.2) do not have the same structure as the usual permutation sequences, since any of the symbols can be repeated any number of times. The previous two propositions do not generalise to permutation sequences with repeating symbols, and will have to be adapted to each specific case.

8.5 Summary

In this chapter the multilevel construction was extended to other mappings. Mappings from binary sequences to permutation sequences with repeating symbols were considered as well as mappings from non-binary sequences to permutation sequences. A subset of the multilevel construction’s mappings was also shown to have single insertion/deletion correcting capabilities.

8-12 Binary Permutation Codes as 9 Subsets of Levenshtein Codes

9.1 Introduction

It can be shown that long binary sequences obtained by concatenating the columns of (0, 1)-matrices, derived from permutation sequences, are subsets of other well known codes. Our new work presented here shows that these binary sequences are subsets of the Levenshtein insertion/deletion correcting codes. In addition, as part of his research for his doctoral thesis, Ouahada [140] showed that these binary sequences are also subsets of higher order spectral null (HOSN) codes and run-length limited codes. A possible appli- cation of these sequences was shown by Ouahada et al [141], where it was suggested that HOSN codes can be used together with OFDM on a power-line communication channel.

Blake, Cohen and Deza [13] made use of a similar permutation to binary transforma- tion to decode permutation array codes. The permutation array forms an (n, k, d) q-ary code, which is transformed to an (nq, k, 2d) binary code which is decodable using majority logic.

9.2 Preliminaries

As we have seen, permutation sequences can be written in the passive form as 12 ...M. Alternatively, each of the integers in this passive form can be written as a binary sequence of length M, with the integer value indicating where a one is to appear and zeros elsewhere. As an example for M = 4, the integers 1, 2, 3 and 4, are converted to binary sequences,

9-1 9. Binary Permutation Codes as Subsets of Levenshtein Codes as in 1 → 1000, 2 → 0100, (9.1) 3 → 0010, 4 → 0001. If the permutation sequence is 2431, then the equivalent binary sequence after the trans- formation is 0100000100101000. Therefore, each of the M! permutation sequences from 2 SM can be converted to binary sequences of length M . This is also equivalent to writing the permutation as a (0, 1)-matrix,

  0 0 0 1   1 0 0 0   , 0 0 1 0   0 1 0 0 with a single binary one in each row and each column. The binary sequence is then constructed using the columns. We will use λ = 1 to denote that only one binary one is allowed in each row and each column. In a later section the results will be extended to other λ as well.

After converting all the permutation sequences of length M from SM to binary se- 2 quences, the binary permutation code, P1(M ), is defined as the code containing all these 2 2 2 binary sequences of length M . The cardinality of P1(M ) is |P1(M )| = M!.

2 In general, Pλ(M ) will be used to denote the code containing all the possible binary sequences that is obtained from (0,1)-matrices with λ ones in each row and each column.

Levenshtein [97] showed that the 2n binary sequences of length n can be partitioned into codebooks, each capable of correcting a single insertion or deletion error. If x = x1x2 ··· xn, then the binary sequences can be partitioned by using

n X ixi ≡ a (mod m), i=1 for a fixed a, where 0 ≤ a ≤ m − 1. The sequences are thus partitioned into m distinct codebooks, where each codebook is denoted by the integer a. Let La(n) denote the Levenshtein codebook in partition a. Levenshtein’s first class of codes, require that m ≥ Pn n + 1. To simplify the calculations to follow, let σ = i=1 ixi.

9-2 9. Binary Permutation Codes as Subsets of Levenshtein Codes

9.3 Sequences with λ = 1

First we will show as an example that sequences for M = 3 are a subset of the Levenshtein codes.

Example 9.1 For M = 3 the permutations from S3, the equivalent binary sequences and the σ values are 123 → 100010001, σ = 1 + 6 + 9 = 15, 132 → 100001010, σ = 1 + 7 + 8 = 15, 213 → 010100001, σ = 2 + 4 + 9 = 15, 231 → 010001100, σ = 2 + 6 + 7 = 15, 312 → 100100010, σ = 3 + 4 + 8 = 15, 321 → 100010100, σ = 3 + 6 + 7 = 15.

With n = M 2 = 9 and m = n+1 = 10, σ ≡ a (mod 10), which results in all the sequences being a subset of the Levenshtein code in the a = 5 partition. 2

2 2 We will now prove for the general case that P1(M ) ⊂ La(n), with n = M , m = n+1 and some fixed a, 0 ≤ a ≤ n.

2 Proposition 9.1 The binary permutation code, P1(M ), is a subset of the Levenshtein code, La(n), with

2 1) P1(M ) ⊂ L0(n) if M is even,

2 2) P1(M ) ⊂ L M2+1 (n) if M is odd. 2 2

Proof As we saw in (9.1) and Example 9.1, each sequence of length M 2 consists of M subsequences of length M. Since it is derived from a permutation, these subsequences will always be present, just in different positions. Therefore, each subsequence is shifted mul- tiples of M relative to each other in the larger sequence. Using an arbitrary permutation sequence, p1p2 . . . pM , σ can be calculated as

σ = p1 + (p2 + M) + (p3 + 2M) + (p4 + 3M) + ··· + (pM + (M − 1)M)

= (p1 + p2 + p3 + ··· + pM ) + (M + 2M + 3M + ··· + (M − 1)M), showing that the actual positions of the integers play no role in the sum.

9-3 9. Binary Permutation Codes as Subsets of Levenshtein Codes

Then for

P2 M = 2, σ = (1 + 2) + 2 = i=1[i + 2(i − 1)], P3 M = 3, σ = (1 + 2 + 3) + 3(1 + 2) = i=1[i + 3(i − 1)], P4 M = 4, σ = (1 + 2 + 3 + 4) + 4(1 + 2 + 3) = i=1[i + 4(i − 1)], P5 M = 5, σ = (1 + 2 + 3 + 4 + 5) + 5(1 + 2 + 3 + 4) = i=1[i + 5(i − 1)], P6 M = 6, σ = (1 + 2 + 3 + 4 + 5 + 6) + 6(1 + 2 + 3 + 4 + 5) = i=1[i + 6(i − 1)], ...... and for M in general

σ = (1 + 2 + ··· + M) + M(1 + 2 + ··· + (M − 1)) M M X X = i + M (i − 1) i=1 i=1 M M−1 X X = i + M i i=0 i=0 M(M + 1) M 2(M − 1) = + 2 2 ¨M¨2 + M + M 3 − ¨M¨2 = 2 M = (M 2 + 1), 2 making use of the identity n X n(n + 1) i = . 2 i=0

For Levenshtein codes, σ ≡ a (mod n + 1), then with n = M 2 it is required that

M (M 2 + 1) ≡ a (mod M 2 + 1). 2

M 2 1) If M is even, then 2 will be some integer, say r, and σ will be divisible by M + 1 such that r(M 2 + 1) ≡ a (mod M 2 + 1) ⇒ a = 0.

2 Thus, for M even, P1(M ) ⊂ La(n) with a = 0.

9-4 9. Binary Permutation Codes as Subsets of Levenshtein Codes

M 1 2) If M is odd, then 2 will be some value, say r + 2 where r is some integer. Then,

1 σ = (r + )(M 2 + 1) 2 M 2 + 1 = r(M 2 + 1) + , 2

and M 2 + 1 M 2 + 1 r(M 2 + 1) + ≡ a (mod M 2 + 1) ⇒ a = . 2 2

Thus, for M odd, P (M 2) ⊂ L (n) with a = M 2+1 . 1 a 2 

9.4 Other λ sequences as permutation matrices

The (0,1)-matrices with λ ones in every row and every column can be seen as a combination of permutations.

Example 9.2 Consider for M = 4 the following matrix   1 0 1 0   0 1 1 0   , 1 0 0 1   0 1 0 1 which as a sequence can be written as (13)(24)(12)(34), with the integers indicating where the one appears in each column. The matrix is constructed from two λ = 1 permutation matrices, as in       1 0 0 0 0 0 1 0 1 0 1 0       0 0 1 0 0 1 0 0 0 1 1 0   ⊕   =   , 0 0 0 1 1 0 0 0 1 0 0 1       0 1 0 0 0 0 0 1 0 1 0 1 which can also be expressed as 1423 + 3214 → (13)(24)(12)(34). (We can use + instead of ⊕ to add the two λ = 1 matrices, as in this case exactly the same λ = 2 matrix will be obtained.) Other λ = 2 matrices can then be obtained by permuting the columns of this matrix, or equivalently, permuting the symbols inside the parentheses. 2

9-5 9. Binary Permutation Codes as Subsets of Levenshtein Codes

However, a permutation sequence cannot be combined with itself, as this would not form a valid λ sequence, such as 1234 + 1234 → (1)(2)(3)(4). Similarly, permutation sequences where the symbols agree in a certain position, are also not allowed, such as 1234 + 3241 → (13)(2)(34)(14), where there is only one symbol in the second position. Thus, any M permutation sequence can be combined with another permutation sequence, provided the distance between the two sequences is M. It is permissible to have the same symbols, as in 1234 + 2143 → (12)(12)(34)(34), where (12) and (34) are repeated.

Similar to the permutation sequences or λ = 1 matrices having an identity sequence with zero weight, the λ-matrices can have several identity sequences with zero weight. Recall from (2.3) how the weight was calculated. Zero weight is only obtained when the symbols are arranged from smallest to largest, as in the identity sequence 12 ...M, and obviously 1 < 2 < ··· < M.

Similarly, if the following is defined to hold for λ = 2 sequences,

(12) < (13) < ··· < (1M) < (23) < (24) < ··· < (M − 2,M) < (M − 1,M), (9.2) then it can be determined which sequences have zero weight and these sequences will be the identity sequences.

Example 9.3 The following sequences are the zero weight identity sequences for M = 4 and λ = 2 (12)(13)(24)(34), (12)(14)(23)(34), (13)(14)(23)(24), (12)(12)(34)(34), (13)(13)(24)(24), (14)(14)(23)(23).

Using (9.2) it can be verified that the “symbols” in each sequence are arranged from smallest to largest. Now, when these sequences are permuted, using the normal permu- tations from S4, all the possible λ = 2 sequences are obtained. Note however that for the last three sequences using all the 4! permutations from S4 are not going to produce 4! unique sequences, since permuting the first and second “symbols” is going to result in the same sequence, as will permuting the third and fourth “symbols”. More specifically, 4! these identity sequences will only produce 4 sequences. 2

9-6 9. Binary Permutation Codes as Subsets of Levenshtein Codes

Table 9.1: Number of identity sequences

λ M 2 3 4 5 6 7 8 1 1 1 1 1 1 1 1 2 – 1 6 22 130 822 6202 3 – – 1 22 550 16700 703297 4 – – – 1 130 16700 3330915 5 – – – – 1 822 703297 6 – – – – – 1 6202 7 – – – – – – 1

In Table 9.1 we list the number of identity sequences for different values of M and λ.

Considering that these codes’ cardinalities are obtained by multiplying the number of identity sequences by M!, it is clear that codes with much higher rates can be obtained if permutation codes with λ 6= 1 are used. High rate “permutation” trellis codes can be created by constructing DPMs from binary sequences to these permutation codes. However, this is left as future research and we return to these codes being subcodes of the Levenshtein codes in the next section.

9.5 Sequences with any λ

In a similar manner to Section 9.3, it can be shown that (0, 1)-matrices with other λ-values are also subsets of the Levenshtein code.

2 Proposition 9.2 The binary permutation code, Pλ(M ), is a subset of the Levenshtein code, La(n), with

2 1) Pλ(M ) ⊂ L0(n), if M is even and λ is any integer (λ ∈ {1, 2,...M − 1}),

2 2) Pλ(M ) ⊂ L0(n), if M is odd and λ is even (λ ∈ {2, 4,...M − 2}),

2 3) Pλ(M ) ⊂ L M2+1 (n), if M is odd and λ is odd (λ ∈ {1, 3,...M − 1}). 2 2

Proof As Example 9.2 has shown, any λ = 2 (0,1)-matrix can be constructed by adding M 2 two λ = 1 (0, 1)-matrices together. For each λ = 1 sequence, σ = 2 (M + 1) and thus for M 2 M 2 any λ = 2 sequence, the σ values can be added together, σ = 2 (M + 1) + 2 (M + 1) = 2 M 2 M(M + 1). For λ in general, σ = λ 2 (M + 1).

9-7 9. Binary Permutation Codes as Subsets of Levenshtein Codes

M 1) As before, with M even, 2 will be some integer r, then

λr(M 2 + 1) ≡ a (mod M 2 + 1) ⇒ a = 0.

2 Thus, for M even and λ ∈ {1, 2,...M − 1}, Pλ(M ) ⊂ La(n) with a = 0.

M 1 2) Similarly, with M odd, 2 will be some value r + 2 where r is some integer, then

1 σ = λ(r + )(M 2 + 1) 2 λ = (λr + )(M 2 + 1) 2 λ = λr(M 2 + 1) + (M 2 + 1) 2 = λr(M 2 + 1) + q(M 2 + 1),

λ with 2 being some integer q if λ is even. It follows that

(λr + q)(M 2 + 1) ≡ a (mod M 2 + 1) ⇒ a = 0.

2 Thus, for M odd and λ even, Pλ(M ) ⊂ La(n) with a = 0.

λ 1 3) If λ is odd, then 2 will be some value q + 2 where q is some integer, then

λ σ = λr(M 2 + 1) + (M 2 + 1) 2 1 = λr(M 2 + 1) + (q + )(M 2 + 1) 2 1 = λr(M 2 + 1) + q(M 2 + 1) + (M 2 + 1) 2 1 = (λr + q)(M 2 + 1) + (M 2 + 1). 2

It follows that

1 M 2 + 1 (λr + q)(M 2 + 1) + (M 2 + 1) ≡ a (mod M 2 + 1) ⇒ a = . 2 2

Thus, for M odd and λ odd, P (M 2) ⊂ L (n) with a = M 2+1 . λ a 2 

It is interesting to note that for M even and λ any integer, 1 ≤ λ ≤ M − 1, all the binary sequences are a subset of the Levenshtein code in partition a = 0. Stated

9-8 9. Binary Permutation Codes as Subsets of Levenshtein Codes mathematically, for M even, we have

2 2 2 P1(M ) ∪ P2(M ) ∪ · · · ∪ PM−1(M ) ⊂ L0(n).

M 2+1 For M odd, the binary sequences are split between partitions a = 0 and a = 2 , depending on λ being even or odd. Mathematically, for M odd we have

2 2 2 P2(M ) ∪ P4(M ) ∪ · · · ∪ PM−1(M ) ⊂ L0(n), and 2 2 2 P1(M ) ∪ P3(M ) ∪ · · · ∪ PM−2(M ) ⊂ L M2+1 (n). 2

The matrices with λ = 0 and λ = M can also be shown to be subsets of the Levenshtein 2 2 codes, but these are trivial as P0(M ) only consists of the all-zeros sequence and PM (M ) consists of only the all-ones sequence.

9.6 Subsets of other codes

2 In addition to being a subset of the Levenshtein codes, Pλ(M ) codes are also subsets of higher order spectral null (HOSN) codes as well as run-length limited (d, k)-codes. Since this does not form part of our work, we will only be presenting the main propositions without any proofs and none of the background theory.

2 Proposition 9.3 [140] The P1(M ) code is a subset of the HOSN codes with nulls at frequency multiples of f = 1/M. 2

2 2 It is clear that for P1(3 ) and P1(4 ) we have HOSN codes with nulls at frequency multiples of 1/3 and 1/4 respectively, as depicted in Figure 9.1 and Figure 9.2.

2 Proposition 9.4 [140] The Pλ(M ) code, with λ ∈ {1, 2,...,M − 1}, is a subset of the

HOSN codes with nulls at frequency multiples of f = 1/M. 2

2 Proposition 9.5 [140] The PM/2(M ) code is a subset of the HOSN codes with nulls at frequency multiples of f = 1/M, as well as being dc-free codes. 2

9-9 9. Binary Permutation Codes as Subsets of Levenshtein Codes

2

1.5

1 P.S.D. 0.5

0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalised Frequency

2 Figure 9.1: Power spectral density of P1(3 )

4

3

2 P.S.D. 1

0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalised Frequency

2 Figure 9.2: Power spectral density of P1(4 )

2

1.5

1 P.S.D. 0.5

0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalised Frequency

2 Figure 9.3: Power spectral density of P2(4 )

9-10 9. Binary Permutation Codes as Subsets of Levenshtein Codes

2 As an example, in Figure 9.3 we can see that the P2(4 ) code is dc-free, in addition to having nulls at multiples of f = 1/4.

This is similar to the result of Ferreira et al [69], which showed that higher order spectral null codes are subcodes of the balanced Levenshtein codes. Our new results and 2 those of Ouahada [140] show that Pλ(M ) sequences are subcodes of both the Levenhstein codes and the higher order spectral null codes.

2 Proposition 9.6 [140] The P1(M ) code is a subset of the (d, k)-codes with d = 0 and k = 2M − 2. 2

2 Proposition 9.7 [140] The Pλ(M ) code, with λ ∈ {1, 2,...,M − 1}, is a subset of the

(d, k)-codes with d = 0 and k = 2M − 2λ. 2

To summarise, permutation sequences of length M as binary sequences of length M 2 and λ = 1, have the following properties

1) cardinality of M!,

2) constant weight M sequences, with minimum Hamming distance of 4,

3) run-length limited (d, k)-sequences with d = 0 and k = 2M − 2,

4) subset of the Levenshtein codes, with minimum Levenshtein distance of 4,

1 5) spectral null codes, with nulls at multiples of f = M .

Equivalent permutation sequences of length M as binary sequences of length M 2 and λ any value, have the following properties

1) constant weight λM sequences, with minimum Hamming distance of 4,

2) run-length limited (d, k)-sequences with d = 0 and k = 2M − 2λ,

3) subset of the Levenshtein codes, with minimum Levenshtein distance of 4,

1 4) spectral null codes, with nulls at multiples of f = M .

9-11 9. Binary Permutation Codes as Subsets of Levenshtein Codes

2 Table 9.2 compares the cardinalities for the various codes with that of selected Pλ(M ) codes.

2 The values for |Pλ(M )|, 2 ≤ λ ≤ 5 can be found as the number of M × M ar- 2 2 2 rays containing λ ones in each row and each column. |P2(M )|, |P3(M )|, |P4(M )| and 2 |P5(M )| can be found on the “On-line Encyclopedia of Integer Sequences” [142] as se- 2 quences A001499, A001501, A058528 and A075754 respectively. |P2(M )| can also be found using the following recursion equation [143]

n(n − 1) a(n) = [2a(n − 1) + (n − 1)a(n − 2)] , 2 or using [144]

1 a(n) = n(n − 1)2 (2n − 3)a(n − 2) + (n − 2)2a(n − 3) . 2

2 Complex algorithms are available to calculate |Pλ(M )| for other values of λ, but that is beyond the scope of this thesis.

|A(n, w, d)| is the cardinality of the constant weight binary codes of length n, weight w and minimum Hamming distance of d. Tables with the largest cardinalities found for this class of codes can be found in [145] and [146]. Note that for some of the entries in Table 9.2 no value could be found in the references cited. The cardinalities of the d = 4 2 constant weight codes are included, as the Pλ(M ) codes also have a minimum Hamming distance of 4.

2 Table 9.2: |Pλ(M )| compared to cardinalities of other codes

Code M 3 4 5 6 2 |P1(M )| 6 24 120 720 2 |P2(M )| 6 90 2040 67950 2 |P3(M )| 1 24 2040 297200 2 |P4(M )| 0 1 120 67950 2 |P5(M )| 0 0 1 720 |A(M 2,M, 4)| 12 140 2334 – |A(M 2, 2M, 4)| 12 1170 140605 – |A(M 2, 3M, 4)| 1 140 – – 2 |L0(M )| 52 3856 1290556 1857283156 HOSN 56 1810 17318417 –

9-12 9. Binary Permutation Codes as Subsets of Levenshtein Codes

2 The values for |L0(M )| can be found using the following equation [120]

1 X |L (n + 1)| = φ(d)2n/d, n ≥ 1, 0 2n odd d|n where the sum is over all odd divisors d of n and φ is the Euler totient function.

2 We see that the cardinality of the Pλ(M ) codes are very low when compared with the three other codes with similar properties. However, considering that of the 52 n = 9 Lev- enshtein code words, only 8 have a weight of 3 and only 8 have a weight of 6, it compares 2 2 more favourably with |P1(3 )| = 6 and |P2(3 )| = 6. Of the 3856 n = 16 Levenshtein code words, 108 have a weight of 4, 758 have a weight of 8 and 108 have a weight of 12, which 2 2 2 are compared with |P1(4 )| = 24, |P2(4 )| = 90 and |P3(4 )| = 24 respectively. This shows that the cardinality of a constant weight code with insertion/deletion correction 2 2 properties is already closer to that of the Pλ(M ) codes. Considering that the Pλ(M ) codes also possess further properties of other codes, we can conclude that the cardinalities are not that low.

9.7 Summary

In this chapter it was shown that binary permutation sequences are subsets of Leven- shtein’s single insertion/deletion correcting codes. These sequences were also shown to possess other interesting properties. A comparison between the cardinalities of these codes and codes with similar properties were done.

9-13 10 Conclusion

10.1 Achievements

As introduction and motivation for this research, we looked at permutation trellis codes in a power-line communication scheme. Simulation results showed that the scheme provides significant performance improvements over those of uncoded communications, however, certain results raised questions about the optimality of mappings used in the permutation trellis codes. In conclusion, these results showed that the permutation codes definitely could be used in the proposed situations, but to achieve optimum results we had to further investigate the mappings themselves.

This led to the presentation of the upper bound on the sum of distances that a mapping from binary sequences to permutation sequences can attain, followed by a generalised upper bound on the sum of distances that any mapping can attain. We showed that similar bounds for the q-ary codes and the permutations codes are special cases of this general upper bound. In conclusion, this upper bound proves to be useful in comparing different mappings and using it to predict the performance of a code. Since distance plays a key role in error correction codes, this bound can also play an important part in analysing these codes. However, it should be kept in mind that a known “good” mapping or code will in general attain the upper bound, but an unknown mapping or code attaining the upper bound does not imply that it is “good”.

We then presented the new multilevel construction to create distance-preserving map- pings. It was showed how DCMs, DIMs and DRMs can be created, with some attaining the upper bound on the sum of distances, while the others were very close to the upper

10-1 10. Conclusion bound. Suggestions were made on how the sum of distances could be increased to be even closer. In conclusion, although this construction does not provide us with a mapping for M in general, it simplifies the process of finding one by breaking it down into smaller mappings. For instance, to map n = 16 binary sequences to M = 16 permutation se- quences requires one to choose 65536 permutation sequences for the binary sequences to map to, while at the same time preserving the distance. With the new construction this can be broken down to four mappings of n = 4 to M = 16, which only require 16 binary sequences in each smaller mapping to be mapped while preserving the distance.

The mappings used in the simulation results were investigated using our new knowl- edge regarding the upper bound and distance optimality. The distance optimality of the previous known mappings was also compared with the new ones found using the multi- level construction. In conclusion, we confirmed that the sum of distances of mappings can to a certain extent be used in predicting the performance of permutation trellis codes. Also, we saw how the distance optimality of previous mappings decreased as the size of M increased. The multilevel construction showed that to increase the distance optimality one has to increase the number of transpositions used as M increases. This can be used as a starting point for any future construction algorithm for M in general. We also showed that representing the mappings as graphs can aide us in understanding the properties of permutation DPMs. Certain aspects which are not evident from a mapping algorithm can easily be observed in the graph representation of the mapping algorithm.

It was also shown how the multilevel construction can be used for mappings using per- mutations with repeating symbols, mappings using non-binary input sequences and map- pings that produce single insertion/deletion correcting permutation codes. This showed that the construction is useful for finding other types of mappings as well. To our knowl- edge, this is the first construction that creates permutation DPMs that can correct inser- tion/deletion errors as well. All the previous constructions assigned a single input to a swap, and it was seen that swaps of symbols next to each other, assigned to a single bit, are not allowed in an insertion/deletion correcting code.

We also showed that long binary sequences, derived from (0,1) permutation matrices, are subsets of the Levenshtein insertion/deletion correction codes. Although no real ap- plication exists for this yet, it is an interesting property, considering that other research has also shown it to be subsets of constant weight codes, higher order spectral null codes and run-length limited codes. If an application is found where all these codes’ properties

10-2 10. Conclusion are required, then the permutation derived binary sequences would be the ideal candidate code.

10.2 Further research

The obvious next step for a construction is to construct permutation mappings that attain the upper bound for all values of M. It seems that using the same approach as we used here, will not yield the desired result, as it is still based on binary principles. We saw that for M = 2l with l some integer, the upper bound is attained, and these are exactly the binary values. The permutation graphs also showed that a construction attaining the upper bound for all M values will not make use of a simple algorithm.

We also saw that using different mappings, all attaining the upper bound, we achieved different performance results when making use of permutation trellis codes. This may be explained by the fact that the extra distance available from permutations are distributed differently in each mapping. This suggests that to optimise the performance, one would have to specifically design a mapping for a certain convolutional base code. One should be able to determine the critical entries in the distance matrix by investigating the con- volutional code and then use the new multilevel construction to design the mapping in such a way to achieve higher distances in these critical positions.

Example 8.2 showed that for other q and M values the upper bound can be obtained for permutation mappings following a similar multilevel construction. It should be possible to further extend the construction to any value of q, while achieving the upper bound for M = ql with l some integer, using the same idea as in the example.

In the simulations the same probability for background noise was used on all sub- channels. In practice however, these probabilities will differ from sub-channel to sub- channel. In such a case it might be more advantageous to use permutation codes with repeating symbols, where frequencies can be used more than once, as in Section 8.2. As an example, instead of using 1432 one can use 1341, using frequency 1 on the sub-channel with the lowest error probability. Our construction can generate such mappings, and it would be interesting to see how these perform on a channel with different sub-channels.

While we only considered the noise on power-lines, one would also be able to use the

10-3 10. Conclusion permutation trellis codes on other channels, such as wireless channels with fading, similar to the work of Shum [58]. In such a case the signal deteriorates and fades away, with the receiver unable to detect any signal. If the fading is the same over all sub-channels, then it is possible to have an all-zero received matrix. The required error correcting capability will thus be determined by how long the fading is expected to last. If the fading lasts for short periods then convolutional codes with longer constraint lengths can be used, however for fading that lasts very long this becomes impractical and interleaving can then be used.

Further research is possible into the use of graphs to construct new permutation map- pings. Where we used it to compare and analyse mappings, and only made basic obser- vations, it could be possible to make use of graph theory to further develop this concept. Using this knowledge it could then be possible to construct new mapping algorithms.

There are also no bounds or cardinalities for sets of sequences with λ > 1 for a given minimum Hamming distance, which would be similar to the work that Frankl and Deza [11] did for the permutation sequences (λ = 1 sequences). The equations and methods used to enumerate the λ (0,1)-matrices gives an indication of the complexity that might be involved in finding such bounds and cardinalities. While theoretical bounds might be out of reach for the time being, finding the cardinalities for these sequences, and thereby setting the lower bound, can be achieved relatively easily by using computer searches. The cardinalities found in such a way can be of value in giving clues to the nature of the theoretical bounds.

10-4 Convolutional Codes used for A Simulations

The parameters of the convolutional codes used for the simulations in Sections 4.5 and 7.4 are listed in Table A.1.

Table A.1: Convolutional codes used in simulations

Rate ν dfree Generator sequences 7 5 R = 1/2 2 5 8 4 5 6 7 R = 1/4 2 8 8 7 5 0 0 0 0 0 7 0 0 R = 4/5 2 2   0 0 0 5 0 0 0 0 0 5 8 7 5 0 0 R = 3/4 2 3 0 0 7 0 0 0 0 5 8 7 5 0 0 0 R = 3/5 2 4 0 0 7 5 0 0 0 0 0 7 8 7 5 0 0 0 0 R = 3/6 2 5 0 0 7 5 0 0 0 0 0 0 7 5 8 7 5 0 0 0 0 0 0 0 0 7 5 0 0 0 0 R = 4/8 2 5   0 0 0 0 7 5 0 0 0 0 0 0 0 0 7 5 8

A-1 Permutation B Distance-Preserving Mappings

B.1 Permutation distance-conserving mappings

Table B.1: Permutation distance-conserving mappings

M(n, M, δ) Multilevel construction |E| |Emax| C = {0101, 1001, 0110, 1010} M(4, 4, 0) 1 768 768 C2 = {0011, 1001, 0110, 1100}

C1 = {01010, 10010, 01100, 10100}

M(5, 5, 0) C2 = {00110, 10010, 01100, 11000} 3712 4090

C3 = {00001, 10000}

C1 = {00101, 10001, 00110, 10010} ∗ M(5, 5, 0) C2 = {01000, 10000} 3776 4090

C3 = {00011, 01001, 00110, 01100} ( ) 010101, 100101, 011001, 101001, C1 = 010110, 100110, 011010, 101010 M1(6, 6, 0) 19456 20472 C2 = {001100, 100100, 011000, 110000}

C3 = {000011, 110000}

C1 = {010101, 100101, 011010, 101010}

M2(6, 6, 0) C2 = {001100, 100100, 011000, 110000} 19456 20472

C3 = {000011, 100001, 010010, 110000} (continued on next page)

A mapping parameter appended by a * indicates the construction makes use of a starting matrix other than B.

B-1 B. Permutation Distance-Preserving Mappings

Table B.1: (continued)

M(n, M, δ) Multilevel construction |E| |Emax| ( ) 010101, 100101, 011001, 101001, C1 = 010110, 100110, 011010, 101010 M3(6, 6, 0) 19456 20472 C2 = {001100, 110000}

C3 = {000011, 100001, 010010, 110000} ( ) 0101010, 1001010, 0110010, 1010010, C1 = 0101100, 1001100, 0110100, 1010100 ( ) M(7, 7, 0) 0011001, 1001001, 0110001, 1100001, 94208 98294 C2 = 0011100, 1001100, 0110100, 1100100

C3 = {0000111, 1110000}   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = 10010101, 10010110, 10011001, 10011010,     M1(8, 8, 0)  10100101, 10100110, 10101001, 10101010  458752 458752 ( ) 00110011, 00110110, 01100011, 01100110, C2 = 10011001, 10011100, 11001001, 11001100

C3 = {00001111, 11110000}   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = 10010101, 10010110, 10011001, 10011010, M2(8, 8, 0)   458752 458752  10100101, 10100110, 10101001, 10101010 

C2 = {00110011, 00111100, 11000011, 11001100}

C3 = {00001111, 00111100, 11000011, 11110000}

C1 = {01010101, 01011010, 10100101, 10101010} ( ) 00110011, 00110110, 01100011, 01100110, C2 = M3(8, 8, 0) 10011001, 10011100, 11001001, 11001100 458752 458752 ( ) 00001111, 00011110, 00101101, 00111100, C3 = 11000011, 11010010, 11100001, 11110000

C1 = {01010101, 10101010} ( ) 00110011, 00110110, 01100011, 01100110, C2 = 10011001, 10011100, 11001001, 11001100   M4(8, 8, 0) 00001111, 00011110, 00101101, 00111100, 458752 458752   01000111, 01010110, 01100101, 01110100, C3 = 10001011, 10011010, 10101001, 10111000,    11000011, 11010010, 11100001, 11110000 

B-2 B. Permutation Distance-Preserving Mappings

B.2 Permutation distance-increasing mappings

Table B.2: Permutation distance-increasing mappings

M(n, M, δ) Multilevel construction |E| |Emax| C = {0101, 1010} M(2, 4, 1) 1 48 48 C2 = {0011, 1100} C = {0101, 1010} M(3, 4, 1) 1 192 192 C2 = {0011, 0110, 1001, 1100}

C1 = {010101, 101010}

M(3, 6, 3) C2 = {001100, 110000} 304 312

C3 = {000011, 110000}

C1 = {0101010, 1010100}

M(3, 7, 4) C2 = {0011001, 1100100} 368 378

C3 = {0000111, 1110000}

C1 = {01010101, 10101010}

M(3, 8, 5) C2 = {00110011, 11001100} 448 448

C3 = {00001111, 11110000}

C1 = {01010, 10010, 01100, 10100}

M(4, 5, 1) C2 = {00110, 11000} 928 1020

C3 = {00001, 10000}

C1 = {01000, 10000} ∗ M(4, 5, 1) C2 = {00101, 10001, 00110, 10010} 944 1020

C3 = {00011, 11000}

C1 = {010101, 101010}

M(5, 6, 1) C2 = {001100, 100100, 011000, 110000} 4864 5112

C3 = {000011, 100001, 010010, 110000}

C1 = {01010101, 10101010}

M(5, 8, 3) C2 = {00110011, 00111100, 11000011, 11001100} 7168 7168

C3 = {00001111, 00111100, 11000011, 11110000} ( ) 0101010, 1001010, 0110010, 1010010, C1 = 0101100, 1001100, 0110100, 1010100 M(6, 7, 1) 23552 24570 C2 = {0011001, 1001001, 0110100, 1100100}

C3 = {0000111, 1110000}

C1 = {01010101, 01011010, 10100101, 10101010}

M(6, 8, 2) C2 = {00110011, 00111100, 11000011, 11001100} 28672 28672

C3 = {00001111, 00111100, 11000011, 11110000} (continued on next page)

B-3 B. Permutation Distance-Preserving Mappings

Table B.2: (continued)

M(n, M, δ) Multilevel construction |E| |Emax|   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = 10010101, 10010110, 10011001, 10011010, M(7, 8, 1)   114688 114688  10100101, 10100110, 10101001, 10101010 

C2 = {00110011, 01100110, 10011001, 11001100}

C3 = {00001111, 11110000}

B.3 Permutation distance-reducing mappings

Table B.3: Permutation distance-reducing mappings

M(n, M, δ) Multilevel construction |E| |Emax| ( ) 010101, 010110, 011001, 011010, C1 = 100101, 100110, 101001, 101010 M(7, 6, −1) 77824 81912 C2 = {001100, 011000, 100100, 110000}

C3 = {000011, 000110, 001001, 001100} ( ) 0101010, 1001010, 0110010, 1010010, C1 = 0101100, 1001100, 0110100, 1010100

M(8, 7, −1) C2 = {0011001, 1001001, 0110100, 1100100} 376832 393204 ( ) 0000111, 1000011, 0100101, 1100001, C3 = 0010110, 1010010, 0110100, 1110000 ( ) 0101010, 1001010, 0110010, 1010010, C1 = 0101100, 1001100, 0110100, 1010100 ( ) 0011001, 1001001, 0110001, 1100001, M(9, 7, −2) C2 = 1507328 1572858 0011100, 1001100, 0110100, 1100100 ( ) 0000111, 1000011, 0100101, 1100001, C3 = 0010110, 1010010, 0110100, 1110000 (continued on next page)

B-4 B. Permutation Distance-Preserving Mappings

Table B.3: (continued)

M(n, M, δ) Multilevel construction |E| |Emax|   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = 10010101, 10010110, 10011001, 10011010,    10100101, 10100110, 10101001, 10101010  M(9, 8, −1) ( ) 1835008 1835008 00110011, 00110110, 01100011, 01100110, C2 = 10011001, 10011100, 11001001, 11001100 ( ) 00001111, 00011110, 00101101, 00111100, C3 = 11000011, 11010010, 11100001, 11110000   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = 10010101, 10010110, 10011001, 10011010,    10100101, 10100110, 10101001, 10101010    M(10, 8, −2) 00110011, 00111001, 00110110, 00111100, 7340032 7340032   10010011, 10011001, 10010110, 10011100, C2 = 01100011, 01101001, 01100110, 01101100,    11000011, 11001001, 11000110, 11001100 

C3 = {00001111, 11000011, 00111100, 11110000}   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = 10010101, 10010110, 10011001, 10011010,    10100101, 10100110, 10101001, 10101010    00110011, 00111001, 00110110, 00111100, M(11, 8, −3)   29360128 29360128 10010011, 10011001, 10010110, 10011100, C2 = 01100011, 01101001, 01100110, 01101100,    11000011, 11001001, 11000110, 11001100  ( ) 00001111, 00011110, 00101101, 00111100, C3 = 11000011, 11010010, 11100001, 11110000 (continued on next page)

B-5 B. Permutation Distance-Preserving Mappings

Table B.3: (continued)

M(n, M, δ) Multilevel construction |E| |Emax|   01010101, 01010110, 01011001, 01011010,   01100101, 01100110, 01101001, 01101010, C1 = 10010101, 10010110, 10011001, 10011010,    10100101, 10100110, 10101001, 10101010    00110011, 00111001, 00110110, 00111100,   10010011, 10011001, 10010110, 10011100, M(12, 8, −4) C2 = 117440512 117440512 01100011, 01101001, 01100110, 01101100,    11000011, 11001001, 11000110, 11001100    00001111, 00011110, 00101101, 00111100,   01001011, 01011010, 01101001, 01111000, C3 = 10000111, 10010110, 10100101, 10110100,    11000011, 11010010, 11100001, 11110000 

B-6 Other Distance-Preserving C Mappings

C.1 Other distance-conserving mappings

Table C.1: Other distance-conserving mappings

R(n, M, δ) Multilevel construction |E| |Emax| I = 012344 C = {010100, 100100, 011000, 101000} R(6, 6, 0) 1 17408 19656 C2 = {001100, 100100, 011000, 110000}

C3 = {000011, 100001, 010010, 110000} I = 0123455 ( ) 0101011, 1001011, 0110011, 1010011, C1 = 0101101, 1001101, 0110101, 1010101 R(7, 7, 0) 88064 95564 C2 = {0011000, 1100000} ( ) 0000111, 1000011, 0100101, 1100001, C3 = 0010110, 1010010, 0110100, 1110000 I = 0123444

C1 = {0101000, 1001000, 0110000, 1010000}

R(7, 7, 0) C2 = {0011000, 1001000, 0110000, 1100000} 79872 91742 ( ) 0000111, 1000011, 0100101, 1100001, C3 = 0010110, 1010010, 0110100, 1110000 (continued on next page)

Note that for each case the identity element, I, are also included for ease of use, although it can also be determined by using the first component of each level.

C-1 C. Other Distance-Preserving Mappings

Table C.1: (continued)

R(n, M, δ) Multilevel construction |E| |Emax| I = 01234455

C1 = {01010011, 10100011, 01011100, 10101100}

C2 = {00110000, 10010000, 01100000, 11000000}   R(8, 8, 0) 00001111, 10000111, 01001011, 11000011, 425984 436896   00101101, 10100101, 01101001, 11100001, C3 = 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000  I = 01234555 ( ) 01010111, 10010111, 01100111, 10100111, C1 = 01011011, 10011011, 01101011, 10101011

C2 = {00110000, 11000000} R(8, 8, 0)   393216 436896 00001111, 10000111, 01001011, 11000011,   00101101, 10100101, 01101001, 11100001, C3 = 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000  I = 01234566

C1 = {01010100, 10100100, 01011000, 10101000}

C2 = {00110011, 11000011, 00111100, 11001100}   R(8, 8, 0) 00001111, 10000111, 01001011, 11000011, 442368 449376   00101101, 10100101, 01101001, 11100001, C3 = 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000 

C-2 C. Other Distance-Preserving Mappings

C.2 Other distance-increasing mappings

Table C.2: Other distance-increasing mappings

R(n, M, δ) Multilevel construction |E| |Emax| I = 0122

R(3, 4, 1) C1 = {0100, 1000} 160 168

C2 = {0011, 1001, 0110, 1100} I = 012233 ( ) 010011, 100011, 011001, 101001, R(5, 6, 1) C1 = 4096 4608 010110, 100110, 011100, 101100,

C2 = {001111, 101101, 011110, 111100} I = 012344 C = {010100, 100100, 011000, 101000} R(5, 6, 1) 1 4352 4908 C2 = {001100, 110000}

C3 = {000011, 100001, 010010, 110000} I = 0123344 C = {0101100, 1001100, 0110100, 1010100} R(6, 7, 1) 1 19200 22932 C2 = {0011100, 1010100, 0111000, 1110000}

C3 = {0000011, 0100001, 0010010, 0110000} I = 0123455 ( ) 0101011, 1001011, 0110011, 1010011, C1 = R(6, 7, 1) 0101101, 1001101, 0110101, 1010101 22016 23884

C2 = {0011000, 1100000}

C3 = {0000111, 1000011, 0110100, 1110000}

C-3 C. Other Distance-Preserving Mappings

C.3 Other distance-reducing mappings

Table C.3: Other distance-reducing mappings

R(n, M, δ) Multilevel construction |E| |Emax| I = 0123455 ( ) 0101011, 1001011, 0110011, 1010011, C1 = 0101101, 1001101, 0110101, 1010101 R(8, 7, −1) 352256 382284 C2 = {0011000, 1001000, 0110000, 1100000} ( ) 0000111, 1000011, 0100101, 1100001, C3 = 0010110, 1010010, 0110100, 1110000 I = 01234555 ( ) 01010111, 10010111, 01100111, 10100111, C1 = 01011011, 10011011, 01101011, 10101011

C2 = {00110000, 10010000, 01100000, 11000000} R(9, 8, −1)   1572864 1747616 00001111, 10000111, 01001011, 11000011,   00101101, 10100101, 01101001, 11100001, C3 = 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000  I = 01234566

C1 = {01010100, 10101000}   00110011, 10010011, 01100011, 11000011,   00111001, 10011001, 01101001, 11001001, C2 = 00110110, 10010110, 01100110, 11000110, R(9, 8, −1)   1769472 1797552  00111100, 10011100, 01101100, 11001100    00001111, 10000111, 01001011, 11000011,   00101101, 10100101, 01101001, 11100001, C3 = 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000  (continued on next page)

C-4 C. Other Distance-Preserving Mappings

Table C.3: (continued)

R(n, M, δ) Multilevel construction |E| |Emax| I = 01234455   01010011, 10010011, 01100011, 10100011,   01011001, 10011001, 01101001, 10101001, C1 = 01010110, 10010110, 01100110, 10100110,    01011100, 10011100, 01101100, 10101100  R(10, 8, −2) 6815744 6990496 C2 = {00110000, 10010000, 01100000, 11000000}   00001111, 10000111, 01001011, 11000011,   00101101, 10100101, 01101001, 11100001, C3 = 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000  I = 01234566 ( ) 01010100, 10010100, 01100100, 10100100, C1 = 01011000, 10011000, 01101000, 10101000   00110011, 10010011, 01100011, 11000011,   00111001, 10011001, 01101001, 11001001, C2 = R(11, 8, −3) 00110110, 10010110, 01100110, 11000110, 28311552 28760928    00111100, 10011100, 01101100, 11001100    00001111, 10000111, 01001011, 11000011,   00101101, 10100101, 01101001, 11100001, C3 = 00011110, 10010110, 01011010, 11010010,    00111100, 10110100, 01111000, 11110000 

C-5 Graph Representation of D Permutation Mappings

Here we present some further graph representations and symbol paths for permutation mappings, similar to those in Section 7.5, looking at some of the previous mappings that we did not cover previously.

Only mappings that make use of a simple algorithm, of the form “if xi = 1 then swap(a, b)”, are used in the graph representations. The construction by Lee [28], for instance, is a bit more complex and does not make use of this exact form in the algorithm. For this algorithm, two graphs would be necessary, as the starting permutation depends

on whether xn = 0 or xn = 1. One graph would then be used for the xn = 0 case and

another for the xn = 1 case. Another algorithm, Construction 2 of Chang [29], cannot be represented as graphs for certain values of M, as it uses a mapping in the recursion found by computer search.

In Figure D.1 the graph representation of the mappings using Construction 3 of Chang et al [27] is shown for M = 4, 6 and 8. In this case the graphs look like the “blades of a fan”, which is a nice structure that generalises to higher M. For every increase of two in M, another blade is added to the graph.

To have an algorithm that generalises to all M, one needs a graph with a structure that can be generalised to larger graphs.

In Figure D.2 the symbol paths for the M = 8 mapping in Figure D.1 are shown. We see that each symbol only connects to four positions. Although the graphs have a nice structure, it is obvious that these will not produce mappings that are distance optimal, as the symbols do not appear in all the positions.

D-1 D. Graph Representation of Permutation Mappings

M = 4 M = 6 M = 8

1 1 x1 1 x1 x 1 2 8 x5 2 x4 6 x3 x6 x4 x5 x 2 x4 4 3 3 x7 7 x6 x8 x2 3 5 x 2 4 6 x2 x3 3 4 5

Figure D.1: Graph representation of Construction 3 [27]

Symbol 1 Symbol 2 Symbol 3 Symbol 4 1 1 1 1 2 8 2 8 2 8 2 8

3 7 3 7 3 7 3 7

4 6 4 6 4 6 4 6 5 5 5 5 Symbol 5 Symbol 6 Symbol 7 Symbol 8 1 1 1 1 2 8 2 8 2 8 2 8

3 7 3 7 3 7 3 7

4 6 4 6 4 6 4 6 5 5 5 5

Figure D.2: Symbol paths for M = 8 mapping, using Construction 3 [27]

In Figure D.3 the graph representation of the mappings from Construction A–C by Lee [31] is shown. Construction A generates mappings for M even, Construction B generates mappings when M = 4z +1, with z some integer, and Construction C generates mappings when M = 4z − 1, with z some integer. We see in Figure D.3 that all the graphs for M even, have the same structure and the graphs for M = 5 and M = 9 have the same 0 structure. Note that in the case of M odd, an xj and xj label is present. Both are used 0 when xj = 1, however, the swap for xj is done first, followed by the swap for xj. This

D-2 D. Graph Representation of Permutation Mappings

M = 4 M = 5 M = 6 1 1 1 x1 x1 x6 x1 x3 x4 2 6 2 5 0 x3 x 2 4 x4 3 x4 x5 3 5 x2 x3 3 4 x5 x2 3 x2 4

M = 7 M = 8 M = 9 1 1 x 1 x1 x1 x8 1 x5 2 9 2 7 2 8 x6 x9 x5 x x5 0 4 x6 x7 3 x0 8 x4 3 7 5 3 6 x2 x4 x2 x7 x2 x3 4 7 4 6 x7 x8 4 5 x6 x3 x6 5 5 x3 6

Figure D.3: Graph representation of Construction A–C [31]

0 holds for M = 5 and M = 9. For M = 7 it is a bit more complex, with the x6 swap coming directly after the x4 swap. The rest of the swaps then follow in the normal order. (Note that we relabeled the input bit subscripts so they follow in the same order that the swaps must be done. This in no way affects the distance between sequences.)

Lee noted that two different algorithms were necessary for M odd, giving rise to Con- struction B and C. However, looking at the graphs, one would assume that both graphs’ structures can be generalised and should be applicable to any odd M. In Figure D.4 the symbol paths for the M = 5 mapping using Construction B are shown. Note that in the symbol 5 path, symbol 5 first goes to position 1 and directly after that goes to position 3, 0 because of the x3/x3 combination. The order of the swaps in Construction C, makes it impossible to construct an M = 5 mapping. By changing the order of the swaps, the same structure can be used and a mapping for M = 5 can be achieved. The symbol paths for this alternative mapping is shown in Figure D.5.

D-3 D. Graph Representation of Permutation Mappings

Symbol 1 Symbol 2 Symbol 3 1 1 1 x x 1 x3 1 x3

2 5 2 5 2 5 0 x3

x4 x x4 x 5 5 x4 x5

3 4 3 4 3 4 x2

Symbol 4 Symbol 5 1 1 0 x3/x3 2 5 2 5 0 x3

x4 x5 x4 x5

3 4 3 4 x2

Figure D.4: Symbol paths for M = 5 mapping, using Construction B [31]

Symbol 1 Symbol 2 Symbol 3 1 1 1 x1 x1

2 5 2 5 2 5 x3

x4 x5 x4 x5 x4 x5 0 0 x3/x3 x3/x3 3 4 3 4 3 4 x2

Symbol 4 Symbol 5 1 1

2 5 2 5 x3

0 x3 x4 x5 x5

3 4 3 4 x2

Figure D.5: Symbol paths for alternative M = 5 mapping, based on Construction C [31]

D-4 D. Graph Representation of Permutation Mappings

Construction B and the alternative Construction C are then equivalent, with only the 0 swap for the xj input bit being different. In Construction B, swap(1,M) is used while in M+1 the alternative Construction C, swap(1, 2 ) is used.

Finally, we show how the graphs can be used to calculate the |E(k)| and |E| values for a mapping. We use the multilevel construction with two different M = 5 starting matrices, using the usual identity starting matrix, B, and the alternative starting matrix from Example 6.8.

The symbol paths for the M(5, 5, 0) mapping using B as starting matrix, are shown in Figure D.6. Each position starts with 32 symbols. For instance, the symbol 1 path has 32 symbol 1s in position 1. After the swap for x1, 16 symbol 1s are in position 1 and

16 symbol 1s are in position 2. After the swap for x3, 8 symbol 1s are in position 1, 16 symbol 1s are in position 2 and 8 symbol 1s are in position 3. After the swaps for x4, 8 symbol 1s are in position 1, 8 symbol 1s are in position 2, 8 symbol 1s are in position 3 and 8 symbol 1s are in position 4. Lastly, after the swaps for x5, 4 symbol 1s are in position 1, 8 symbol 1s are in position 2, 8 symbol 1s are in position 3, 8 symbol 1s are in position 4 and 4 symbol 1s are in position 5. These are the values shown next to the

Symbol 1 Symbol 2 Symbol 3 4 4 4 1 1 1 x1 x5 x5 x5 x1

x3 4 x3 4 x3 4 2 8 5 2 8 5 2 8 5

x4 x4 x4

8 8 8 8 8 8 3 4 3 4 3 4 x2

Symbol 4 Symbol 5 4 16 1 1 x5 x5

x3 4 16 2 8 5 2 0 5

x4

8 8 0 0 3 4 3 4

x2

Figure D.6: Symbol paths for M(5, 5, 0) mapping using B starting matrix

D-5 D. Graph Representation of Permutation Mappings

Table D.1: Symbol distribution for M = 5 mapping using B starting matrix

Position m1 m2 m3 m4 m5 1 4 4 4 4 16 2 8 8 8 8 0 3 8 8 8 8 0 4 8 8 8 8 0 5 4 4 4 4 16 positions in the graphs. This can be done in a similar manner for all the other symbol paths.

Recall from the proof of Proposition 5.3 and (5.12) that

(k) 2n 2 2 2 |E | = 2 − (m1 + m2 + ··· + mM ),

n where mi is the number of times that symbol i appears in position k and |C| = 2 . From

Figure D.6 the values for m1, . . . , m5 for 1 ≤ k ≤ 5 can be read and these are provided in Table D.1. Using these values we can calculate |E(1)| = 704, |E(2)| = 768, |E(3)| = 768, |E(4)| = 768 and |E(5)| = 704. Summing the |E(k)| values we obtain |E| = 3712, which is the same value obtained in Example 6.8.

The symbol paths for the first four symbols connect to all the positions, with only the symbol 5 path connecting to two positions, similar to the symbol paths of the M = 9 mapping in Figure 7.14. Symbol 5 appears only in positions 1 and 5, and makes no contribution to the distance in any of the other positions. This can be seen from the |E(k)| values where |E(1)| and |E(5)| are lower than the others.

The symbol paths for the M(5, 5, 0) mapping using the alternative starting matrix are shown in Figure D.7 and the number of times each symbol appears in each position is determined in the same way.

The values for m1, . . . , m5 for 1 ≤ k ≤ 5 are given in Table D.2. Using these values we can calculate |E(1)| = 640, |E(2)| = 800, |E(3)| = 768, |E(4)| = 800 and |E(5)| = 768. Summing the |E(k)| values we obtain |E| = 3776, which is the same value we obtained in Example 6.8.

Again, as in the case of the M = 9 mappings in Figures 7.14 and 7.15, the mapping using B as starting matrix has a slightly lower sum of distances when compared to the

D-6 D. Graph Representation of Permutation Mappings

Symbol 1 Symbol 2 Symbol 3 8 16 8 1 1 1 x3 x3 x3

8 0 8 2 4 5 2 8 5 2 4 5 x1 x1

x5 x5

x4 x4 x4 4 0 8 4 3 8 4 3 4 3 8 4

Symbol 4 Symbol 5 0 0 1 1

8 8 2 8 5 2 8 5

x5 x5

x2 x2

x4 x4 3 8 4 8 3 8 4 8

Figure D.7: Symbol paths for M(5, 5, 0) mapping using alternative starting matrix

Table D.2: Symbol distribution for M = 5 mapping using alternative starting matrix

Position m1 m2 m3 m4 m5 1 8 16 8 0 0 2 4 8 4 8 8 3 8 0 8 8 8 4 4 8 4 8 8 5 8 0 8 8 8 mapping using an alternative starting matrix. A better symbol distribution is obtained in the mapping using the alternative starting matrix and this results in a higher sum of distances.

Using this same approach, the symbol paths of any mapping can be used to calculate the sum of Hamming distances, without the need to calculate the Hamming distance between each and every sequence in the mapping.

D-7 References

[1] S. Lin and D. J. Costello Jr., Error control coding: Fundamentals and applications. Prentice Hall Inc., 1983. [2] P. Sweeney, Error Control Coding: An Introduction. United Kingdom: Prentice Hall Inc., 1991. [3] A. Houghton, The Engineer’s Error Coding Handbook. London: Chapman and Hall, 1997. [4] P. Sweeney, Error Control Coding: From Theory to Practice. England: John Wiley and Sons, Ltd., 2002. [5] E. J. Borowski and J. M. Borwein, Collins Dictionary of Mathematics, 2nd ed. Great Britain: Collins, 2002. [6] D. Slepian, “Permutation modulation,” Proceedings of the IEEE, vol. 53, no. 3, pp. 228–236, Mar. 1965. [7] P. J. Cameron, “Permutations,” in Paul Erd¨osand his Mathematics. Budapest: Bolyai Society Mathematical Studies 11, 2002, vol. II, pp. 205–239. [8] M. Deza and T. Huang, “Metrics on permutations, a survey,” Journal of Combina- torics, Information and System Sciences, vol. 23, no. 1–4, pp. 173–185, 1998. [9] P. J. Cameron, “Permutations and codes: polynomials, bases, and covering radius,” in The 5th Slovenian International Conference on Graph Theory, Bled, Slovenia, June 22–27, 2003. [10] V. I. Levenshtein, “On perfect codes in deletion and insertion metric,” Discrete Mathematics and its Applications, vol. 2, no. 3, pp. 241–258, 1992, originally pub- lished in Diskretnaya Matematika, vol. 3, no. 1, pp. 3–20, 1991 (in Russian). [11] P. Frankl and M. Deza, “On the maximum number of permutations with given maximal or minimal distance,” Journal of Combinatorial Theory, Series A, vol. 22, no. 3, pp. 352–360, May 1977.

Rf-1 References

[12] M. Deza and S. A. Vanstone, “Bounds on permutation arrays,” Journal of Statistical Planning and Inference, vol. 2, no. 2, pp. 197–209, 1978.

[13] I. F. Blake, G. Cohen, and M. Deza, “Coding with permutations,” Information and Control, vol. 43, no. 1, pp. 1–19, Oct. 1979.

[14] C. Ding, F.-W. Fu, T. Kløve, and V. F.-W. Wei, “Constructions of permutation arrays,” IEEE Transactions on Information Theory, vol. 48, no. 4, pp. 977–980, Apr. 2002.

[15] F.-W. Fu and T. Kløve, “Two constructions of permutation arrays,” IEEE Trans- actions on Information Theory, vol. 50, no. 5, pp. 881–883, May 2004.

[16] C. J. Colbourn, T. Kløve, and A. C. H. Ling, “Permutation arrays for powerline communication and mutually orthogonal Latin squares,” IEEE Transactions on Information Theory, vol. 50, no. 6, pp. 1289–1291, June 2004.

[17] C. J. Colbourn and J. H. Dinitz, “Mutually orthogonal Latin squares: A brief survey of constructions,” Journal of Statistical Planning and Inference, vol. 95, no. 1–2, pp. 9–48, May 2001, special issue.

[18] K. Eriksson and S. Linusson, “A combinatorial theory of higher-dimensional per- mutation arrays,” Advances in Applied Mathematics, vol. 25, no. 2, pp. 194–211, Nov. 2000.

[19] M. Kendall, Rank Correlation Methods. London: Griffin, 1958.

[20] T. Kløve, “Classification of permutation codes of length 6 and minimum distance 5,” in Proceedings of the 2000 International Symposium on Information Theory and its Applications, Honolulu, Hawaii, Nov. 2000, pp. 465–468.

[21] ——, “A combinatorial problem motivated by a data transmission application,” in Proceedings of Norsk Informatikkkonferanse, Bodø, Norway, Nov. 2000, pp. 55–66.

[22] A. J. H. Vinck, “Coded modulation for powerline communications,” AEU¨ Interna- tional Journal of Electronics and Communications, vol. 54, no. 1, pp. 45–49, Jan. 2000.

[23] H. C. Ferreira, D. A. Wright, and A. L. Nel, “Hamming distance preserving map- pings and trellis codes with constrained binary symbols,” IEEE Transactions on Information Theory, vol. 35, no. 5, pp. 1098–1103, Sept. 1989.

[24] C. A. French, “Distance preserving run-length limited codes,” IEEE Transactions on Magnetics, vol. 25, no. 5, pp. 4093–4095, Sept. 1989.

[25] H. C. Ferreira and A. J. H. Vinck, “Interference cancellation with permutation trellis codes,” in Proceedings of the 2000 IEEE Vehicular Technology Conference, Boston, MA, USA, Sept. 24–28, 2000, pp. 2401–2407.

Rf-2 References

[26] H. C. Ferreira, A. J. H. Vinck, T. G. Swart, and I. de Beer, “Permutation trellis codes,” IEEE Transactions on Communications, vol. 53, no. 11, pp. 1782–1789, Nov. 2005. [27] J.-C. Chang, R.-J. Chen, T. Kløve, and S.-C. Tsai, “Distance-preserving mappings from binary vectors to permutations,” IEEE Transactions on Information Theory, vol. 49, no. 4, pp. 1054–1059, Apr. 2003. [28] K. Lee, “New distance-preserving mappings of odd length,” IEEE Transactions on Information Theory, vol. 50, no. 10, pp. 2539–2543, Oct. 2004. [29] J.-C. Chang, “Distance-increasing mappings from binary vectors to permutations,” IEEE Transactions on Information Theory, vol. 51, no. 1, pp. 359–363, Jan. 2005. [30] K. Lee, “Cyclic constructions of distance-preserving maps,” IEEE Transactions on Information Theory, vol. 51, no. 12, pp. 4392–4396, Dec. 2005. [31] ——, “Distance-increasing maps of all lengths by simple mapping algorithms,” IEEE Transactions on Information Theory, vol. 52, no. 7, pp. 3344–3348, July 2006. [32] H. D. Chadwick and L. Kurz, “Rank permutation group codes based on Kendall’s correlation statistic,” IEEE Transactions on Information Theory, vol. 15, no. 2, pp. 306–315, Mar. 1969. [33] H. D. Chadwick, “The equivalence of rank permutation codes to a new class of binary codes,” IEEE Transactions on Information Theory, vol. 16, no. 5, pp. 640– 641, Sept. 1970. [34] I. F. Blake, “Permutation codes for discrete channels,” IEEE Transactions on In- formation Theory, vol. 20, no. 1, pp. 138–140, Jan. 1974.

[35] R. F. Bailey, “Decoding the Mathieu group M12,” Online document, Queen Mary, University of London, work in progress. [Online]. Available: http://www.maths.qmul.ac.uk/∼rfb/ [36] T. Wadayama and A. J. H. Vinck, “A multilevel construction of permutation codes,” IEICE Transactions on Fundamentals, vol. E84-A, no. 10, pp. 2518–2522, Oct. 2001. [37] N. T. Gaarder, “Probability of error for binary permutation modulation on a fading Gaussian channel,” IEEE Transactions on Information Theory, vol. 17, no. 4, pp. 412–418, July 1971. [38] E. M. Biglieri and M. Elia, “Optimum permutation modulation codes and their asymptotic performance,” IEEE Transactions on Information Theory, vol. 22, no. 6, pp. 751–753, Nov. 1976. [39] C. Heegard, H. E. dePedro, and J. K. Wolf, “Permutation codes for the Gaussian broadcast channel with two receivers,” IEEE Transactions on Information Theory, vol. 24, no. 5, pp. 569–578, Sept. 1978.

Rf-3 References

[40] C. Downey and J. K. Karlof, “Group codes for the M-receiver Gaussian broadcast channel,” IEEE Transactions on Information Theory, vol. 29, no. 4, pp. 595–597, July 1983. [41] J. K. Karlof, “Permutation codes for the Gaussian channel,” IEEE Transactions on Information Theory, vol. 35, no. 4, pp. 726–732, July 1989. [42] J. K. Karlof and Y. O. Chang, “Optimal permutation codes for the gaussian chan- nel,” IEEE Transactions on Information Theory, vol. 43, no. 1, pp. 356–358, Jan. 1997. [43] I. Ingemarsson, “Optimized permutation modulation,” IEEE Transactions on In- formation Theory, vol. 36, no. 5, pp. 1098–1100, Sept. 1990. [44] J. Rahhal and G. E. Atkin, “Combined permutation codes using M-ary modulation for AWGN and fading channels,” in Proceedings of the 1995 IEEE Symposium on Computers and Communications, Alexandria, Egypt, June 27–29, 1995, pp. 358– 363. [45] W. W. Peterson, “A note on permutation modulation,” IEEE Transactions on In- formation Theory, vol. 43, no. 1, pp. 359–360, Jan. 1997. [46] B. M. King and M. A. Neifeld, “Low-complexity maximum-likelihood decoding of shortened enumerative permutation codes for holographic storage,” IEEE Journal on Selected Areas in Communications, vol. 19, no. 4, pp. 783–790, Apr. 2001. [47] J. G. Dunn, “The performance of a class of n-dimensional quantizers for a Gaussian source,” in Proceedings of the Symposium on Signal Transmission and Processing, Columbia University, New York, NY, USA, May 13–14, 1965, pp. 76–81. [48] T. Berger, F. Jelinek, and J. K. Wolf, “Permutation codes for sources,” IEEE Trans- actions on Information Theory, vol. 18, no. 1, pp. 160–169, Jan. 1972. [49] T. Berger, “Optimum quantizers and permutation codes,” IEEE Transactions on Information Theory, vol. 18, no. 6, pp. 759–765, Nov. 1972. [50] ——, “Minimum entropy quantizers and permutation codes,” IEEE Transactions on Information Theory, vol. 28, no. 2, pp. 149–157, Mar. 1982. [51] M. R. Schroeder and N. J. A. Sloane, “New permutation codes using Hadamard unscrambling,” IEEE Transactions on Information Theory, vol. 33, no. 1, pp. 144– 146, Jan. 1987. [52] V. K. Goyal, S. A. Savari, and W. Wang, “On optimal permutation codes,” IEEE Transactions on Information Theory, vol. 47, no. 7, pp. 2961–2971, Nov. 2001. [53] A. J. H. Vinck and H. C. Ferreira, “Permutation trellis codes,” in Proceedings of the 2001 IEEE International Symposium on Information Theory, Washington, DC, USA, June 24–29, 2001, p. 279.

Rf-4 References

[54] H. C. Ferreira, I. de Beer, and A. J. H. Vinck, “Distance preserving mappings onto convolutional codes revisited,” in Proceedings of the 2002 IEEE Information Theory Workshop, Breisach, Germany, June 26–29, 2002, pp. 23–26.

[55] A. J. H. Vinck and J. H¨aring, “Coding and modulation for power-line communica- tions,” in Proceedings of the 2000 International Symposium on Power-line Commu- nications, Limerick, Ireland, Apr. 5–7, 2000, pp. 265–272.

[56] A. J. H. Vinck, A. Hasbi, H. C. Ferreira, and T. G. Swart, “On coded M-ary frequency shift keying,” in Proceedings of the 2004 International Symposium on Power-line Communications, Zaragoza, Spain, Mar. 31–Apr. 2, 2004, pp. 175–179.

[57] T. G. Swart, I. de Beer, H. C. Ferreira, and A. J. H. Vinck, “Simulation results for permutation trellis codes using M-ary FSK,” in Proceedings of the 2005 Interna- tional Symposium on Power-Line Communications and its Applications, Vancouver, Canada, Apr. 6–8, 2005, pp. 317–321.

[58] K. W. Shum, “Permutation coding and M-FSK modulation for frequency selective channel,” in Proceedings of the 13th IEEE International Symposium on Personal, Indoor and Mobile Radio Communications, Lisbon, Portugal, Sept. 15–18, 2002, pp. 2063–2066.

[59] S. W. Golomb and H. Taylor, “Two-dimensional synchronization patterns for min- imum ambiguity,” IEEE Transactions on Information Theory, vol. 28, no. 4, pp. 600–604, July 1982.

[60] K. J. Nurmela, M. K. Kaikkonen, and P. Osterg˙ard,“New¨ constant weight codes from linear permutation groups,” IEEE Transactions on Information Theory, vol. 43, no. 5, pp. 1623–1630, Sept. 1997.

[61] S. Datta and S. W. McLaughlin, “An enumerative method for runlength-limited codes: Permutation codes,” IEEE Transactions on Information Theory, vol. 45, no. 6, pp. 2199–2204, Sept. 1999.

[62] O. Milenkovic and B. Vasi´c,“Permutation (d, k) codes: Efficient enumerative coding and phrase length distribution shaping,” IEEE Transactions on Information Theory, vol. 46, no. 7, pp. 2671–2675, Nov. 2000.

[63] S. Datta and S. W. McLaughlin, “Optimal block codes for M-ary runlength- constrained channels,” IEEE Transactions on Information Theory, vol. 47, no. 5, pp. 2069–2078, July 2001.

[64] D. R. de la Torre, C. J. Colbourn, and A. C. H. Ling, “An application of permutation arrays to block cipher,” in Proceedings of the 31st Southeastern International Con- ference on Combinatorics, Graph Theory and Computing, Boca Raton, FL, USA, 2000, in Congr. Numer., vol. 145, pp. 5–7, 2000.

Rf-5 References

[65] J. D. Ullman, “On the capabilities of codes to correct synchronization errors,” IEEE Transactions on Information Theory, vol. 13, no. 1, pp. 95–105, Jan. 1967. [66] ——, “Near-optimal, single-synchronization-error-correcting code,” IEEE Transac- tions on Information Theory, vol. 12, no. 4, pp. 418–424, Oct. 1966. [67] F. F. Sellers, “Bit loss and gain correction code,” IEEE Transactions on Information Theory, vol. 8, no. 1, pp. 35–38, Jan. 1962. [68] A. J. van Wijngaarden, H. Morita, and A. J. H. Vinck, “Prefix synchronized codes capable of correcting single insertion/deletion errors,” in Proceedings of the 1997 IEEE International Symposium on Information Theory, June 29–July 4, 1997, p. 409. [69] H. C. Ferreira, W. A. Clarke, A. S. J. Helberg, K. A. S. Abdel-Ghaffar, and A. J. H. Vinck, “Insertion/deletion correction with spectral nulls,” IEEE Transactions on Information Theory, vol. 43, no. 2, pp. 722–732, Mar. 1997. [70] E. A. Ratzer and D. J. C. MacKay, “Codes for channels with insertions, deletions and substitutions,” in Proceedings of the 2nd International Symposium on Turbo Codes and Related Topics, Brest, France, Sept. 4–7, 2000, pp. 149–156. [71] D. Marco and D. L. Neuhoff, “Marker codes for channels with insertion, deletion and substitution errors,” EECS Department, University of Michigan, Technical report CSPL-347, Dec. 2003. [Online]. Available: http://www.eecs.umich.edu/ systems/TechReportList.html [72] E. N. Gilbert, “Synchronization of binary messages,” IEEE Transactions on Infor- mation Theory, vol. 6, no. 4, pp. 470–477, Sept. 1960. [73] L. J. Guibas and A. M. Odlyzko, “Maximal prefix-synchronized codes,” SIAM Jour- nal of Applied Mathematics, vol. 35, no. 2, pp. 401–418, Sept. 1978. [74] A. J. van Wijngaarden and H. Morita, “Extended prefix synchronization codes,” in Proceedings of the 1995 IEEE International Symposium on Information Theory, Sept. 17–22, 1995, p. 465. [75] H. Morita and A. J. van Wijngaarden, “Coding algorithms for extended prefix- synchronized codes,” in Proceedings of the 1996 IEEE International Symposium on Information Theory and Its Applications, Sept. 17–20, 1996, pp. 504–505. [76] A. J. van Wijngaarden, T. J. Willink, and M. Kolb, “On the performance of dis- tributed synchronisation sequences,” in Proceedings of the 1996 IEEE International Symposium on Information Theory and Its Applications, Sept. 17–20, 1996, pp. 637–640. [77] D. M. Mandelbaum, “Synchronization of codes by means of Kautz’s Fibonacci en- coding,” IEEE Transactions on Information Theory, vol. 18, no. 2, pp. 281–285, Mar. 1972.

Rf-6 References

[78] W. H. Kautz, “Fibonacci codes for synchronization control,” IEEE Transactions on Information Theory, vol. 11, no. 2, pp. 284–292, Apr. 1965.

[79] H. Morita, A. J. van Wijngaarden, and A. J. H. Vinck, “On the construction of maximal prefix-synchronized codes,” IEEE Transactions on Information Theory, vol. 42, no. 6, pp. 2158–2166, Nov. 1996.

[80] S. W. Golomb, B. Gordon, and L. R. Welch, “Comma-free codes,” Canadian Journal of Mathematics, vol. 10, no. 2, pp. 202–209, 1958.

[81] W. L. Eastman, “On the construction of comma-free codes,” IEEE Transactions on Information Theory, vol. 11, no. 2, pp. 263–267, Apr. 1965.

[82] B. H. Jiggs, “Recent results in comma-free codes,” Canadian Journal of Mathemat- ics, vol. 15, pp. 178–187, 1963.

[83] W. B. Kendall and I. S. Reed, “Path invariant comma-free codes,” IEEE Transac- tions on Information Theory, vol. 8, no. 6, pp. 350–355, Oct. 1962.

[84] J. J. Stiffler, “Comma-free error-correcting codes,” IEEE Transactions on Informa- tion Theory, vol. 11, no. 1, pp. 107–112, Jan. 1965.

[85] R. A. Scholtz, “Codes with synchronization capability,” IEEE Transactions on In- formation Theory, vol. 12, no. 2, pp. 135–142, Apr. 1966.

[86] K. A. S. Immink and H. D. L. Hollman, “Prefix-synchronized runlength-limited sequences,” IEEE Journal on Selected Areas in Communications, vol. 10, no. 1, pp. 214–222, Jan. 1992.

[87] J. E. Levy, “Self-synchronizing codes derived from binary cyclic codes,” IEEE Trans- actions on Information Theory, vol. 12, no. 3, pp. 286–290, July 1966.

[88] S. Y. Tong, “Synchronization recovery techniques for binary cyclic codes,” Bell Systems Technical Journal, vol. 45, pp. 561–596, Apr. 1966.

[89] ——, “Correction of synchronization errors with burst-error-correcting cyclic codes,” IEEE Transactions on Information Theory, vol. 15, no. 1, pp. 106–109, Jan. 1969.

[90] S. E. Tavares and M. Fukada, “Matrix approach to synchronization recovery for binary cyclic codes,” IEEE Transactions on Information Theory, vol. 15, no. 1, pp. 93–101, Jan. 1969.

[91] ——, “Synchronization of a class of codes derived from cyclic codes,” Information and Control, vol. 16, no. 2, pp. 153–166, Apr. 1970.

[92] G. S´eguin, “On synchronizable binary cyclic codes,” IEEE Transactions on Infor- mation Theory, vol. 21, no. 5, pp. 589–592, Sept. 1975.

Rf-7 References

[93] Y.-H. Choi, “Coset codes with maximum capability of synch-correction,” Electronics Letters, vol. 35, no. 18, pp. 1535–1537, Sept. 1999.

[94] L. Calabi and W. E. Hartnett, “A family of codes for the correction of substitution and synchronization errors,” IEEE Transactions on Information Theory, vol. 15, no. 1, pp. 102–106, Jan. 1969.

[95] P. A. H. Bours, “Codes for correcting insertion and deletion errors,” Ph.D. dis- sertation, Technische Universiteit Eindhoven, Eindhoven, The Netherlands, June 1994.

[96] H. C. Ferreira and A. J. H. Vinck, “Coding scheme for correcting long bursts of in- sertions, deletions and reversal errors,” in Proceedings of the 1998 IEEE Information Theory Workshop, San Diego, CA, USA, Feb. 8–1, 1998, p. 83.

[97] V. I. Levenshtein, “Binary codes capable of correcting deletions, insertions and reversals,” Soviet Physics-Doklady, vol. 10, no. 8, pp. 707–710, Feb. 1966, originally published in Doklady Akademmi Nauk SSSR, vol. 162, no. 4, pp. 845–848, 1965 (in Russian).

[98] E. Tanaka and T. Kasai, “Synchronization and substitution error-correcting codes for the Levenshtein metric,” IEEE Transactions on Information Theory, vol. 22, no. 2, pp. 156–162, July 1976.

[99] H. D. L. Hollman, “A relation between Levenshtein-type distances and insertion- and-deletion correcting capabilities of codes,” IEEE Transactions on Information Theory, vol. 39, no. 4, pp. 1424–1427, July 1993.

[100] S. Konstantinidis, “Relationships between different error-correcting capabilities of a code,” IEEE Transactions on Information Theory, vol. 47, no. 5, pp. 2065–2069, July 2001.

[101] W. A. Clarke and H. C. Ferreira, “Further results on insertion/deletion correcting codes,” in Proceedings of the 2002 IEEE International Symposium on Information Theory, Luasanne, Switzerland, June 30–July 5, 2002, p. 373.

[102] ——, “Coding for insertion/deletion error propagation effects associated with fixed length decoding windows,” in Proceedings of the 2004 IEEE International Sym- posium on Information Theory, Chicago, Illinois, USA, June 27–July 2, 2004, p. 228.

[103] R. R. Varshamov and G. M. Tenengolts, “Codes which correct single asymmetric errors,” Automation and Remote Control, vol. 26, no. 2, pp. 286–290, 1965, originally published in Avtomatika i Telemekhanika, vol. 26, no. 2, pp. 288–292, 1965 (in Russian).

Rf-8 References

[104] G. M. Tenengolts, “Class of codes correcting bit loss and errors in the preceding bit,” Automation and Remote Control, vol. 37, no. 5, pp. 797–802, May 1976, originally published in Avtomatika i Telemekhanika, vol. 37, no. 5, pp. 174–179, May 1976 (in Russian).

[105] ——, “Nonbinary codes, correcting single deletion or insertion,” IEEE Transactions on Information Theory, vol. 30, no. 5, pp. 766–769, Sept. 1984.

[106] A. S. Dolgopolov, “Correction of multiple errors by q-ary codes,” Problems of In- formation Transmission, vol. 23, no. 2, pp. 117–121, Apr.–June 1987, originally published in Problemy Peredachi Informatsii, vol. 23, no. 2, Apr.–June 1987 (in Russian).

[107] ——, “Nonbinary codes that correct symbol insertions, drop-outs, and substitu- tions,” Problems of Information Transmission, vol. 21, no. 1, pp. 26–29, Jan.–Mar. 1985, originally published in Problemy Peredachi Informatsii, vol. 21, no. 1, Jan.– Mar. 1985 (in Russian).

[108] A. S. J. Helberg, W. A. Clarke, H. C. Ferreira, and A. J. H. Vinck, “A class of DC free, synchronization error correcting codes,” IEEE Transactions on Magnetics, vol. 29, no. 6, pp. 4048–4049, Nov. 1993.

[109] A. S. J. Helberg and H. C. Ferreira, “On multiple insertion/deletion correcting codes,” IEEE Transactions on Information Theory, vol. 48, no. 1, pp. 305–308, Jan. 2002.

[110] K. Iwamura and H. Imai, “A code to correct synchronization errors,” Electronics and Communications in Japan, part 3, vol. 76, no. 6, pp. 60–71, 1993, originally published in Trans. IEICE(A), vol. J75-A, no. 11, pp. 1718–1726, Nov. 1992 (in Japanese).

[111] M. Blaum, J. Bruck, C. M. Melas, and H. C. A. van Tilborg, “Methods for synchro- nizing (d, k)-constrained sequences,” in Proceedings of the 1994 IEEE International Conference on Communications, vol. 3, Piscateway IEEE Service Center, New Or- leans, LA, USA, May 1–5, 1994, pp. 1800–1808.

[112] T. Kløve, “Codes correcting a single insertion/deletion of a zero or a single peak- shift,” IEEE Transactions on Information Theory, vol. 41, no. 1, pp. 279–283, Jan. 1995.

[113] R. M. Roth and P. H. Siegel, “Lee-metric BCH codes and their application to con- strained and partial-response channels,” IEEE Transactions on Information Theory, vol. 40, no. 4, pp. 1083–1096, July 1994.

[114] P. A. H. Bours, “Construction of fixed-length insertion/deletion correcting runlength-limited codes,” IEEE Transactions on Information Theory, vol. 40, no. 6, pp. 1841–1856, Nov. 1996.

Rf-9 References

[115] L. J. Schulman and D. Zuckerman, “Asymptotically good codes correcting inser- tions, deletions and transpositions,” IEEE Transactions on Information Theory, vol. 45, no. 7, pp. 2552–2557, Nov. 1999.

[116] M. C. Davey and D. J. C. MacKay, “Watermark codes: Reliable communication over insertion/deletion channels,” in Proceedings of the 2000 IEEE International Symposium on Information Theory, Sorrento, Italy, June 25–30, 2000, pp. 25–30.

[117] J. Chen, M. Mitzenmacher, C. Ng, and N. Varnica, “Concatenated codes for deletion channels,” in Proceedings of the 2003 IEEE International Symposium on Informa- tion Theory, Yokohama, Japan, June 29–July 4, 2003, p. 218.

[118] T. G. Swart and H. C. Ferreira, “A note on double insertion/deletion correcting codes,” IEEE Transactions on Information Theory, vol. 49, no. 1, pp. 269–273, Jan. 2003.

[119] T. G. Swart, “Coding and bounds for correcting insertion/deletion errors,” Master’s thesis, Rand Afrikaans University, Johannesburg, South Africa, Mar. 2001.

[120] N. J. A. Sloane, “On single-deletion-correcting codes,” in Codes and Designs, K. T. Arasu and A. Seress, Eds. Walter de Gruyter, Berlin: Ray-Chaudhuri Festschrift, 2002, pp. 273–291. [Online]. Available: http://www.research.att.com/∼njas/

[121] T. Mori and H. Imai, “Viterbi decoding considering insertion/deletion errors,” in Proceedings of the 1995 IEEE International Symposium on Information Theory, Whistler, Canada, Sept. 17–22, 1995, p. 145.

[122] A. Bouloutas, G. W. Hart, and M. Schwartz, “Two extensions to the Viterbi al- gorithm,” IEEE Transactions on Information Theory, vol. 37, no. 2, pp. 430–436, Mar. 1991.

[123] T. G. Swart and H. C. Ferreira, “Insertion/deletion correcting coding scheme based on convolutional coding,” Electronics Letters, vol. 38, no. 16, pp. 871–873, Aug. 2002.

[124] M. P. F. dos Santos, W. A. Clarke, H. C. Ferreira, and T. G. Swart, “Correction of insertion/deletions using standard convolutional codes and the Viterbi decoding algorithm,” in Proceedings of the 2003 IEEE Information Theory Workshop, Paris, France, Mar. 31–Apr. 4, 2003, pp. 187–190.

[125] ——, “Correction of insertion/deletions using standard convolutional codes and the Viterbi decoding algorithm,” Transactions of the SAIEE, vol. 95, no. 4, pp. 265–269, Dec. 2004.

[126] T. G. Swart, H. C. Ferreira, and M. P. F. dos Santos, “Using parallel-interconnected Viterbi decoders to correct insertion/deletion errors,” in Proceedings of AFRICON 2004, Gabarone, Botswana, Sept. 15–17, 2004, pp. 341–344.

Rf-10 References

[127] L. Cheng, “Pruned convolutional codes and Viterbi decoding with the Levenshtein distance metric,” Master’s thesis, University of Johannesburg, Johannesburg, South Africa, June 2005.

[128] F. H. C. Crick, J. S. Griffith, and L. E. Orgel, “Codes without commas,” in Pro- ceedings of the National Academy of Sciences, vol. 43, 1957, pp. 416–421.

[129] T. Okuda, E. Tanaka, and T. Kasai, “A method for the correction of garbled words based on the Levenshtein metric,” IEEE Transactions on Computers, vol. c-25, no. 2, pp. 172–178, Feb. 1976.

[130] S. V. Petrovic and J. D. J. Golic, “String editing under a combination of con- straints,” Information Sciences, vol. 74, no. 1–2, pp. 151–163, Oct. 1993.

[131] B. J. Oommen and R. K. S. Loke, “Pattern recognition of strings with substitutions, insertions, deletions and generalized transpositions,” Pattern Recognition, vol. 30, no. 5, pp. 789–800, May 1997.

[132] M. F. Mansour and A. H. Tewfik, “Efficient decoding of watermarking schemes in the presence of false alarms,” in Proceedings of the 2001 IEEE Fourth Workshop on Multimedia and Signal Processing, Cannes, France, Oct. 3–5, 2001, pp. 523–528.

[133] A. H. Tewfik and M. F. Mansour, “Multimedia distribution: Personalization and secure watermarking,” in International Conference on Advances in Infrastructure for e-Business, e-Education, e-Science and e-Medicine on the Internet, no. SSGRR- 2002, L’Aquila, Italy, Jan. 2002, invited paper.

[134] M. F. Mansour and A. H. Tewfik, “Convolutional decoding for channels with false alarms,” in Proceedings of the 2002 IEEE International Conference on Acoustics, Speech, and Signal Processing, vol. 3, Orlando, Florida, USA, May 13–17 2002, pp. III–2501–III–2504.

[135] A. Albanese, J. Bl¨omer, J. Edmonds, M. Luby, and M. Sudan, “Priority encoding transmission,” in Proceedings of the 35th Annual Symposium on Foundations of Computer Science, Santa Fe, New Mexico, USA, Nov. 20–22, 1994, pp. 604–612.

[136] T. G. Swart, I. de Beer, and H. C. Ferreira, “On the distance optimality of per- mutation mappings,” in Proceedings of the 2005 IEEE International Symposium on Information Theory, Adelaide, Australia, Sept. 4–9, 2005, pp. 1068–1072.

[137] T. G. Swart and H. C. Ferreira, “A generalized upper bound and a multilevel con- struction for distance-preserving mappings,” IEEE Transactions on Information Theory, vol. 52, no. 8, pp. 3685–3695, Aug. 2006.

[138] M. Plotkin, “Binary codes with specified minimum distance,” IEEE Transactions on Information Theory, vol. 6, no. 4, pp. 445–450, Sept. 1960.

Rf-11 References

[139] T. G. Swart and H. C. Ferreira, “A multilevel construction for mappings from binary sequences to permutation sequences,” in Proceedings of the 2006 IEEE International Symposium on Information Theory, Seattle, WA, USA, July 9–14, 2006, pp. 1895– 1899.

[140] K. Ouahada, 2006, private communication.

[141] K. Ouahada, H. C. Ferreira, A. J. H. Vinck, and W. A. Clarke, “Combined higher order spectral nulls codes and OFDM modulation for power line communications,” in Proceedings of the International Symposium on Power-line Communications, Or- lando, Florida, USA, Mar. 26–29, 2006.

[142] N. J. A. Sloane, “The on-line encyclopedia of integer sequences,” 2005. [Online]. Available: http://www.research.att.com/∼njas/sequences/

[143] R. Bricard, L’Interm´ediaire des Math´ematiciens, vol. 8, pp. 312–313, 1901.

[144] H. Anand, V. C. Dumir, and H. Gupta, “A combinatorial distribution problem,” Duke Mathematical Journal, vol. 33, no. 4, pp. 757–769, Dec. 1966.

[145] E. Agrell, A. Vardy, and K. Zeger, “Upper bounds for constant-weight codes,” IEEE Transactions on Information Theory, vol. 46, no. 7, pp. 2373–2395, Nov. 2000.

[146] E. Rains and N. J. A. Sloane, “Table of constant weight binary codes,” 2005. [Online]. Available: http://www.research.att.com/∼njas/codes/Andw/

Rf-12