It was quickly noticed by Prange that the class of cyclic codes has a rich algebraic structure the 64257rst indication that algebra would be a valuable tool in code design The linear code of length is a cyclic code if it is invariant under a cyclic ID: 73349
Download Pdf The PPT/PDF document "Chapter Cyclic Codes Among the rst code..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Chapter8CyclicCodesAmongtherstcodesusedpracticallywerethecycliccodeswhichweregen-eratedusingshiftregisters.ItwasquicklynoticedbyPrangethattheclassofcycliccodeshasarichalgebraicstructure,therstindicationthatalgebrawouldbeavaluabletoolincodedesign.ThelinearcodeCoflengthnisacycliccodeifitisinvariantunderacycliccycliccodeshift:c=(c0;c1;c2:::;cn2;cn1)2Cifandonlyif~c=(cn1;c0;c1:::;cn3;cn2)2C:AsCisinvariantunderthissinglerightcyclicshift,byiterationitisinvariantunderanynumberofrightcyclicshifts.Asasingleleftcyclicshiftisthesameasn1rightcyclicshifts,Cisalsoinvariantunderasingleleftcyclicshiftandhenceallleftcyclicshifts.ThereforethelinearcodeCiscyclicpreciselywhenitisinvariantunderallcyclicshifts.Therearesomeobviousexamplesofcycliccodes.The0-codeiscertainlycyclicasisFn.Lesstrivially,repetitioncodesarecyclic.Thebinaryparitycheckcodeisalsocyclic,andthisgoesovertothesum-0codesoveranyeld.Noticethatthisshiftinvariancecriteriondoesnotdependatalluponthecodebeinglinear.Itispossibletodenenonlinearcycliccodes,butthatisrarelydone.Thehistoryofcycliccodesasshiftregistercodesandthemathematicalstructuretheoryofcycliccodesbothsuggestthestudyofcyclicinvarianceinthecontextoflinearcodes.8.1BasicsItisconvenienttothinkofcycliccodesasconsistingofpolynomialsaswellascodewords.Witheveryworda=(a0;a1;:::;ai;:::;an2;an1)2Fn101 102CHAPTER8.CYCLICCODESweassociatethepolynomialofdegreelessthanna(x)=a0+a1x++aixi++an1xn12F[x]n:(Weseeherewhyinthischapterweindexcoordinatesfrom0ton1.)IfcisacodewordofthecodeC,thenwecallc(x)theassociatedcodepolynomial.codepolynomialWiththisconvention,theshiftedcodeword~chasassociatedcodepolynomial~c(x)=cn1+c0x+c1x2++cixi+1++cn2xn1:Thus~c(x)isalmostequaltotheproductpolynomialxc(x).Moreprecisely,~c(x)=xc(x)cn1(xn1):Therefore~c(x)alsohasdegreelessthannandisequaltotheremainderwhenxc(x)isdividedbyxn1.Inparticular~c(x)=xc(x)(modxn1):Thatis,~c(x)andxc(x)areequalintheringofpolynomialsF[x](modxn1),wherearithmeticisdonemodulothepolynomialxn1.Ifc(x)isthecodepolynomialassociatedwithsomecodewordcofC,thenwewillallowourselvestoabusenotationbywritingc(x)2C:Indeed,iff(x)isanypolynomialofF[x]whoseremainder,upondivisionbyxn1,belongstoCthenwemaywritef(x)2C(modxn1):Withthesenotationalconventionsinmind,weseethatourdenitionofthecycliccodeChasthepleasingpolynomialformc(x)2C(modxn1)ifandonlyifxc(x)2C(modxn1):SinceadditionalshiftsdonottakeusoutofthecycliccodeC,wehavexic(x)2C(modxn1);foralli.Bylinearity,foranyai2F,aixic(x)2C(modxn1)andindeeddXi=0aixic(x)2C(modxn1);Thatis,foreverypolynomiala(x)=Pdi=0aixi2F[x],theproducta(x)c(x)(ormoreproperlya(x)c(x)(modxn1))stillbelongstoC.Thisobservation,duetoPrange,openedthewayfortheapplicationofalgebratocycliccodes. 8.1.BASICS103(8.1.1)Theorem.LetC6=f0gbeacycliccodeoflengthnoverF.(1)Letg(x)beamoniccodepolynomialofminimaldegreeinC.Theng(x)isuniquelydeterminedinC,andC=fq(x)g(x)jq(x)2F[x]nrg;wherer=deg(g(x)).Inparticular,Chasdimensionnr.(2)Thepolynomialg(x)dividesxn1inF[x].Proof.AsC6=f0g,itcontainsnonzerocodepolynomials,eachofwhichhasauniquemonicscalarmultiple.Thusthereisamonicpolynomialg(x)inCofminimaldegree.Letthisdegreeber,uniqueevenifg(x)isnot.Bytheremarksprecedingthetheorem,thesetofpolynomialsC0=fq(x)g(x)jq(x)2F[x]nrgiscertainlycontainedinC,sinceitiscomposedofthosemultiplesofthecodepolynomialg(x)withtheadditionalpropertyofhavingdegreelessthann.UnderadditionandscalarmultiplicationC0isanF-vectorspaceofdimensionnr.Thepolynomialg(x)istheuniquemonicpolynomialofdegreerinC0.Toprove(1),wemustshowthateverycodepolynomialc(x)isanF[x]-multipleofg(x)andsoisinthesetC0.BytheDivisionAlgorithmA.2.5wehavec(x)=q(x)g(x)+r(x);forsomeq(x);r(x)2F[x]withdeg(r(x))r=deg(g(x)).Thereforer(x)=c(x)q(x)g(x):Bydenitionc(x)2Candq(x)g(x)isinC0(asc(x)hasdegreelessthann).Thusbylinearity,therighthandsideofthisequationisinC,hencetheremaindertermr(x)isinC.Ifr(x)wasnonzero,thenitwouldhaveamonicscalarmultiplebelongingtoCandofsmallerdegreethanr.Butthiswouldcontradicttheoriginalchoiceofg(x).Thereforer(x)=0andc(x)=q(x)g(x),asdesired.Nextletxn1=h(x)g(x)+s(x);forsomes(x)ofdegreelessthandeg(g(x)).Then,asbefore,s(x)=(h(x))g(x)(modxn1)belongstoC.Again,ifs(x)isnotzero,thenithasamonicscalarmultiplebelongingtoCandofsmallerdegreethanthatofg(x),acontradiction.Thuss(x)=0andg(x)h(x)=xn1,asin(2).2Thepolynomialg(x)iscalledthegeneratorpolynomialforthecodeC.generatorpolynomialThepolynomialh(x)2F[x]determinedbyg(x)h(x)=xn1 104CHAPTER8.CYCLICCODESisthecheckpolynomialofC.checkpolynomialUndersomecircumstancesitisconvenienttoconsiderxn1tobethegeneratorpolynomialofthecycliccode0oflengthn.Thenbythetheorem,thereisaone-to-onecorrespondencebetweencycliccodesoflengthnandmonicdivisorsofxn1inF[x].Example.Considerlength7binarycycliccodes.Wehavethefactor-izationintoirreduciblepolynomialsx71=(x1)(x3+x+1)(x3+x2+1):Sincewearelookingatbinarycodes,alltheminussignscanbereplacedbyplussigns:x7+1=(x+1)(x3+x+1)(x3+x2+1):Asthereare3irreduciblefactors,thereare23=8cycliccodes(in-cluding0andF72).The8generatorpolynomialsare:(i)1=1(ii)x+1=x+1(iii)x3+x+1=x3+x+1(iv)x3+x2+1=x3+x2+1(v)(x+1)(x3+x+1)=x4+x3+x2+1(vi)(x+1)(x3+x2+1)=x4+x2+x+1(vii)(x3+x+1)(x3+x2+1)=x6+x5+x4+x3+x2+x+1(viii)(x+1)(x3+x+1)(x3+x2+1)=x7+1Herein(i)thepolynomial1generatesallF72.In(ii)wendtheparitycheckcodeandin(vii)therepetitioncode.Asmentionedbefore,in(viii)weviewthe0-codeasbeinggeneratedbyx7+1.Thepolynomialsof(iii)and(iv)havedegree3andsogenerate[7;4]codes,whichweshalllaterseeareHammingcodes.The[7;3]codesof(v)and(vi)arethedualsoftheHammingcodes.(8.1.2)Problem.Howmanycycliccodesoflength8overF3arethere?Giveageneratorpolynomialforeachsuchcode.(8.1.3)Problem.Provethatthereisnocycliccodethatis(equivalentto)an[8;4]extendedbinaryHammingcode.(8.1.4)Problem.LetcycliccodeChavegeneratorpolynomialg(x).ProvethatCiscontainedinthesum-0codeifandonlyifg(1)=0.(8.1.5)Problem.LetCbeacycliccode.LetCbethecoderesultingfromshorteningCatasingleposition,andletCbethecoderesultingfrompuncturingCatasingleposition.(a)GiveallCforwhichCiscyclic.(b)GiveallCforwhichCiscyclic.Thecheckpolynomialearnsitsnamebythefollowing 8.1.BASICS105(8.1.6)Proposition.IfCisthecycliccodeoflengthnwithcheckpolynomialh(x),thenC=fc(x)2F[x]njc(x)h(x)=0(modxn1)g:Proof.Thecontainmentinonedirectioniseasy.Indeedifc(x)2C,thenbyTheorem8.1.1thereisaq(x)withc(x)=q(x)g(x).Butthenc(x)h(x)=q(x)g(x)h(x)=q(x)(xn1)=0(modxn1):Nowconsideranarbitrarypolynomialc(x)2F[x]nwithc(x)h(x)=p(x)(xn1);say:Thenc(x)h(x)=p(x)(xn1)=p(x)g(x)h(x);hence(c(x)p(x)g(x))h(x)=0:Asg(x)h(x)=xn1,wedonothaveh(x)=0.Thereforec(x)p(x)g(x)=0andc(x)=p(x)g(x);asdesired.2Ifweareinpossessionofageneratorpolynomialg(x)=Prj=0gjxjforthecycliccodeC,thenwecaneasilyconstructageneratormatrixforC.ConsiderG=26666664g0g1gr1gr00:::00g0g1gr1gr0:::0........................................................................00:::0g0g1gr1gr37777775ThematrixGhasncolumnsandk=nrrows;sotherstrow,rowg0,nisheswithastringof0'soflengthk1.Eachsuccessiverowisthecyclicshiftofthepreviousrow:gi=~gi1,fori=1;:::;k1.Asg(x)h(x)=xn1,wehaveg0h0=g(0)h(0)=0n16=0:Inparticularg06=0(andh06=0).ThereforeGisinechelonform(althoughlikelynotreduced).Inparticularthek=dim(C)rowsofGarelinearlyinde-pendent.ClearlytherowsofGbelongtoC,soGisindeedageneratormatrixforC,sometimescalledthecyclicgeneratormatrixofC.cyclicgeneratormatrix 106CHAPTER8.CYCLICCODESForinstance,ifCisa[7;4]binarycycliccodewithgeneratorpolynomial1+x+x3,thenthecyclicgeneratormatrixis266411010000110100001101000011013775GiventhecyclicgeneratormatrixG,cyclicencodingistheprocessofen-cyclicencodingcodingthemessagek-tuplem=(m0;:::;mk1)intothecodewordc=mG.Atthepolynomiallevel,thiscorrespondstoencodingthemessagepolynomialmessagepolynomialm(x)=Pk1i=0mixiintothecodepolynomialc(x)=m(x)g(x).SincethecyclicgeneratorGisinechelonform,therstkcoordinatepo-sitionsformaninformationset.ThereforecyclicChasastandardgeneratormatrix,althoughthecyclicgeneratormatrixisalmostneverstandard(orevensystematic).(8.1.7)Problem.(a)Describeallsituationsinwhichthecyclicgeneratormatrixforacycliccodeisthestandardgeneratormatrix.(b)Describeallsituationsinwhichthecyclicgeneratormatrixforacycliccodeissystematic.WenextpresentforcyclicCalinearencodingmethodcorrespondingtothestandardgeneratormatrix.Namelym=(m0;:::;mk1)7!c=(m0;:::;mk1;s0;s1;:::;sr1);wheres(x)=Pr1j=0sjxjistheremainderupondividingxrm(x)byg(x).Thatis,xrm(x)=q(x)g(x)+s(x);withdeg(s(x))deg(g(x))=r.Toseethatthisisthecorrectstandardencod-ing,rstnotethatxrm(x)s(x)=q(x)g(x)=b(x)2Cwithcorrespondingcodewordb=(s0;s1;:::;sr1;m0;:::;mk1):AsthisisacodewordofcyclicC,everycyclicshiftofitisalsoacodeword.Inparticularthecgivenaboveisfoundafterkrightshifts.ThuscisacodewordofC.SinceCissystematicontherstkpositions,thiscodewordistheonlyonewithmonthosepositionsandsoistheresultofstandardencoding.Toconstructthestandardgeneratormatrixitself,weencodethekdierentk-tuplemessages(0;0;:::;0;1;0;:::;0)ofweight1correspondingtomessagepolynomialsxi,for0ik1.Thesearetherowsofthestandardgeneratormatrix.Whenwetrythisforthe[7;4]binarycycliccodewithgeneratorx3+x+1(sor=74=3),wend,forinstance,x3x2=(x2+1)(x3+x+1)+(x2+x+1) 8.1.BASICS107sothatthethirdrowofthestandardgeneratormatrix,correspondingtomessagepolynomialx2,is(m0;m1;m2;m3;s0;s1;s2)=(0;0;1;0;1;1;1):Proceedinginthisway,wendthatthestandardgeneratormatrixis266410001100100011001011100011013775ByProblem4.1.9,CisaHammingcode(althoughthiscanalsobecheckedeasilybyhand).Thisprocessofsystematicencodingforcycliccodesisimportantinpractice,systematicencodingsinceamachinecanbetransmittingtheinformationsymbolsfrommduringthetimeitiscalculatingthechecksymbolssj.(8.1.8)Problem.(a)Findthecyclicandstandardgeneratormatricesforthe[7;4]binarycycliccodeDwithgeneratorpolynomialx3+x2+1.(b)Findthecyclicandstandardgeneratormatricesforthe[15;11]binarycycliccodeEwithgeneratorpolynomialx4+x+1.(c)ProvethatDandEareHammingcodes.Acodeequivalenttoacycliccodeneednotbecyclicitself.Forinstance,thereare30distinctbinary[7;4]Hammingcodes;but,aswesawintheexampleabove,onlytwoofthemarecyclic.Onepermutationdoestakecycliccodestocycliccodes.ThereversecodereversecodeC[1]ofacycliccodeC,gottenbyreversingeachcodeword,isstillcyclic.Wehave(c0;c1;:::;ci;:::;;cn1)2C()(cn1;:::;cn1i;:::;c1;c0)2C[1]:Inpolynomialnotation,thisbecomesc(x)2C()xn1c(x1)2C[1]:Forthepolynomialp(x)ofdegreed,weletitsreciprocalpolynomialbegivenbyreciprocalpolynomialp[1](x)=dXi=0pdixi=xdp(x1):Therootsofthereciprocalpolynomialarethereciprocalsofthenonzerorootsoftheoriginalpolynomial.(8.1.9)Lemma.Ifg(x)generatescyclicC,theng10g[1](x)generatesC[1],thereversecodeofC. 108CHAPTER8.CYCLICCODESProof.StartingfromthecyclicgeneratormatrixforC,wereversealltherowsandthenwritethemfrombottomtotop.Theresultis26666664grgr1g1g000:::00grgr1g1g00:::0........................................................................00:::0grgr1g1g037777775:TherowsofthismatrixcertainlybelongtoC[1].Asbefore,theyarelinearlyindependentsinceg06=0.ThereforewehaveageneratormatrixforC[1].Itsrstrowvisiblycorrespondstoanonzerocodepolynomialofdegreelessthanr,whichisseentobeg[1](x).ByTheorem8.1.1themonicscalarmultipleg10g[1](x)isthegeneratorpolynomial.(Infact,wehaveascalarmultipleofthecyclicgeneratormatrixforC[1].)2ItiseasytoseethatthedualofacycliccodeCisagainacycliccode.Proposition8.1.6suggeststhatthedualisassociatedwiththecheckpolynomialofC.LetthecycliccodeCoflengthnhavegeneratorpolynomialg(x)ofdegreerandcheckpolynomialh(x)ofdegreek=nr=dimC.Ash(x)isadivisorofxn1,itisthegeneratorpolynomialforacycliccodeDoflengthnanddimensionnk=n(nr)=r.WehaveC=fq(x)g(x)jq(x)2F[x]kgandD=fp(x)h(x)jp(x)2F[x]rg:Letc(x)=q(x)g(x)2C,sothatdeg(q(x))k1;andletd(x)=p(x)h(x)2D,sothatdeg(p(x))r1.Considerc(x)d(x)=q(x)g(x)p(x)h(x)=q(x)p(x)(xn1)=s(x)(xn1)=s(x)xns(x);wheres(x)=q(x)p(x)withdeg(s(x))(k1)+(r1)=r+k2=n2n1:Thereforethecoecientofxn1inc(x)d(x)is0.Ifc(x)=Pn1i=0cixiandd(x)=Pn1j=0djxj,theningeneralthecoecientofxminc(x)d(x)isPi+j=mcidj.In 8.2.CYCLICGRSCODESANDREED-SOLOMONCODES109particular,thetwodeterminationsofthecoecientofxn1inc(x)d(x)give0=Xi+j=n1cidj=n1Xi=0cidn1i=c0dn1+c1dn2++cidni++cn1d0=cd:wherec=(c0;c1;:::;ci;:::;cn1)andd=(dn1;dn2;:::;dni;:::;d0):Thatis,eachcodewordcofChasdotproduct0withthereverseofeachcodeworddofD.ThereforeC?containsD[1].Alsodim(C?)=ndim(C)=nk=r=ndeg(h[1](x))=dim(D[1]);sofromLemma8.1.9weconclude(8.1.10)Theorem.IfCisthecycliccodeoflengthnwithcheckpolynomialh(x),thenC?iscyclicwithgeneratorpolynomialh10h[1](x).28.2CyclicGRScodesandReed-SolomoncodesForaprimitiventhrootofunityintheeldF,set(a)=((0)a;:::;(j)a;:::;(n1)a)=((a)0;:::;(a)j;:::;(a)n1):Inparticular,=(1)and(0)=1,theall1-vector.Thebasicobservationisthat~(a)=((n1)a;(0)a;:::;(j)a;:::;(n2)a)=a((0)a;(1)a;:::;(j)a;:::;(n1)a)=a(a):Thusacyclicshiftof(a)isalwaysascalarmultipleof(a).(8.2.1)Proposition.GRSn;k(;(a))iscyclic.Proof.For0ik1and0jn1,the(i;j)-entryofthecanonicalgeneratormatixisvjij=(j)a(j)i=jaji=(j)a+i: 110CHAPTER8.CYCLICCODESThereforethecanonicalgeneratormatrixhasasrowsthekcodewords(a+i),fori=0;:::;k1.Wehaveseenabovethatshiftinganyoftheseonlygivesscalarmultiples,sothecodeitselfisinvariantundershifting.2AcycliccodeGRSn;k(;(a))asinProposition8.2.1isaReed-Solomoncode.Itissaidtobeprimitiveifn=jFj1andofnarrow-senseifa=0(soReed-Solomoncodeprimitivenarrow-sensethatv=(a)=1).(8.2.2)Lemma.Ifn=1and=(0;:::;n1),thenGRSn;k(;(a))?=GRSn;nk(;(1a)):Proof.ByTheorem5.1.6GRSn;k(;(a))?=GRSn;nk(;u);where,for0jn1andv=(a),wehaveuj=v1jLj(j)1.ByProblem5.1.5(c),Lj(j)=n(j)1(6=0).Thusuj=((j)a)1(n(j)1)1=n1jaj=n1(j)1aThereforeu=n1(1a),sobyProblem5.1.3(a)GRSn;k(;(a))?=GRSn;nk(;n1(1a))=GRSn;nk(;(1a))asdesired.2(8.2.3)Theorem.An[n;k]Reed-SolomoncodeoverFisacycliccodewithgeneratorpolynomialtYj=1(xj+b)wheret=nk,theintegerbisaxedconstant,andisaprimitiventhrootofunityinF.ThisReed-Solomoncodeisprimitiveifn=jFj1andnarrow-senseifb=0.Proof.LetC=GRSn;k(;(a)).TherowsofthecanonicalgeneratormatrixofthedualcodeC?are,byLemma8.2.2andapreviouscalculation,thevectors(ja),for1jt.Therefore,forc=(c0;:::;ci;:::;cn1)and 8.3.CYLICALTERNANTCODESANDBCHCODES111c(x)=Pn1i=0cixi,c2C()c(ja)=0;1jt()n1Xi=0ci(i)ja=0;1jt()n1Xi=0ci(ja)i=0;1jt()c(ja)=0;1jt:Thus,writingcyclicCintermsofpolynomials,wehavebyLemmaA.2.8c(x)2C()c(ja)=0;1jt()tYj=1(xj+b)dividesc(x);forb=a.AsQtj=1(xj+b)ismonicandhasdegreet=nk,itisthegeneratorpolynomialofCbyTheorem8.1.1.AlsoisaprimitiveelementofFwhenn=jFj1;andCisnarrow-sensewhena=0,thatis,whenb=a=0.2Inmostplaces,thestatementofTheorem8.2.3istakenasthedenitionofaReed-Solomoncode.ItisthenproventhatsuchacodeisMDSwithdmin=t+1=nk+1.OurdevelopmentissomewhatclosertotheoriginalpresentationofReedandSolomonfrom1960.(8.2.4)Problem.ProvethatEGRSq+1;k(; ;w),wherejFj=q,ismonomiallyequivalenttoacycliccodewhenqisevenandtoanegacycliccodewhenqisodd.HereacodeCisnegacyclicprovidednegacyclic(c0;c1;c2:::;cn2;cn1)2Cifandonlyif(cn1;c0;c1:::;cn3;cn2)2C:(Hint:SeeTheorem6.3.4.)8.3CylicalternantcodesandBCHcodesLetKFbeelds.StartingwiththeReed-SolomoncodeGRSn;k(;(a))overF,thecyclic,alternantcodeC=Kn\GRSn;k(;(a))iscalledaBCHcodeofdesigneddistancet+1,wheret=nk.Cisprimitiveifn=jFj1andnarrow-senseifa=0(thatistosay,v=1). 112CHAPTER8.CYCLICCODES(8.3.1)Theorem.ABCHcodeCoflengthnanddesigneddistancet+1overKisacycliccodecomposedofallthosecodepolynomialsc(x)2K[x]ofdegreelessthannsatisfyingc(b+1)=c(b+2)=c(b+3)==c(b+t)=0;wherebisaxedintegerandisaprimitiventhrootofunityintheeldFK.Thecodeisprimitiveifn=jFj1andisnarrow-senseifb=0.ThecodeCislinearandcyclicwithgeneratorpolynomiallcm1jtfmj+b;K(x)g:Ithasminimumdistanceatleastt+1anddimensionatleastnmt,wherem=dimKF.Proof.TherstparagraphisanimmediateconsequenceofTheorem8.2.3andthedenitions.AsCisthealternantcodeKn\GRSn;k(;(a)),itisbyTheorem7.5.1linearofminimumdistanceatleastnk+1=t+1anddimensionatleastnm(nk)=nmt.TheformtakenbythegeneratorpolynomialfollowsfromtherstparagraphandLemmaA.3.19oftheAppendix.2AswithReed-Solomoncodes,therstparagraphofthistheoremconsistsoftheusualdenitionofaBCHcode.Indeed,thatisessentiallytheoriginaldef-initionasgivenbyBoseandRay-Chaudhuri(1960)andHocquenghem(1959).(Thecodeswerethengiventhesomewhatinaccurateacronymasname.)ItthenmustbeproventhatthedesigneddistanceofaBCHcodegivesalowerboundfortheactualminimumdistance.InmanyplacesReed-SolomoncodesaredenedasthoseBCHcodesinwhichtheeldsFandKarethesame.Historically,thetwoclassesofcodeswerediscoveredindependentlyandtheconnectionsonlynoticedlater.SometimesonetakesadierentviewofTheorem8.3.1,viewingitinsteadasageneralboundoncycliccodesintermsofrootpatternsforthegeneratorpolynomial.(8.3.2)Corollary.(BCHBound.)LetCbeacycliccodeoflengthnoverKwithgeneratorpolynomialg(x).Supposethatg(j+b)=0,forsomexedband1jt,whereisaprimitiventhrootofunityintheeldFK.Thendmin(C)t+1.Proof.Inthiscase,CisasubcodeofaBCHcodewithdesigneddistancet+1.2Thiscorollaryadmitsmanygeneralizations,thegeneralformofwhichstatesthatacertainpatternofrootsforthegeneratorpolynomialofacycliccodeimpliesalowerboundfortheminimumdistance. 8.3.CYLICALTERNANTCODESANDBCHCODES113(8.3.3)Problem.AssumethatthecycliccodeChasgeneratorpolynomialg(x)withg(1)6=0.Provethat(x1)g(x)isthegeneratorpolynomialofthesum-0subcodeofC(thosecodewordsofCwhosecoordinateentriessumto0).ThelastsentenceinthetheoremgivesustwolowerboundsforBCHcodes,onefortheminimumdistance(theBCHbound)andoneforthedimension.Aswepreferlargedistanceanddimension,wewouldhopetondsituationsinwhichoneorbothoftheseboundsarenotmetexactly.Foranycycliccode,thegeneratorpolynomialhasdegreeequaltotheredundancyofthecode.InTheorem8.3.1thatdegree/redundancyisboundedabovebymt.Thisboundwillbemetexactlyifandonlyifeachoftheminimalpolynomialsmj+b;K(x)hasthemaximumpossibledegreemand,additionally,allofthesepolynomials,for1jt,aredistinct.Thissoundsanunlikelyeventbutcan,infact,happen.Converselyweoftencanmakeourchoicessoastoguaranteethatthedegreeofthegeneratorisdramaticallylessthanthismaximum.Weshallseebelowthatthetwoboundsofthetheoremareindependentandcanbeeithermetorbeaten,dependinguponthespeciccircumstances.(BothboundsaretightforReed-Solomoncodes,butthereareothercasesaswellwherethishappens.)(8.3.4)Corollary.(1)Abinary,narrow-sense,primitiveBCHcodeofdesigneddistance2isacyclicHammingcode.(2)Abinary,narrow-sense,primitiveBCHcodeofdesigneddistance3isacyclicHammingcode.Proof.Letn=2m1andK=F2F2m=F.LetbeaprimitiveelementinF2m(soithasordern).Thentheassociateddesigneddistance2codeC2hasgeneratorpolynomialm(x)=m(x)=m;F2(x)ofdegreem,theminimalpolynomialofovertheprimesubeldF2.Thecorrespondingdesigneddistance3codeC3hasgeneratorpolynomiallcmfm(x);m2(x)g:FromTheoremA.3.20welearnthatm2(x)=m(x).Thereforethislcmisagainequaltom(x),andC2andC3bothhavegeneratorpolynomialm(x)ofdegreem.ThusC2=C3hasdimensionnm=2m1mandminimumdistanceatleast3.ItisthereforeaHammingcodebyProblem4.1.3orProblem4.1.9.(AlternativelyC2is,byLemma8.2.2,equaltothealternantcodeFn2\GRSn;1(;)?,whichwehavealreadyidentiedasaHammingcodeinSection7.5.)2FromthiscorollarywelearnthatitispossibletondBCHcodeswithinequalityinthedistancebound(BCHbound)andequalityinthedimensionboundofTheorem8.3.1(dmin(C2)=31+1anddim(C2)=nm1)andalsoBCHcodeswithequalityinthedistanceboundandinequalityinthedimensionbound(dmin(C3)=3=2+1anddim(C3)=nmnm2). 114CHAPTER8.CYCLICCODESAsinthecorollary,narrow-sensecodesfrequentlyhavebetterparametersthanthosethatarenot.Forinstance,inthesituationofthecorollary,thedesigneddistance2codewithb=1hasgeneratorpolynomialm11;F2(x)=x1.Thiscodeistheparitycheckcodewithdminindeedequalto2anddimensionn1(nm).Whenn=15(sothatm=4),thedesigneddistance2codewithb=2hasgeneratorpolynomialm1+2;F2(x)=x4+x3+x2+x+1=(x51)=(x1);since(3)5=15=1.Thereforethiscodemeetsbothboundsexactly,hav-ingdimension11=154andminimumdistance2,asitcontainsthecodepolynomialx51.Considernextthebinary,narrow-sense,primitiveBCHcodewithlength15anddesigneddistance5,denedusingasprimitiveelementarootoftheprimitivepolynomialx4+x+1.Thegeneratorpolynomialis,byTheorem8.3.1,g(x)=lcm1j4fmj(x)g:Bydenitionm(x)=x4+x+1,andwefoundm3(x)=x4+x3+x2+x+1above.ByTheoremA.3.20oftheAppendix,m(x)=m2(x)=m4(x);thereforeg(x)=m(x)m3(x)=(x4+x+1)(x4+x3+x2+x+1)=x8+x7+x6+x4+1:Inparticular,thecodehasdimension158=7,whereastheboundofTheorem8.3.1isuseless,claimingonlythatthedimensionisatleast1544=1.Furthermoreg(x)itselfhasweight5,sointhiscasethedesigneddistance5codehasminimumdistanceexactly5.(Althoughthegeneratorpolynomialalwayshasrelativelylowweight,ingeneralitwillnothavetheminimumweight.Stillitisoftenworthchecking.)Weseeagainheretheadvantageoflookingatnarrow-sensecodes.ByTheoremA.3.20,wheneveriisarootofm(x),then2iisaswell(inthebinarycase).Inparticular,thebinary,narrow-sense,designeddistance2dcode,givenbyrootsj,for1j2d1,isalsoequaltothedesigneddistance2d+1code,givenbyrootsj,for1j2d,sincedarootimplies2disaswell.(WesawaparticularcaseofthisinCorollary8.3.4.)SimilarbutweakerstatementscanbemadefornonbinaryBCHcodesbyappealingtoTheoremA.3.20orthemoregeneralProblemA.3.21.WealsoseethatTheoremA.3.20andProblemA.3.21canbeusedeec-tivelytocalculatetheparametersandgeneratorpolynomialsofBCHcodes.Considernextabinary,narrow-sense,primitiveBCHcodeCoflength31withdesigneddistance8.ThepreviousparagraphalreadytellsusthatCisalsothecorrespondingdesigneddistance9code,butmoreistrue.Wehavegeneratorpolynomialg(x)=lcm1j8fmj(x)g=m(x)m3(x)m5(x)m7(x); 8.3.CYLICALTERNANTCODESANDBCHCODES115whereisanarbitrarybutxedprimitive31strootofunityinF32.ByTheoremA.3.20m(x)=(x)(x2)(x4)(x8)(x15);m3(x)=(x3)(x6)(x12)(x24)(x17);m5(x)=(x5)(x10)(x20)(x9)(x18);m7(x)=(x7)(x14)(x28)(x25)(x19):ThereforeChasdimension3145=11.Wealsodiscoverthatwehavegottentheroots9and10`forfree',sothatthedesigneddistance8(9)BCHcodeisactuallyequaltothedesigneddistance11code(sointhiscase,neitheroftheboundsofTheorem8.3.1holdwithequality).ItisworthnotingthatwecancalculatethisdimensionandimprovedBCHboundwithoutexplicitlyndingthegeneratorpolynomial.Thecalculationsarevalidnomatterwhichprimitiveelementwechoose.Examplesbelowndexplicitgeneratorpolynomials,usingsimilarcalculationsbaseduponTheoremA.3.20.Thegoodfortuneseeninthepreviousparagraphcanoftenbedramatic.Berlekamphasnotedthatthebinary,narrow-sense,primitiveBCHcodeoflength2121anddesigneddistance768isequaltothecorrespondingdesigneddistance819code.Ontheotherhand,therearemanysituationswheretheBCHboundstilldoesnotgivethetrueminimumdistance.Roos,VanLint,andWilsonhavenotedthatthebinarylength21codewithgeneratorpolynomialm(x)m3(x)m7(x)m9(x);whichhasasrootsj(a21strootofunity)forj2f1;2;3;4;6;7;8;9;11;12;14;15;16;18g;hastrueminimumdistance8,whereastheBCHboundonlyguaranteesdistanceatleast5.Examples.(i)Letbearootoftheprimitivepolynomialx4+x3+12F2[x].Whatisthegeneratorofthebinary,narrow-sense,primitiveBCHcodeC1oflength15anddesigneddistance5?Thecodeiscomposedofallpolynomialsc(x)2F2[x]thathaveeachof1;2;3;4asaroot.Thereforec(x)isdivisiblebym(x)=(x1)(x2)(x4)(x8)=x4+x3+1andalsobym3(x)=(x3)(x6)(x12)(x9)=x4+x3+x2+x+1:SoC1hasgeneratorg1(x)=(x4+x3+1)(x4+x3+x2+x+1)=x8+x4+x2+x+1: 116CHAPTER8.CYCLICCODESAsg1(x)hasdegree8,thecodehasdimension158=7.(Hereagainthegeneratorhasweight5,sotheminimaldistanceofthiscodeequals5.)(ii)Letbearootoftheprimitivepolynomialx5+x2+12F2[x].Whatisthegeneratorofthebinary,narrow-sense,primitiveBCHcodeC2oflength31anddesigneddistance5?Againthecodeiscomposedofallpolynomialsc(x)2F2[x]thathaveeachof1;2;3;4asaroot.Thereforec(x)isdivisiblebym(x)=(x1)(x2)(x4)(x8)(x16)=x5+x2+1andalsom3(x)=(x3)(x6)(x12)(x24)(x17)=x5+x4+x3+x2+1:SoC2hasgeneratorg2(x)=(x5+x2+1)(x5+x4+x3+x2+1)=x10+x9+x8+x6+x5+x3+1:Asg2(x)hasdegree10,thecodehasdimension3110=21.(Butnoticethatheretheweightofthegeneratorislargerthan5.)(iii)MaintainingthenotationofExample(ii),ndthegeneratoroftheBCHcodeC3oflength31withdesigneddistance7.Thecodepolynomialsc(x)mustsatisfyc(1)=c(2)=c(3)=c(4)=c(5)=c(6)=0:Inparticularc(x)mustbeamultipleofg2(x),calculatedinthepreviousexample.Butc(x)mustalsobeamultipleofm5(x)=(x5)(x10)(x20)(x9)(x18)=x5+x4+x2+x+1:(ThiscalculationisdoneindetailinsectionA.3.3oftheAppendixonalgebra.)Thusthegeneratorg3(x)forC3isg2(x)(x5+x4+x2+x+1)=x15+x11+x10+x9+x8+x7+x5+x3+x2+x+1:Thiscodehasdimension3115=16.(iv)Letbearootoftheirreduciblebutimprimitivepolynomialx3+2x+22F3[x]sothatisa13throotofunity.Wecan,using,ndthegeneratorpolynomialoftheternary,narrow-senseBCHcodeD1oflength13withdesigneddistance4.Thecodepolynomialsmusthaveasroots,2,and3.Thustheymustbemultiplesofm(x)=m3(x)=(x)(x3)(x9)=x3+2x+2andofm2(x)=(x2)(x6)(x5)=x3+x2+x+2: 8.4.CYCLICHAMMINGCODESANDTHEIRRELATIVES117ThereforeD1hasgeneratorg4(x)=(x3+2x+2)(x3+x2+x+2)=x6+x5+x2+1:Inparticularthecodehasdimension136=7.Alsoitsgeneratorhasweight4,soitsminimaldistanceisequaltoitsdesigneddistance4.(8.3.5)Problem.Givethegeneratorpolynomialoftheternary,narrow-senseBCHcodeD2oflength13withdesigneddistance5,usingofExample(iv)aboveasaprimitive13throotofunity.WhatisthedimensionofD2?(8.3.6)Problem.Givethegeneratorpolynomialoftheternary,narrow-sense,primitive,BCHcodeD3oflength26withdesigneddistance4,usingasprimitiveelement arootofthepolynomialx3+2x+12F3[x].WhatisthedimensionofD3?(8.3.7)Problem.(a)Whatisthedimensionofabinary,narrow-sense,primitiveBCHcodeoflength63anddesigneddistance17.(b)Doesthiscodecontainanycodewordsofweight17?Explainyouranswer.(8.3.8)Problem.Provethatanarrow-sense,primitiveBCHcodeoflength24overF5withdesigneddistance3hasminimumdistance3anddimension20=242(31).8.4CyclicHammingcodesandtheirrelativesCyclicbinaryHammingcodesandcodesrelatedtothemareofparticularin-terest.(8.4.1)Theorem.Foreverym,thereisacyclic,binaryHammingcodeofredundancym.IndeedanyprimitivepolynomialofdegreeminF2[x]generatesacyclicHammingcodeofredundancym.Proof.ThisisessentiallyequivalenttoCorollary8.3.4(inviewofTheoremsA.3.8andA.3.10onthegeneralstructureandexistenceofniteelds).2(8.4.2)Theorem.Thepolynomialg(x)2F2[x]generatesacyclic,binaryHammingcodeifandonlyifitisprimitive.Proof.InTheorem8.4.1wehaveseenthatabinaryprimitivepolynomialgeneratesacyclicHammingcode.NowletCbeabinary,cyclicHammingcodeoflength2m1=n.Letg(x)=Qri=1gi(x),wherethegi(x)aredistinctirreduciblepolynomialsofdegreemi,sothatPri=1mi=m=degg(x).Thengi(x)dividesxni1withni=2mi1,henceg(x)dividesxn01wheren0=Qri=1ni.Nown+1=2m1+1=rYi=12mi=rYi=1(ni+1):Ifr6=1,thennn0andxn01isacodewordofweight2inC,whichisnotthecase.Thereforeg(x)=g1(x)isirreducibleanddividesxn1.Indeedg(x)isprimitive,asotherwiseagaintherewouldbeacodepolynomialxp1ofweight2.2 118CHAPTER8.CYCLICCODES(8.4.3)Problem.ProvethatthereexistsacyclicHammingcodeofredundancymandlength(qm1)=(q1)overFqifgcd((qm1)=(q1);q1)=1.(Hint:ForconstructiontryasbeforetondsuchacodeasasubeldsubcodeofaReed-Solomoncode.)8.4.1Evensubcodesanderrordetection(8.4.4)Lemma.LetF=F2m(m1),andletp(x)beaprimitivepolynomialofdegreeminF2[x].Thepolynomialg(x)=(x+1)p(x)generatestheevensubcodeEcomposedofallcodewordsofevenweightintheHammingcodewithgeneratorp(x).Inparticular,Ehasminimumweight4.Proof.ThegeneratorpolynomialforEisamultipleofthegeneratorpolynomialp(x)fortheHammingcode,andsoEiscontainedintheHammingcode.Foranyc(x)=a(x)q(x)=a(x)(x+1)p(x)2E;wehavec(1)=a(1)(1+1)p(1)=0:ThereforeEiscontainedintheevensubcodeoftheHammingcode.Asthecodeshavethesamedimension,theyareequal.TheHammingcodehasminimumweight3,soEhasminimumweight4.2TheevencyclicHammingsubcodeslikeEhaveoftenbeenusedfordetectingerrorsincomputerapplications.Inthatcontext,theyareoftencalledCRCcodes(for`cyclicredundancychecking').WedevotesometimetodetectionCRCcodesissuesforgenerallinearandcycliccodes.Werecallthaterrordetectionistheparticularlysimpletypeoferrorcontrolinwhichareceivedwordisdecodedtoitselfifitisacodewordandotherwiseadecodingdefaultisdeclared.(SeeProblems2.2.2and2.2.3.)Foralinearcode,thiscanbegaugedbywhetherornotthereceivedwordhassyndrome0.(8.4.5)Lemma.LetCbealinearcode.(1)Cdetectsanyerrorpatternthatisnotacodeword.(2)Cdetectsanynonzeroerrorpatternwhosenonzeroentriesarerestrictedtothecomplementofaninformationset.Proof.Anerrorpatternthatisnotacodewordhasnonzerosyndromeasdoesanywordinitscoset.Ifacodewordis0onaninformationset,thenitisthe0codeword.Thusanynonzerowordthatis0onaninformationsetisnotacodeword.2(8.4.6)Lemma.Acycliccodeofredundancyrdetectsallnonzeroburstsoflengthatmostr.Proof.ByLemma8.4.5,wemustshowthatacodewordthatisaburstoflengthrorlessmustbe0.Letcbesuchacodeword.Thenithasacyclic 8.4.CYCLICHAMMINGCODESANDTHEIRRELATIVES119shiftthatrepresentsanonzerocodepolynomialofdegreelessthanr.ButbyTheorem8.1.1,thegeneratorpolynomialisanonzeropolynomialofminimaldegreeandthatdegreeisr.Thereforec=0,asdesired.2Thesameargumentshowsthat`wraparound'bursterrors,whosenonzeroerrorsoccurinaburstatthefrontofthewordandaburstattheend,arealsodetectedprovidedthecombinedlengthofthetwoburstsisatmostr.(8.4.7)Problem.IfCisacycliccodeofredundancyr,provethattheonlyburstsoflengthr+1thatarecodewords(andsoarenotdetectableerrorpatterns)areshiftsofscalarmultiplesofthegeneratorpolynomial.(8.4.8)Problem.StartingwithacycliccodeCofredundancyr,shortenCinitslastscoordinates(orrstscoordinates)bychoosingallcodewordsthatare0inthosepositionsandthendeletingthosepositions.ProvethattheresultingcodeDstillcanbeusedtodetectallburstsoflengthatmostr.(Remark.ThecodeDwillnolongerbecyclicandcannotberelieduponfordetectingbursterrorsthat`wraparound'.)(8.4.9)Problem.Haveanexistentialistdiscussion(orwritesuchanessay)astowhetherornotlinearcodesshouldbesaidtodetectthe0errorpattern.NowwereturntotheCRCcodeEofLemma8.4.4,theevensubcodeofabinarycyclicHammingcode.Ehasredundancyr=1+m,wheremistheredundancyoftheHammingcode.ThusEcanbeusedtodetect:(i)alloddweighterrors,(ii)allweight2errors,(iii)mostweight4errors,(iv)allnonzerobursterrorsoflengthatmostr,(v)mostbursterrorsoflengthr+1.HereCdetects`most'weight4errorsbecause(atleastforreasonablylarger)thecodewordsofweight4formonlyasmallfractionofthetotalnumberofwordsofweight4.(SeeProblem7.3.7;thetotalnumberofwordsofweight4isquarticinn=2r11,whilethenumberofcodewordsofweight4iscubicinn.)Theonlyburstsoflengthr+1thatarecodewordsarethenshiftsofthegeneratorpolynomialg(x).(SeeProblem8.4.7.)Soweseethatthevariousmostlikelyerrorpatternsarealldetected.Examples.(i)CRC-12oflength2047=2111withgeneratorpoly-nomial(x+1)(x11+x2+1)=x12+x11+x3+x2+x+1:(ii)CRC-ANSIoflength32767=2151withgeneratorpolynomial(x+1)(x15+x+1)=x16+x15+x2+1:(iii)CRC-CCITToflength32767=2151withgeneratorpolyno-mial(x+1)(x15+x14+x13+x12+x4+x3+x2+x+1)=x16+x12+x5+1: 120CHAPTER8.CYCLICCODESThelasttwoexampleshavegeneratorpolynomialsoftheminimumweight4.Thisisadvantageoussincethelinearfeedbackcircuitryrequiredtoimplementencodinganddecodingissimplerforgeneratorpolynomialsofsmallweight.AsinProblem8.4.8thedetectionproperties(i)-(v)arenotlostbyshorteningE,sovariousshortenedversionsofevensubcodesofbinarycyclicHammingcodesarealsousedasCRCcodes.Ifthecodeisshortenedinitslastspositions,then`cyclic'encodingisstillavailable,encodingthemessagepolynomiala(x)ofdegreelessthanks(thedimensionoftheshortenedcode)intothecodepolynomiala(x)g(x)ofdegreelessthanr+ks=ns(thelengthoftheshortenedcode).8.4.2Simplexcodesandpseudo-noisesequencesAstherearecyclic,binaryHammingcodesofeveryredundancym,therearealsocyclic,binarydualHammingcodesofeverydimensionm.Recallthatthesecodesarecalledsimplexcodes(orshortenedrstorderReed-Mullercodes).TheywerestudiedpreviouslyinSection4.3.ByTheorem8.4.2theyarepreciselythosecyclic,binarycodeswhosecheckpolynomialsareprimitive.(8.4.10)Theorem.LetCbeacyclicsimplexcodeofdimensionmandlengthn=2m1.ThenCiscomposedofthecodeword0plusthendistinctcyclicshiftsofanynonzerocodeword.Proof.LetChavegeneratorpolynomialg(x)andprimitivecheckpoly-nomialh(x),sothatg(x)h(x)=xn1.SincejCj=2m=n+1,weneedonlyprovethatthencyclicshiftsofg(x)aredistinct.Supposeg(x)=xjg(x)(modxn1),forsome0jn.Thus(xj1)g(x)=q(x)(xn1)(xj1)g(x)=q(x)g(x)h(x)xj1=q(x)h(x):Ash(x)isprimitive,wemusthavejnhencej=n.Thereforethenshiftsxjg(x)(modxn1),for0jn,arealldistinct,asdesired.2(8.4.11)Corollary.Let06=c2C,acyclicsimplexcodeofdimensionm.Then,foreverynonzerom-tuplem,thereisexactlyonesetofmconsecutivecoordinateentriesinc(includingthosethatwraparound)thatisequaltom.Proof.AsCiscyclic,itsrstmcoordinatepositionsformaninformationset.Everymoccursinthesepositionsinexactlyonecodewordb.Bythetheo-rem,bisacyclicshiftofcwhenmisoneofthe2m1nonzerom-tuples.Thenonzerocodewordchasonlyn=2m1setsofmconsecutivepositions.There-forenonzeromoccursexactlyonceamongthesetsofmconsecutivepositionsinc.2Thepropertydescribedinthecorollarycanbethoughtofasarandomnessproperty.Ifwewereto ipanunbiasedcoinanynumberoftimes,thenno 8.4.CYCLICHAMMINGCODESANDTHEIRRELATIVES121particularcombinationofmconsecutiveheads/tailswouldbeexpectedtooccurmoreoftenthananyother.Wewillcallabinarysequenceoflength2m1inwhicheachnonzerom-tupleoccursexactlyonceinconsecutivepositionsapseudo-noisesequenceorPN-sequence,forshort.(Hereandbelow,whenwepseudo-noisesequencePN-sequencespeakofconsecutivepositions,weallowthesepositionstowraparoundfromtheendofthewordtothefront.)Wecallitasequenceratherthanwordbecause,whenwerepeatitanynumberoftimes,wegetasequenceof0'sand1'swhosestatisticalpropertiesmimic,inpart,thoseofarandomsequence,thatis,thoseofnoise.Thelengthn=2m1isthentheperiodofthesequence.periodWiththesedenitionsinhand,thecorollarycanberestatedas(8.4.12)Corollary.AnonzerocodewordfromacyclicsimplexcodeofdimensionmisaPN-sequenceofperiod2m1.2ThereareotherconsequencesofthePNdenitionthataresimilartoprop-ertiesofrandomsequences.Arunisamaximalsetofconsecutiveentriescon-runsistingentirelyof0'sorentirelyof1's.Thelengthofarunisthenumberofitsentries.Inarandomsequence,onewouldexpect,foraxedlength,thesamenumberofrunsof0'sas1'sandthatrunsoflengthpwouldbetwiceaslikelyasrunsoflengthp+1.(8.4.13)Proposition.LetsbeaPN-sequenceofperiod2m1.(1)(Runbalance)Thereareexactly2mp2runsof0'soflengthp(m2)andexactly2mp2runsof1'soflengthp(m2).Thesequencescontainsexactly2m1runs.(2)(Generalbalance)Ifpisanonzerop-tuplewithpm,thenpoccursinconsecutivepositionsofsexactly2mptimes.Ifpisap-tupleof0's,thenitoccursinconsecutivepositionsexactly2mp1times.Inparticular,shasweight2m1.Proof.For(2),thep-tuplepistheinitialsegmentof2mpdistinctm-tuples.Ifpisnonzero,theneachofthesem-tuplesoccurswithins.Ifp=0,thenthem-tuple0istheonlycompletionofpthatdoesnotoccurwithins.Inparticular,the1-tuple1occursexactly2m1times,completing(2).Arunaaaaoflengthp(m2)correspondstoa(p+2)-tuplebaaaabwithfa;bg=f0;1g(whichisnever0).Thereforeby(2),thenumberofrunsaaaaoflengthpis2m(p+2)=2mp2.Ifm=1,thencertainlythereisonlyonerun.Form2,atransitionbetweentworunsoccurspreciselywhenweencountereither01or10.By(2)thereare2m2ofeach.Thereforethenumberofruns,beingequaltothenumberoftransitions,is2m2+2m2=2m1.2Althoughpseudo-noiseandpseudo-randomsequenceshavebeenstudiedagreatdeal,thereisnoconsensusabouttheterminologyordenitions.InsomeplacesthereisnodistinctionmadebetweenPN-sequencesingeneralandthosespecialonescomingfromsimplexcodes(sothatCorollary8.4.12becomesthe 122CHAPTER8.CYCLICCODESdenition).Wewillcallthenonzerocodewordsofcyclicsimplexcodesm-sequences.(Thisisanabbreviationformaximallengthfeedbackshiftregisterm-sequencessequences.)Itmightseemmorenaturaltoconsidersequencesoflength2minwhicheverym-tupleoccurs.SuchsequencesarecalledDeBruijncycles.ThetwoconceptsDeBruijncyclesareinfactequivalent.IfinaPN-sequencesofperiod2m1welocatetheuniquerunofm10's,thenwecanconstructaDeBruijncyclebyinsertingonefurther0intotherun.Conversely,ifwedeletea0fromtheuniquerunofm0'sinaDeBruijncycle,weareleftwithaPN-sequence.Giventheconnectionwithsimplexcodes,wepreferthepresentformulation.(8.4.14)Problem.ProvethateveryPN-sequenceoflength7isanm-sequence.(Remark.Uptocycling,thereare16PN-sequencesoflength15,only2ofwhicharem-sequences.)Animportantpropertyofm-sequencesisnotsharedbyallPN-sequences.(8.4.15)Lemma.(Shift-and-addproperty)Ifsisanm-sequenceands0isacyclicshiftofs,thens+s0isalsoacyclicshiftofs(or0).Inparticularnonzeros+s0isitselfanm-sequence.Proof.ThisisadirectconsequenceofTheorem8.4.10.2(8.4.16)Problem.ProvethataPN-sequencepossessingtheshift-and-addpropertymustbeanm-sequence.Onelastpropertyismorestrikingifwechangetothe-versionofthesimplexcode,asdescribedinSection4.3.Witheachbinarysequencesweassociatethe1-sequencesbyreplacingeach0withtherealnumber1andeach1withtherealnumber1.Ifsisanm-sequence,thenweabuseterminologybyalsoreferringtotheassociatedsequencesasanm-sequence.(8.4.17)Proposition.(Perfectautocorrelation)If(s0;:::;sn1)=s2f1gnRnisanm-sequencewithn=2m1,thenPn1i=0sisi+p=nforp=0=1for0pn;whereindicesareallreadmodulon.Proof.Thesummationisthedotproductofswithacyclicshiftofitself.Theassociatedbinaryvectorsarealsocyclicshiftsandareeitherequal(whenp=0)oratHammingdistance2m1byProposition8.4.13(2)andLemma8.4.15.ByLemma4.3.4thedotproductisn(=2m1)whenp=0andotherwise(2m1)22m1=1:(InfactthispropositionisnearlyequivalenttoLemma4.3.5.)2Thefunctiona(p)=Pn1i=0sisi+p,for0pn,ofthepropositionistheautocorrelationfunctionfors.Asnisodd,thesequencescouldneverbeautocorrelationfunction 8.4.CYCLICHAMMINGCODESANDTHEIRRELATIVES123orthogonal;sothepropositionsays,inasense,thatsanditsshiftsareasclosetobeingorthogonalaspossible.Thisiswhytheautocorrelationfunctioniscalledperfect.Thusthe1m-sequencesareveryunlikenontrivialshiftsofthemselves.Forthisreason,theyareattimesusedforsynchronizationofsignals.Theyarealsousedformodulationofdistinctsignalsinmultipleusersituations.Thisisanexampleofspreadspectrumcommunication.TheideaisthatmultiplicationbyaPN-sequencewillmakeacoherentsignallooknoise-like(takingitsusualspikedfrequencyspectrumandspreadingitouttowardthe atspectrumofnoise).Forsuchapplications,itisoftenhelpfultohavenotjustonesequencewithgoodautocorrelationpropertiesbutlargefamiliesofthemwithgoodcrosscor-relationproperties.Theconstructionsofsuchfamiliesmaystartfromnicem-sequences.Theirinvestigationisofon-goinginterest.Pseudo-randombinarysequencesarealsoimportantforcryptography.Inthatcontextm-sequencesarebad,sincetheshift-and-addpropertyimpliesthattheyhavelowcomputationalcomplexity.