You are on page 1of 146
CODING THEORY The Essentials D.G. Hoffman D.A. Leonard C.C. Lindner K.T. Phelps C.A. Rodger J.R. Wall Auburn University ‘Auburn, Alabama Marcel Dekker, Inc. New York « Basel « Hong Kong Library of Congress Cataloging-in-Publication Data Coding theory: the eszentiale/D. G. Hoffman... [et a] Pp. cm, ~~ (Monographs and textbooks in pure and applied mathematics; 150) Includes bibliographical references (p. ) and index. ISBN 0-8247-8611-4 (acid-free paper) 1, Coding theory. I. Hoffman, D.G, I.Series QA268.C69 1992 003.54- ~de20 91-21383 cp This book is printed on acid-free paper. Copyright © 1991 by MARCEL DEKKER, INC. All Rights Reserved ‘Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, ‘and recording, or by any information storage and retrieval system, without per- ‘mission in writing from the publisher, MARCEL DEKKER, INC. 270 Madison Avenue, New York, New York 10016 ‘Current printing (last digit): 98765432 PRINTED IN THE UNITED STATES OF AMERICA Preface This book is designed to teach coding theory in a mathematically sound ‘manner to students in engineering, computer science, and mathematics. It differs from most other texts on the subject in two important ways: the “just in time Philosophy,” and unnecessary mathematical generalizations are omitted. ‘The “just in time” philosophy consists of introducing the necessary mathe- ‘matics just in time to be applied; ie. juxtaposed, with the applications. We don't have 200 pages of mathematics (most of which is irrelevant) followed by 200 pages of coding theory. So the format is roughly: mathematics, appli cations, mathematics, applications, ete. Avoiding unnecessary generalizations means that we don't find it necessaiy, for example, to describe a cyclic code as a principal ideal. In other words, we have for the most part omitted the mathe- ‘matical generalizations and terminology that would normally be used in teaching course in coding theory to a class consisting entirely of advanced mathematics majors. Our book deals exclusively with binary codes and codes over fields of charac- teristic 2, stressing the construction, encoding and decoding of several important families of codes. Primarily, we have chosen families of codes that are of interest in engineering and computer science, such at Reed-Solomon codes and convolu- tional codes, which have been used in deep space communications and consumer electronics (to name but two areas of application). ‘This choice of codes also reflects a broad range of algorithms for encoding and decoding. ‘This text been used to teach a two-quarter sequence in coding theory at Auburn University. ‘The minimal prerequisite for students taking this course is a rather elementary knowledge of linear algebra. However, the more linear algebra, as well as general modern algebra, students bring to the course the better. Students with more mathematical background and maturity will be able ‘to move rather quickly through the early material ‘The authors would very much appreciate any comments that users of this text ‘care to pass along. Our email address is KTPHELPSODUCVAX.AUBURN. EDU. ‘The authors wish to thank Mrs. Rosie Torbert for her exceptional technical ® PREFACE expertise in typing the manuscript. Her never failing good cheer in enduring the slings and arrows of constant revisions places her in the saint category. D. G. Hoffman, D. A. Leonard, C. ©. Lindner, K. T. Phelps, ©. A. Rodger, J. R. Wall Contents Preface List of Figures List of Tables 1 Introduction ta Coding Theory 11 Introduction 1.2 Basie Assumptions 13 Correcting and Detecting Error Patterns 14 Information Rate 15 The Effects of Error Correction and Detection 1.6 Finding the Most Likely Codeword Transmitted LT Some Basic Algebra, 18 Weight and Distance 1.9 Maximum Likelihood Decoding 1.10 Reliability of MED 1.11 Error-Detecting Codes 1.12 Error-Correcting Codes Linear Codes 21 Linear Codes 22 Two Important Subspaces 23 Independence, Basis, Dimension 24 Matrices 25 Bases for C =< $ > and C1 2.6 Generating Matrices and Encoding 2.1 Parity-Check Matrices 28 Equivalent Codes 29 Distance of a Linear Code 2.10 Cosets 2.11 MLD for Linear Codes 2.12 Reliability of IMLD for Linear Codes 2 “ 1 20 a 29 29 31 33 39 4 45 49 53 st 58 él 7 Perfect and Related Codes 3.1 Some Bounds for Codes 3.2. Perfect Codes 3.3 Hamming Codes 34 Extended Codes 3.5 The Extended Golay Code 3.6 Decoding the Extended Golay Code 3.7 The Golay Code 3.8 Reed-Muller Codes 3.9. Fast Decoding for RM(1,m) Cyclic Linear Codes 4.1 Polysiomials and Words 4.2. Introduction to Cyclic Codes 43. Polynomial Encoding and Decoding 44 Finding Cyclic Codes 43. Dual Cyclic Codes. BCH Codes 5.1 Finite Fields 5.2 Minimal Polynomials 53. Cyclic Hamming Codes 54 BOH Codes 5.5 Decoding 2 Error-Correcting BCH Code Reed-Solomon Codes 6.1 Codes over GF(2") 6.2. Reed-Solomon Codes 6.3 Decoding Reed Solomon Codee 64 ‘Transform Approach to Reed-Solomon Codes 6.5. Berlelamp-Massey Algorithm 6.6 Erasure. Burst Error-Correcting Codes 7A Introduction 72. Interleaving 73. Application to Compact Dises Convolutional Codes 8.1 Shift Registers and Polynomials 82. Encoding Convolutional Codes 83 Decoding Convolutional Codes 84 Truncated Viterbi Decoding CONTENTS 69 69 15 Tt 2 Ss 87 9 93 97 7 102 108 n3 u7 124 121 125 128 130 133 139 139 M2 “7 14 161 164 im im 115 182 185 185 191 199 206 CONTENTS 9 Reed-Muller and Preparata Codes 9.1 Reed-Muller Codes 9.2 Decoding Reed-Muller Codes 9.3 Extended Preparata Codes 9.4 Encoding Extended Preparata Codes 9.5 Decoding Extended Preparata Codes APPENDIXES A The Buclidean Algorithm B Factorization of 142" C Example of Compact Disc Encoding D Answers to Selected Exercises Bibliography Index 219 219 235 237 243 2ar 249 253 an 25 List of Figures BA shift register 8.2. A feedback shift register 8.3 Encoding the (2, 1,3) convolutional code C 84 Encoding a (3,2,3) convolutional code 8.5 Encoding a (3,2,3) convolutional code 8.6 The state diageam for C; 8.7 Information for the first decoding decision 8.8 Information tor the second decoding decision 8.9. The state diagram of a catastrophic convolutional code 8.10 The state diagram of Cy 9.1 The generator matrix Ge. 9.2 Majority logic decoding of RM(2,4), Step 1 (see Example 9.2.6) 9.3 Majority logic decoding of RM(2,4), Step 2 (see Example 9.2.6), 185 189 193, 195 195 197 200 201 202 208 222 228 27 List of Tables 11 IMLD table for Example 1.9.8 6 1.2 IMLD table for Example 1.9.4 16 5. Construction of GF(24) using h(z) = 142424 124 52 Minimal polynomials in GF(24) 128 53. The parity check matrix of Cis 132 11 Interleaving to depth » 15 72. sframe delayed interleaving im C.1_ Message stream and first encoding 29 CODING THEORY Chapter 1 Introduction to Coding Theory 1.1 Introduction Coding theory is the study of methods for efficient and accurate transfer of information from one place to another. The theory has been developed for such