LOWER BOUNDS ON POFOR M-EQUALtY LIKELY SIGMALS DERIVED FROM A LINEAR BINARY

b J.S.E. Labonté, B Eng

Captain Canadian hedForces

h thesis submitted to the fadty of Graduate Studks

in the

Department of Electticd and Cornputer Engineering

Royal Military Coflege of Canada

Kingston, Ontario

in partiai fd5lhent of the reqykements for

the degree of

Master of Enginee&g

May 1997

copyright 8 J.S.E. Labonté, 1997 National Library Bibliothèque nationale I*m of Canada du Canada Acquisitions and Acquisitions et Bibliographie Services services bibliographiques 395 Wellington Street 395. nie Wellington Ottawa ON K1A ON4 Ottawa ON K1A ON4 Canada Canada Ymr iFle Votre nfdmee

Our iY, Noue rdfdmnce

The author has granted a non- L'auteur a accordé une licence non exclusive licence allowing the exclusive permettant à la National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distribute or sen reproduire, prêter, distn'buer ou copies of this thesis in microform, vendre des copies de cette thèse sous paper or electronic fonnats. la fome de microfichelfilm, de reproduction sur papier ou sur fonnat électronique.

The author retains ownershp of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantial extracts fiom it Ni la thèse ni des extraits substantiels may be printed or ohenirise de celle-ci ne doivent être imprimés reproduced without the author's ou autrement reproduits sans son permission. autorisation.

Canada DEDICATION

TU Karoline, Kasandra and C&d& in this thesis, the numencal computation of three new lower bounds on the probability of decodmg error (P(E)) for M-eqdy likely signals derived fiom a linear bbay code set is done for the Additive White Gaussian Noise (AWGN) cbLTwo of the three ww lower bounds are by fis better than the netirest neighôor lower bomd whereas the other one is by k weaker. A new lower bounds on the P(E) for M-equally Iikely sigoals derived from a linear binary code is also given for the case of a Bniary Symmetric Channel (BSC). However, the results presented for the case of the Srniplex (7,3) code are no t as conclusive as those obtained

6om the AWGN cbL I am very grateful to Dr. Ségum for his inestimable help, advice, puidance and patience throughout the whole development of tbis thesis. VITA

PERSONAL INFORMATION

Name: Joseph Stéphane Erik Labonté

Place of Birth: Magog, Qc

Date of Birth: 16 Jan 1970

EDUCATION

1987- 1988 Collége militaire royal de St-Jean, St-Jean, Qc

1988- 1992 Royal MiMary Colege of Canada, Kingston, On, B. Eng.

EXPERfENCE

1992- 1993 ADP Officer, 7 1 Comm Group, CFB Montreai, St-Hubert, Qc

1993-1 994 Maintenance Troop Officer, 715 Comm Squadron, CFB Montreai, St-Hubert, Qc

1994-1995 Operation Troop Offiicer, 71 5 5mmSquadron, CFB Montreal, St-Hubert, Qc CHAPTER 4 .Resnlts for the AWGN channel ...... 45

4.1 Vertices of an Hypercube ...... *...... 47

4.2 Hamming ...... *...... 53

4.3 Dual of Hammmg codes ...... 59

4.4 The GoIay code ...... *...... 64

4.5 Large codes ...... 68

CHAPTER 5 O Discussion. Conclusions and Recommendations...... O...... 72

5.1 Discussion ...... ,...... 72

5.2 Conchsions ...... 74

5.3 Recommendations ...... ,.,.. ., ...... *...... *...... *...... *...... * 76

APPENDIX 1 ...... 77

ANNEX 1 ...... 81 LIST

Figure 1.1 .1 .Mode1 for the AWGN chel...... 3

Figure 1.2.1 .Mode1 for the BSC ...... 5

Figure 2.2.1 .Plot of ~(~,2,2) ...... 29

Figure 3.1.1 .Repr-on of two binary signal veçtors afkr pe&on ...... * 38

Figure 3.2.1 .Performance of the Srniplex (7,3) over the BSC ...... 44

Figure 4.1.1 .Soft decodmg probability of aror for the vertices of a.Hypercube with n=3 ...... 50

Figure 4.1.2 .Soft decodmg probabiiity of error for the vertices of an Hypercube with ...... 51

Figure 4.1.3 O Soft decoding probability of error for the vertices of an Hypercube with n=12 ..... 52

Figure 4.2.1 .Soft decodmg probability of mrfor a (7,4) Himming code ...... 56

Figure 4.2.2 .Sofi decoding probabdity of error for a (1 5, 11) l3ammbg code ...... 57

Figure 4.2.3 .Soft decoding probabdity of error for a (22, 16) SEC-DECcode ...... 58

Figure 4.3.1 .Sofi decodiag pro- of error for a (7,3) Simplex code ...... 61

Figure 4.3.2 .Soft decoding probabii of emr for a (15,4) Simplex code ...... 62

Figure 4.3 -3 .Sofi decodmg probability of error for a (104857920) Simplex code ...... 63

Figure 4.4.1 .Soit decoding probability of mor for a (23, 11) Golay code...... 66

Figure 4.42 .Soft decoding probabüityof error for a (23. 12) Golay wde ...... 67

Figure 4.5.1 .Soft decoding probabiiay of aror for a (58, 29) Quasi- ...... 70

Figure 4.5.1 .Soft decoding probability of errer for a (60,30) Smgiy-even Extremal code ...... 71 TABLES

Table 4.1.1 .Values of P(E) at A = O for the Vertices of an Hypercube ...... 49

Table 4.2.1 .Vahies of P(E) at A = O for Ekumhg codes ...... 55

Table 4.3.1 O Values of P(E) at A = O for Siniplex codes ...... 60

Table 4.4.1 .Values of P(E) at A = O for Golay codes ...... -65

Table 4.5.1 .Values of P(E) at A = O for large codes...... -69 Upper Bo&

Lower Bouncls

Probabdity of Emr

Sol3 Decoding

AWGN Chamel

BSC

Linear BSmry Codes CHAPTER

Introduction

A signal hansrmtted over a real chamel wül definitehl be compteci by the noise. In

digital signaling, one of a finite set of sigr&, is tmsmitted during each signahg interval and

for such a situation, the overall effect of the noise is a dtbgprobabïlity of error. Shannon

showed in 1948 that the probabi of makmg an error codd be made as small a value as

desired by proper encoding the information signais (if of course the rate of the code is kept

below the capacity of the cber) [ 1 1.

Sbce Shannon's paper, a lot of good error correcthg codes have been constnicted.

However, it is generatly impossible to evaiuate exactly the resultmg probabiliCy of error when

these codes are used. Usuaily, one has to settle for a bound on the probabdity of error (Le.

union upper bound). In this thesis we study various lower bouads on the probabiiity of error

P(E) for M-ary signahg over the Additive White Gaussian Noise (AWGN) channel derived nom a ment hequaiity of de Caen [2]. We aiso study Iowa bounds on P(E) for the BiFary

Symmetric Che1(BSC).

In this chapter the problem of M-ary sipnaünp over the AWGN chanwl and the BSC is covered very brie*, since the problem is by now very wel known and covered in depth in most books on codcations. The Thecs of bear bEary codes is also covered very briefly in the present chapter. We also show how to obtah the union upper bound and the nearest neighbor lower bound for an AWGN channel dong with the definition and the proof of de

Caen's Inequaiity. Fmally, we conchide this chapter with some properties reIated to the probability of two johtiy Gaussian random variables.

1.1 - Signahg over the AWGN channel

Consider conimunicatmp one of M eqwlly hiymessages (m,,m, ,.. ., m,) over a red channeL This is done by associating with each RI, a red signal s,(I) de- on the interval [O, T] (modulation process). If the signal S(t) is transmated over an AWGN charnel then the received si@ will be

No where n,(t) is a zero-mean Gaussian random process with power spectral density - 2 watts/Hz (whlte noise) [4: p. 1891. The rece~er,upon observhg ~(t),must decide which message was transmtted. An optimum receiver does this in such a way as to minimize the probability of emr.

shown that there is no lost of optmiality in projectmg the received wavefom ~(t)onto the orthonormai finctions @,(t)[4: pp. 264-2731 therehre generatbg the n-vector

R = (R,,R~ ,..-,Rn) where

T R, = (~(t),4, (î)) = ~(t)ad*(t) *& = si + ni O

with

and the mise components behg dl independenî zero-mean Gaussian random variables with

No variance -. The mode1 of such a channe1 cm be represented by Figure 1.1.1 with 2

n s,(d = 1 s, - 4,(î) (1-1-4) where now the modulator, the chamel and the fiont end of the receiver are dl combined together. The signal set {s,(t), S, (t),. . . , S, (î)} has been repIaced by { S, ,S, ,. . . , SM } .

Figure 1.1.1 - Mode1 for the AWGN Channel

With this mode1 it is easy to show now that the optimum decision about which message was transmitted, is when the hhchum Likelihood Receiver (Mm)decides in favor of the signai which is the closest to the receked sipal m the Euclidean sense [4: p. 2171. The ith

where !Rnis the ndmmsional Euclidem space and -A is the Euclidean distance between f and y. It foUows thaî the probabiliiy of emr, given that the ith signal was tranSmitt4 is

where ItC = !R " - 1, .

For M-equally iïkefy messages, the probability of error becomes

and as it cm be seen the exact probabitity of errer is not sornething very easy to evaluate. Finding bounds on the P(E) is of interest because the exact pro- of mris practically impossible to detennine except for very special signal sets. 1.2 - The biaaw svmmetric channel

Figure 1.2.1 shows the mode1 of the BinaF/ Symmetric Channel @SC),

Figure 1.2.1 - Mode1 for the BSC where p is the cross-over probabiiay. This chamiel is the anti-podai signaihg version of the chamel introduced in section 1.1 where

The optimum receiver decides in fàvor of S,(t) if

(Nt)9 dd}2 0 and in favor of S, (t) otbemk. The pro- of error is then

where En is the energy per chaimel use.

Bit by bit signalhg refers to the case where the n-dimensional signal vectors {S~,S,,..., s,) have components In nict it is more convenient to relate the bmary Qpd set de- eariier in terrns of 0's and 1's (the algebraic property is easier to work with). Replacbg 6by O and - by 1, a new set of binary n-tuples is obtamed

(%~2,..-&} (1 -2-6) where now eaçh component of f, takes the value O or 1. If f is transmitted over a BSC uien the received n-tuple is y =aeë where O is the modulo 2 sum and ë is the em>r vector introduced by the chamel (Le. e, = 1 if the ith digit is received in mr). The optimum receNer must then observe 9 and decide 1 which vector was traasmitted. It is egsy to show that if p < - then the optimum receiver 2 decides m tàvor of the vector Zt which is nearest to J m the Ekmmhg sense [4: p. 4061. The l!bmhg distance between two bbary n-tuples à and 6, is the number of coordioates in which they dBer D(0,S) = ~(â03b) (1-2-8) where W(Z) k the number of 1's m f aed dedthe weight of X .

The optimum Îth decision region is consequeatly

which leads to

an expression which is diflicult to evaluate exactIy due to the preseace of the set 1,. 1.3 - Linear binary codes

There elàsts two types of des, Block codes and Convohitmnal codes. These codes can be eaher linear or mm.As seen m section 1.1 and 1.2 the expression for the exact P(E) is valid for any signal set. In this thesis we are particularly interesteci in signal sets derived fiom linear binary code. What is covered m this section on linear bbry code is just a bief surnmary of its mst inqiortant properties. For more details on the subject, the reader is referred to text books on error-control codes.

A (II&) linear bhary code C is obtained from a full rsnk k x n binary matrix G by setting c = {XGIX E$} (1-3- 1) where 3: is the set of biik-hrples.

For this situation it foflows that there are M = ~'possib1ecodewords (signais) and where now the sum rnodulo 2 of any two codewords in the set is another codeword m the same set. To get the correspondmg real signal vectors, we replace O by and 1 by -K.

The distance properties of the resulting real signai set @,)are then easiiy reEated to the distance properties of the code C. Mme specifically we have

where Dyis the Hamming distance between codewords i and j. In fàct it is easy to see that

D, = w(c, +c,) = w(c,) (1-3-3) the Hanmimg weight of the sum of two codewords is the HanmiBig weight of another codeword [5: pp. 52,631. It foilows then that the distance propertia of the real signal set are related to the weight distrifiution of the code. This distribution is represented by the weight enumerator A(z) where A, is the nurnber of codewords having weight i The weight enumerator is often used b

CO- to compute different values relateci to the code (Le. performance, rem,etc.. .).

On the other haod ifH is a hill rank (n- k) x n 5inary matrix such that

(such a matrix always ex&), then

is cded the dual of C (the set of ail binary codewords orthogonal to those in C). If the weight enumerator of the dual of a code is designated by

then there exist an Birimate relations& between A@) anci B(z) known as the MacWüüamsY identity which is &en by

Another important paraaieter of a code is its minimum Hamming distance D, given by

where

The minimum Euclidean distance between any two signal vectors de* fiom C is then 1.4 - Union upper bound for the AWGN channel

In this section we show how to obtain the union upper bound on the sofi decoding probabii of error for the case of a signal set deriveci hma linear bioary code used over the AWGN chamiel The don upper bound is widely used m this thesis to compare the performance of the new lower bounds presented in [3].

The probability of emr deWin equation (1-1-6) can be reWLiffen as

probability of the union of a hite number of events is upper bounded by the sum of the probabilities of these events [4: pp. 264-2733 so tbat

where M is the ntmiber of possible signal vectors and P(E, [s,) is the probability defjned only by the two sigoal vectors Si and ,$', . It is easy to show here that P(E,IS,) is the probability of error of a systern where ody two signal vectors are used to transmit two equally likely messages. For the AWGN chelthat we are concemed with, we have

and for a set of codewords, as explained before

En where A = - is the Signal to No& Ratio (SNR). It follows tben that No But smce the conditional probabüity of error does not depend on the signal sent (see equation (1 45)), we have

HE)= p(&) = P(E[s,) ( 1-4-61 where 3, =O the &zero signal vector. lt follows then that the probabiiity of error for M- equaly likely messages used over the AWGN channel is upper boudeci by 1.5 - Nearest nei~hborlower bound for the AWGN ehaaael

The nearest neighbor lower bond for the soft decoding probab'i of error can be m&ad nearIy the same way as the union r>pper bod Agaiu fiom equation (141), we get

but we know fiom probability theory that the probabiiay of the union of a nnite set of events k aiways greater or equal to the maxhnum probability amng ail events

and again P(E,(s,) is the probability defined oniy by the two signal vecton S, and S, . As it

was shown earlier P(E* 13,) is the probabiüty of error of a systern where ody

vectors are used to transmit two equaIiy likeiy messages. For the AWGN chanwl equal to

and since the Q function is monotonicaliy decrahg the maximum value will be obtained by mùhkhg Ils, - S/ 1. AS denned earkr the muimium Euclidean distance can eady be found when a signal set is deriveci hma code

it follows that

~(~lS,)2rnax{ P (YI-)E.. Si ,Vj+i ) (1-5-5)

Since that bound is hdependent of i, it foliows that by choosing the ail-zero vector s,,as the traasmitted signal vector. 1.6 - de Caen's Inequaiitv

In [2] de Caen presents a new lower bound on the probability of a union in temis of

the probabilities P(A, ) and P(A, nA, ) . His theorem goa as foUow

THEOREM 2.1.1

O with the convention - = O, so that the events of pmbabiüty zero are not counted. O

PROOF

First assume that R is finite (the gdcase can eady be reduced to this one). For

each x E Cl, let deg(x) dmte the number of A, 's that contain x . Also set p(x) = ~[(x}]. It fo il0 ws that

but

'UZ '" deg (x)

Us@ the Cauchy-Schwan inequality we get substitutmg into equation (1-6-2) we get

At this stage, showing that

is necessary. We know that

de-

we get

but Fi,gohg back to equation (1-6-6), we have

with equality holding *en deg(x) is constant on each A,. 1.7 - Cbernoff bound for a pair of iointb Gaussian raodom variables

In tkk section we want to derive a Chemoff iike upper bound on P(x 2 a, Y t b) where X and Y are jomtly Gaussian random variables. Fidy we start with the Chebyshev inequality for two wn-negative rdomvariables.

LEMMA 1.7.1

If X and Y are two non-negative zero-mean random variables, and 6,z 0, E, > O two real numbers, then

PROOF

By definition

since the integrand is always positive witbin the range of the integral

is stdi me. Equation (1-7-3)cm be weakened even further by substauting x and y by their destpossible value, that is x = &,andy = E, ,so thst therefore

COROLLARY 1.7.1

Let X and Y be two randorn variables, and a,b two real numbers, then P(x~~,Yz~)s~[es( X-a)+t(Y-b) 1

PROOF

tb By LEMMA 1.7.1 with E, =e" and E, =e ,wehave

Taking the naïurai logarithmic on each side of the inequalities inside the probability distribution, gives

P(X 2 a,Y 2 b) a ~[e~~")"('")] (1-7-10) for s2.0, t20.

We mw corne to the result domiat the begmning of this section

correlation coefficient p = X - Y. then

where plmin{; -,-3 forany a>0, b0.

PROOF

By equation (1 -7- 1O), we have

P(X >- a, Y >- b) -< E[~* ]=e dm+tb)E[~"'"]

Since X,Y are jointly Gaussian, ihe random variables

Z=sX+tY is ahGaussian with a mean of zero and a variance of

0: = E[z']= E[S*X*+t2y2 +2s4 =s2 +t2 +2stp. Going back to equation (1-7-12),

P(X 2 a,Y 2 b) S el"'") ~[e""'] = e4"" ~[e'] and we are left with finding the expectation of ez .

which reduces to

Making the change of variable

We then have The problem consist now in hdhg the opthvahies (s,, t,) which minimizes the nght hand side of equation (1-7-21). To nnd the optimum value of s and t we set

which &es

Somboth equations for a and b we get

but as seen eariier there fore

and solvhg for both equations yields

But for the bound to be valid so and t, have to be rdnumbers greater or equal to zero, which @es us the sHnuItaneous conditions

a b PsB=min{-b'a -} for a>O, b>O.

Gohg back to equation (1-7-21), we can replace the variables s and t by their optimum vafues to get

which reduces to COROLLARY 1.7-2

Let XY be two zero-mean, unit variance. jo- Gaussian random variable with

comelaîion coefficient p = -x -Ys min {i,:},kn- -

PROOF

2 -2-~9-b+62

This proof is done by show that the fhction e 2+-d) is monotonidy increasing in p in the interval [- min{b - , -:}, min{:, :}] . Talcmg the £Ïrst derivative we get

which reduces to the exponentiai fùnction is always positive on the intend [-min {b.~}?~{~.$}]~d-- - are lefi with proving that the fiinctiion f(p)=ab-(l+p2)-p-(a2+b2) is always positive on

f(P)=ob-(l+p2)-p-(a2+b2)to see howitbehaveson the interval [O',min {i-,- :Il- We want to find the conditions on a,b ,for wbich

f(P)=ab-(l+p2)-p-(a2 +b2)2o, but reammghg the lefi hand side of equation (1-7-36), yields

(a2 +b2) &)=p2 -Po a-b +120.

a b The roots of &) can easily be found to be - and - . But at p = O, we have b a

and Which means that on the intervai [O+, min {b-, -31 , the function f (p)is always

Oz -2-pa.b+bf positive. Therefore, the fiuiction e -)is mowtoni~mcreasing in p in the interval

for plfllmin{b -,- :} dany a>O, b>O. New lower bonds for linear binary codes used over the AWGN channel

This chapter is dedicated to the study of the bounds presenied b [3] and to the

development of a ww smipler bound on the P(E) based on the theory of section 1.7. The ww

simpler bound Hivolves expwntial and Q fiinctions O*.

2.1 - A new lower bound on P(E) derived hmde Caen's Inwalitv

In chapter 1, it was shown that the probability of error given that the signal 3, was traosmined over an AWGN channe1 for a set of M signal vectors is

Usiq de Caen's Ineqdiîy, we get [2]

where The equation (2-14) is derived in [3] md the right hand side denotecl ,a,, b, ) with the understanding that

~(k,a,) = da,) (2- 1-8)

If the signai set is derived 60m a linear bniary code C, equation (2-1-2) becornes equal where

w, = w(C, ) = Hamming weight of codeword i wv = w(ë,ê, ) = Hamming weight of the bit by bit multiplication of codeword i adj

A=---b- N - the signal to noise ratio per dimension. No

For a symmemc signal set (which is always the case for a signal set deriveci fiom a linear bbycode), the probabiüty of error is independent on the signal vector sent, and choosing the all-zero vector as the transmitted codeword ( so = 0 )

This new lower bound has shown very good potential for estimating the soft decoding probability of error on relatively srdl codes as shown m [3] and Chapter 4 of this thesis. It has two big advantages over the well known nearest neighbor lower bound

N(A) = ~(42A-D, ) . That is, it gives by fàr a better estimation of the exact P(E) for a given code, and t equals the union upper bound at high SNR (Le. when A + a). But as t can be seen the computation of L2(A) h) rnuch more comphcated than that of

N(A) . In ht, for codes with k 2 8 the computation becomes very cornplex The cornplex@ cornes basically from the ktthat the number of ternis to be evaiuated m 4(~)is equal to

22k (due to p, in the denominator), and aiso because the double integral

,J-,, J-) has to be evaluaîd for each term 2.2 - A new lower bonnd on Pm)speciFIed bv tbe weight enurnerator

Compared to the union upper bound where at most 2' terms need to be found, L~(A) is not very usefbi in giving a lower bound on the soft decoding probability of error for a code with a large k. Instead, t would be more practicai ifa lower bound codd, iike the union upper bound, have oniy at most 2ktemis to be evaiuated. In [3] t is shown tbat the function

Y (p, ,J2.ll-w,. J-) is monotonicaUy mcreasing in p, in the intemal [- 1,1]. ~t is

Mer show that the correlation factor is upper bomded by By the moaotooicity of the fiinction Y(p,, ,/=,,/-), we can in equarion

(2- 1-9) replace ,O, by cr, and smce the latter is only a Wonof the weights w, , w, , tbe bound L2(A) becolnes upper bounded [3] by Finally ii is shown again in [3] that this new Iower bound approaches the union upper bound at high signal to w ise ratio.

where

is the union upper bound.

The weakness of the bound ( L,(A) < L, (A) is dydue to the poor approximation of the correlation £&or pg by a,. Ody for specific codes wiii L, (A) = L2 (A). The only case known up to now is the case of a Siinplex code. For a Sinplex code, ail codewords have

n+i) weight ( /Z and more importantly the correlation &tors p, are ail qua1 to X . So when conpu-the factor a,, it is found tbat

1 but p, = - Vi,j so the estimation is exact aiad L, (A) = 4 (A) . 2 Of course the lower bound L, (A) is weaker than L, (A) (except for the S*lex codes) but its computatiooal complexity is reduced by a big fàctor. In fàct, as shown in

Cbapter 4, the performance of a (5829) and a (60,30) code was bounded without the use of a super cornputer. Moreover, it took well under 1 defor each code to get the values ploned in Chapter 4. 2.3 - Y et a new lower bound on PCEl

The second new lower bound that is mtroduced in tbis section is a bound deriveci wiîh

the use of section 1.7. In [3], it is shown that for X and Y two zro-mean, unit variance, jointiy Gaussian random variables with correlation coefficient p

P(X z a,Y L b) = Y(@a, b) (2-3- 1)

but in section 1.7, for X and Y, two zero-mean, unit varhw, jomtiy Gaussian random

variables with correlation coefficient p ,we have the bound

for p~flimin{i- ,-t} , therefore

ifthe condition p a min{y} - - km&

From [3] we how th&

and we know tbat so choosing, o = jzand b = ,/- we have

The bound can be simpw even more by noting that

Q( Jm)= P(X r &G)< ëA" (2-3 -8) a.inequality that can be derived very easily from section 1.7. Finally we get the new lower bomd on the probability of mor The exponential version L,(A) is independent of the structure of the code used at

A = 0 (same property as N(A)).

but

therefo re

and

a value weU under the nearest neighbor lower bodof x. CHAPTER 3

A new lower bound for linear binary codes used over the BSC

In this chapter, the decoding error probabihy of lin- binary codes used over the BSC

is lower bounded using de Caen's Inequality. The attempt is wt to find the optimum lower

bound but rather to fhd a relatively simple expression for a Iowa bound on the probability of

error for the case of a BSC. An example is @en m the 1st section to show the validity of the

new lower bound,

3.1 - A new lower bound on Pm) derived from the de Caen's lneqaaiitv

Consider the case of section 1.2 in chapter 1 where signahg takes place over the BSC.

The received vector takes the fonn of

R=Cueë (3-1-1)

with Cu king the tmnmitted signal vector deriveci fiom a linear bbay code and é the bhy error vector. Definmg the enor event

E, = (D(R,CJ> D(R,c,)) ~i* (3- 1-2) the probability of error @en that the si@ vector Cu was tnmmitted is bounded as foiiow The case E = (D(R,cU) = D(R,C, )) is not usexi since we motdetermine precisely which signai vectors to keep or to reject. Cleariy, if one knew which signal vectors to keep in the ment EL, the lower bound on P(~C,,)would be much tighter.

Using the de Caen's Inequality, we have the lower bound on P(E(c~)

where

and

But using the properties defïned in section 1.3

o(C,,Q = ~(ë,@Cu) = w(C,)

êkbehg another sigoal vector in the signal set and

~(ë,,,ë,) = w(C@Cu)= w(~)=o.

and As m the case of the AWGN cbannel, it is easy to see thst the right hand side of equation (3-1-4) is independent of the signai sent, so choosing ttae d-zero vector Co as the tninsmitted signal vector, we have

P(E,~C,)= P(W(C, QZ) < ~(é)) and

On the BSC each occurrence or nomoccurrence of sending a 1 is statistically independent on each use of the channel, therefore the permutation properties can be used to find a simplifieci expression for the conditional probabilities of error. We consider the vector

ë as a combination of four vectors as shown in figure 3.1.1. The elements of have ken permuteci so that aü 1's are at the begbmhg of the vector and do's at the end. Applying the same permutation to C, yields the arrangement of figure 3.1.1. 1 l... 11 1 1000... 000; 11 l...i 1 Il l':O0... 0000

Figure 3.1.1 - Representation of two biaary signal vedors after petmutation

The vector ë, represents a bimry vector of dimension 1, , ë, a bjnary vector of dimension 4 , ë3a binary vector of dimension I, , and ë, a bhary vector of dimension Z, . By inspection it follows that

w(C, a3ë) = w(C,)-w(ël)-w(ë2)+w(ë3)+w(ë4) and

The conditional probabilities of error then becorne equal to and

But w(ël) , w(ë2), w(è3) are ait independent binomial random variables. So setting

we get

and

The notation w, to designate det),and IV, to designate w(c,c,), wiii be used &orn

now on to sirnplif;l the wntmg. We also have to speci@ at this point that when ct = c,, the random variables X, or X, have a zero probaf>'i9therefore the conditional probabw

fv.n ~o,/~o)imxmes fwalto P(Eo,Ic,)

- for cf= C,. With the case where c, # c,, we proceed as follow

4 P(E.~E,~(C~)=CP(X,=~)-P(X~>--X,,X~>--X~IX~=~)Wi W, (3-1-22) k=O 2 2

4 P(E,nE&,)=~ P(X, =k)? (X, >'-A 1 ) -P,( XI>-- 2 k). (3-1-23) L=O

From Figure 3.1.1, we have the relations

FMy,because a signai set derivecl f?om a linear binary code is symmetric, the P(E) is independent of the transmitted signal and the probabii of error for a BSC is lower bounded by Replacing the probability distniution by their respective binomial distniution gives

where p=Q(m) q=1-p

En A = - the SNR per dimension No 3.2 - Example usine the Simolex (731

We use the Siniplex (7,3) code because it has a very simple weight structuree AU non-

zero-codewords have weight 4, and d the w, have a value of 2, so the lower bound sinipHes

t O

For the BSC the exact P(E) of a code is equal to

where a,is the number of coset leaders of weight i For the Simplex (7,3), it reduces to

Wealso have an upper and a lower bound on P(E) for the case of a signal set used over the BSC

and where t is the error-correcthg capabüity of the code. But it was found, through this thesis that

the foiiowing lower bomd is much better than L, (A),

In Figure 3.2.1, the two bonds II, (A) , 4 (A) , L, (A) and L, (A) are plotted dong

with the exact P(E) in terrns of the crosssver probability for the Simplex (7,3) code. The

lower bound is in no way close to the exact P(E) or to L, (A) for this example. It would be

interesthg to see if it bebaves the same way for a different code, let say the Hamm (7,4).

Moreover, after anatYnng the bounds LI,(A) and L,(A) ,one can easily find that they become

both equal to the exact P(E) for the case of a perfect code (Le. Hamming codes and GoIay codes). These two bounds are very easy to compte and çeem to give a very good approximation on the exact P(E) for the BSC in the case of wne or neariy perfect code. Figure 331 - Performance of the Sirnplex (7,3)over the 8SC Results for the AWGN channel

In order to evaiuate the bounds of Chapter 2, a computational tool had to be developed The requirements for the tool were

(1) integrai computaîion capabiiity,

(2) capable of manipulating matrices and vectors, and

(3) low resources utüization

Ttnee computation tools were retained; MATLAB, MAPLE V and FORTRAN 90.

FORTRAN 90 was used in thir thesis as the computation knguage because it met the bat the requirements imposeci for the computation tooL

Even though FORTRAN 90 was best dedfor the task, two major concems had to taking mto consideration The fkst concm was dealing with the numerid computation of

a,b) . A nist algorithm was necessary in order to achieve the computation of large codes. The weU known integral approximated by the summation of areas tequired too much iterations and thus time. Lastead, it was found that sEce the integrand is a very smooth fhction, the Gaw5a.n Quadrature algonthm could be used to give us lots of accuracy and lots of computational speed when evahiatmg ~(~,a,b) [6:pp. 141- 157. The second major conceni was again related to the evaluation of Y(~,a,b) . The

problem Lied with the upper iirnits of the double integral (a). Numeri*, the vahie in-

is very hard to detennined. For some cases it could be 5, whereas for other cases 100 would not be sufncient. We had to make a change of variable in order to elimmate this indeterminate state. Smce the integrand fàils expormtdly, the change of vafiable t = e' can be used transparentiy without mmaghg the integrand [6: p. 139- 1401. The new f'unction becomes

Two programs were developed m this thesis (see Amex 1 & 2). Both were compüed under a Windows 95 enviromnent adrun on a Penhhm-100 platform with onty 16 Megs of

RAM. The ht program computes nwneridy the bounds U(A), N(A) and L~(A) for diffèrent duesof A and uses the generator rnaaix of a hear bhary code. The second program is a modification of the fkst one, and comptes u(A), N(A) , L,(A) and L, (A) for a code with known generator matrix or weight enurnerator. Both programs are able to give the vahie of the bound at A = O. The program are by far not optimum, m the sense that loops, fimtions, subroutines and variables can be either eiimkte or rearrange so that the number of iteration are reduced. By optmiizmg the program code, one wuld probably improve the time required to cumpute the daired bod. It was not a niajor concem at the time of the writing because it never took over 1 minute to the program to calculate 15 points for ali the codes fodin this chapter. In the following sections we calculate the iower bounds on the soft decodmg

probability of error of linear binary codes ushg the programs fiom AMex L & 2. When the

exact P(E) of a code is known, it is caiculated and displayed on the graphs for compaRsoa

The union upper bound is also put on aii graphs to show the convergence of de Caen's lower

bound to the union upper bound dong with the nearest neighbr lower bouad. Myfor

relatively dcodes, was the Iowa bolml L&A) cornputeci.

The Vertices of an Hypercube is a case where ail the possible wdewords are included

in the code set. In other words w codmg is perfomed on the mfodonvectors The signal

vectors in that case are the vertices of an hypercube of dimension N. The genenitor matrix is

the identity maîrk and the parameter of the codes are

Code length n = N

Number of information symbol k = N

Number of panty check symbols n- k = O

Minimum distance of the code d,, = 1

The exact P(E) is weil lmown [4: p. 2561 and is quai to

P(E) = 1-(1-~)~

b- where p=Q(Jz)with A=-. N No The weight distriion of the code is also weii kwwn

Skthe C(3,3) and C(6,6) are relative@smaU code, L, (A) ), L, (A) and L, (A) were computed and compaied with the exact pmbability of error as well as with the union upper

bound and the laernest neighbor lower bound (see Figure 4.1.1 anci 4.1 -2). For the C(12,12), the original bound L,(A) was mt computed because it wodd have requked the evahiation of a 2 " by 2 '*correlation matrEr (over 16 miilion terms). Table 4.1.1 shows the vahie of the probabiiay of mrat a SNR of zero. C(33 C(6,Q CW,12)

union upper bound 3 -50Einn 3.15E+0 1 2.05EM3

1 L,(A = O) 250E-01 2SOE-O1 2SOE-01 nearest neighbor Iowa bound 5.00E-01 5.OOE-û1 5.00E-01

Table 4.1.1 - Values of P(E) at A = O Figure 4.1.1 - Soff decoding probabflity of enor for the vertkes of an Hypercube witf~n=3

-----.

------I +union upper bounci 1.00E-04 - - - l ------Exact P(E) ------1 +L2

------A------+L3 *L4 1.00E-05 -,, , Figure 4.1.2 - Soft decoding probability of error for the vertices of an Hypercube with n=6 Figure 4.1.3 - Soft decoding prohbility of emr for the vertkas of an Hypercube wtth n=l2

1.00E-05 ' -5-4-3-2-1 O 123 4 5 6 7 8 9 EbWo (In db) 4.2 - Hammioe Codes

The HanmiEig codes are perfkct iinear deseqbeaed for correcting a smgle error.

They are, with sonof the variants of the Ebming codes, often used m digital cornmunication for the conîml of errors. One of the mst hnous varianî is the extended

Hsmmiing code used for daîa storage systems. The parameters of the Ikmingwdes are

Code length n =2" -1

Nmber ofintomution symbols k =2" -m-1

Number of parity-check symbois n- k = m

Error-correcthg apbiüty r = 1

Mmtmumdistanceofthecode*. d,, =3

Unfommitely the exact P(E) is not known to the codmg theorists and that's where the boum& of Chapter 2 take an theH miportance. For Hanmiing codes with m < 4 ,the computation of L, (A) can be achieve reIativeiy easiiy. However, because îhe weight diçtr'bution of a HammHig code is weil laiown [5: p. 811

1 f n-l l

it is possible to calculate the lower bod L, (A) and L, (A) on P(E) for almost any

Hammhg wdes with m 2 4 . Figure 4.2-1 and 4.2.2 show rprpectiveiy the boumls on P(E) for a (7,4) and a (1 5,11) Hhmbg code. Table 4.2-1 &es the vahies of dl the boimds vhnthe

SM( is eqdto O. We also make use of L,(A) and L,(A) to evahiate the P(E) for a shortened Hammbg

code with the foliowing parameters

Code length n = 2" 4-1

Minimum distance of the code d, 2 3

We used the (3226) with l = 10 to give what is cded an optimal

(22,16) SEC-DED code with generator matrix This code is due to HSIAO [S: p. 5001. The upper and lower bounds on the decoding probability of error are plotteci in Figure 4.2.3 and the vahles at A = O fouad in Table 4.2.1.

union upper bound 7.50E-t00

Exact P(E) -

L*(A = 0) 7.26E-01

L,(A = 0) 6.94E-01

I nearest neighbor lower bound

Table 4.2.1 - Values of P(E) at A = O

Figure 4.2.2 - Soft decoding probability of error for a (15,lt) Hamrnlng code

EbîNo (in db) Figure 4.2.3 - Soft decoding probability of ermr for a (22,16) SEC- DED code

5fNo (in db) 4.3 - Dual of Harnming codes

The dual of the Harmneig code, also cailed Siniplex code, is a with parameters

Codelength n=2"'-1

Number of information symbols k = m

Numberofparity-checksymbols n-R=2" -m-l

Minimum distance of the code d, = 2"'

The weight of all codewords is equal to 2"'and the weight emunerator of the code [S: p. 811 is

Because al1 the codewords have weight equal to d,, = 2*' ,the upper bound on p,

1 1 is ag=-. But p, =- forall i#j sothat ~,(~)=~,(~)),hasitisshownh~~4.3.1, 2 2

4.3.2 and 4-3.3.

The exact P(E) of a Simplex code is known [4: p. 256-2581 to be union upper bod

Exact Pm - L,(A =O)

L~(A= O)

L, (A = 0)

neatest neighbor lower bound

Table 4.3.1 - Values of P(E) at A = O Figure 4.3.1 - Soft decodhg probability of error for a (7,3) Sirnpiex code

EbfNo (in db) Figure 4.3.2 - Soft decoding probability of emr for a (15.4) Simpiex code

Eb/No(în db) Figure 4.3.3 - SoR decoding pmbability of emr for a (1048579.20) Simpkx code 4.4 - The Goiay Code

The (23,12) Golay code is the ody perfect code to correct up to three random erron in codewords of le@h 23. The structure of the code is very weii bwnand it cari be generated

The weight enurnerator of the (23,l2) Golay code is also known [8: p. 1201

~(~)=1+253*2~+506-2' +1288-2'' + 1288-212+506*~'' +253-216 +-zU wah parameters

Code length n = 23

Number of idionnation symbol k = 12

Number of panty check symbols n - k = 1 1

Error-correcting capbiiity r = 3

Minimum distance of the code d,, = 7.

The dual of the (23,12) Golay code is a (23,ll) code with parameters

Code length n = 23

Number of information symbol k = 1 1

Number of parity check syrnbols n - t = 12

64 Error-correcting capabiiity t = 3

Minimum distance of the code d, = 8

and weight enmerator [8: p. 1201

A(Z) =1+506-Z' +1288-Z1*i253-216.

Like most of the good known codes, the exact P(E) of tée (23,l2)Golay code and its dual are not known. Ushg L~(A) the bounding of P(E) is mCrediiiy simple. Figure 4.4.1 and

4.4.2 show the P(E) of both codes whereas Table 4.4.1 gives the duesof the bounds at

A=O.

W3,11) C(23,12)

union upper bound 1.02E+03 2-05EM3

Em3 Pm - -

L~(A=O) - -

L,(A = 0) 6.88E-01 6.71E-01

L,(A = 0) 2.50E-01 2.50E-01

nearest mighbor lower bound 5.00E-01 5.00E-0 1

Table 4.4.1 - Values of P(E) at A = O Figure 4.4.1 - Soft decoding ptobability of error for a (23,i 1) Gohy code

1.00E-15 -54-3-2-10123458789 WNo (in db) Figure 4.4-2 - Soft decoding probabMy of emor for a (23,12) Gohy code 4.5 - Lame codes

In order to show the reader the capabüity of the bound &(A), codes with more than

500 million codewords was desired for this thesis- The codes had to have a hown weight enwnerator with a rate around )$. Trying to calculate the exact P(E) of such a code is practicay mipossible and tlymg to nad w, for dl i 's and j 's wodd have required the evaluation of more than 250 billion temis. Moreover, getting smnilition resuits on the P(E) for such codes would have required an ewmious amount of time and resources as wek

The probability of error of two very iarge code sets are computed m this section The nrst code is a (58,29,13) Quasi-Cyclic code. The code has a rate of )$,contaEs more than

536 million codewords and has a relative& smaii length of 58 coded symbols. The weight enurnerator of the code is spec5ed in 191. The second code is an Exhmd SM-Even

(60'30, 12) code. Here again the code has a rate of )2, and contains more than 1 billion codewords and has a relatively sdle@ of 60 coded syrnbols. The weight enunierator of the code is presented in [IO]. The computation of the bounds for both codes took about 1 minute. C(58,29,13) C(60930,12)

union upper bound 2.68EM8 5.37E+O8

Exact P(E) - -

L2(b =O) - -

L~(A= O) 6.3 1E-O1 6.28E-01

L,(A = 0) 2.50E-0 1 2.50E-0 1 nearest neighbor lower bod 5.00E-01 5.00E-01

Table 4.5.1 - Values of P(E) at A = O Figure 4.5.1 - Soft decoding probability of error for a (58.29) Quasi- Cyclic code

-54-3-2-101 23456789 BIN0 (€ndb) Figure 4.5.2 - Soft decoding probabilMy of emr for a C(60,30) Singiy- even Extrema1 code

1.00f-23 i -54-3-2-10 1234 56789 Eb/No On db) CHAPTER 5

Discussion, Conclusions and Recommendations

5.1 - Discussioa

It is very interesthg to see fiom the redsthat the bound L~(A)approaches the union

upper bound very rapidty pass the 5 db pomt (more or Iess depencüng on the type of code).

Also, it is very surprising that one can estimite relativeiy close enough the exact probability of

error at around 7 db (again dependmg on the type of code used). The question then is why the

7 db pomt? Part of the explaoation provided in this thesis has to do with the probability

distnion of the noise m the AWGN channeL The noise has probabil@ distniution e(x) .

As we ail weil know e(x) decreases very rapidly to O as x + a. This means that for a given

E > O, ax) >> gx+ E) if x L 4 (property weli known by now). The same appk to the hction ~(~,x,~).That is, given E,,E, >O, ~(~,x,y)»~(~,x +&,,y + 4) for x,y 2 6.

Appendix 1 shows that the convergence poim is not really 5 or 7 db but rather

IO*l~{~)dbwherefora&enR A,, m,A, «A, mm -Q(J~)((S and E aredehd

in Appendix 1). In ktit is shown that the exact P(E) equais to A,mm -e(J2=) with a Note here that the cornMan coefficient has litexal& no effect on Y(~,X,~)when

the vicinity of the mean value, which in this case is x, y = O. That explains why S(A) converges so Eist to the union upper bound even if& approràmation on p is not very good.

As for the boumi &(A), the resuhs show tbat the bounding of Y(~,X,~)by the

Chernoff bound is too weak and thus leads to a very poor lower boundmg on P(E). Onghdy, the appro~tionof Y(~,X,~)by an expneotial Monwas thought to eliminate the need to compute numericaiiy the mt so easy double mtegral invoked with !P(g~,x,~).But, the

Gaussian Quadrature algonthm was used m this thesis and fùWled entirely our computational ne&. The advantage of havin. an exponential version of the lower bodis that it simplifies a lot it~theoncal aaaiysis.

Fhally, the fàct that P(E) is pooriy lower bounded by de Caen's hequality for the BSC is maidy due to two thmgs. FirStiy, hlower bounding of the probability of a union is too weak to get a good lower bomd based on the de Caen's Inequality. If one could kda tighter lower bound on the probability of a union, the de Caen's Iwquality wodd most Eely give a tigther lower bomd on POfor the BSC. Secondy, t spems that the example chosen in

Chapter 3 (the Simplex code) is the worst code that could have been chosen fÏom all the

e>astmg codes. Since ail codewords have an even weigth, ail error probabîlity events where the

weigth of the error pattern equals the weigth of a codeword divide by two will be rejected, as oppose to the case where some of the codewords have an odd weigth. ln the iatter case the strict inequality would never be met and thus all error probability events would be taken into consideration. We can ahsee that the bound L,(A) is much more complex to calciilate and much weaker than the bound L,(A) .

5.2 - Conclusions

In this thesis, the numerical computation of lower bounds on the sofi decoding probability of error for M-equally iikely messages deriveci fiom a hear biuary code used over the AWGN charme1 was succe~yaccomplished. It was found that de Caen's Inequality could be used to lower bound P(E) much better than the lzearest neighbor lower bound for the

AWGN channel. 'Iëe bound L,(A), proved to give the best trade off between the computation complexity and the estimation of P(E) when compared to the other lower bounds presented in this thesis.

We have also developped a lower bound on the probabüity of enor for the BSC. The results obtained with the Simplex code for the BSC, was not as conclusive as the results obtamed fiom the AWGN channeL In kt, we have found a lower bound in L,(A), that outperforms by fàr L,(A) on the computation complexity of the bounds and on the approximation of P(E).

The application of the Cliemoff bound to replace the fimction Y(~,X,y) in the lower bound L,(A) did mt proove to be very usefull. Instead, the Gaussian Quaratrire algonthm was found to be a very efficient method of numericaUy computing the dueof Y(~,X,y). A better boundmp on Y(~,X,~), is necessary in order to eliminate ~(~,x,y) hm the bound

4 (A) -

Fmaiiy, we have determined a very usefull method in AppendD< 1 to evaluate with a certain error, the exact soft decoding probability of error on the AWGN channel for M-equally likely messages deriveci fiom a hear bimary code at any SNR. We showed that as the SNR increases, the error decreases very rapidly and that pas the 10 - 10 4:)- db point where for a given A, E, 4 «AD am -Q(,/=), the error becornes very d and thus 53- Recommendations

.Perform a thougrough numerical analysis on Y(~,X,~)to determine for which 6 > 0, the conditions,

~(p,&Y) = ~(p, x + Y)

Y(P,X,Y)>> Y(P,x,y + E)

Y('(P,~,Y)=+~(P+E,~,Y)

are satisfied, r Study the hction Y(~,X,~)in order to find an approximation on Y(~,X,~)for

x, y 2 6,mvolwig an exponential function (skdariy to the Q f'unction where for x 2 4 ,

--2 e Mx)= )'

+ Perform simulation for d the codes of Chapter 4, and compare with the resub obtained in

this thesis,

Compare the bolmds presented m this thesis with other iower bounds (Le

lower boued). APPENDIX 1

In this Appendix we show th& the Exact P(E) can be approlcimated by

AL-&/2-b.D,) with a positive errot of A, and a negative error of E and that

We f5st start by upper bounding the union upper boimd

(Al. 1) where where

Wenext fïnd the error between u.(A)and L.(A) But there exkt a A . for which the relative error on P(E)

(Al. 10)

When the condition of (Al.10) is met we have

(Al.1 1) pars the 10-log(%) db point.

The folowing is an example of how we can appiy the above theory. For the Golay

(23,12)code, wehave D, =7, AD* =253, kt12 and i=8.

r 1 The fkst thiag to do is to evaluate max 4 in fiulction of

A. This gives At A = 8, we have max = 0.005 << 1, so L'* L'*

(Al. 12) with a maximum error of * 2.1 SE - 26.

Just to compare with the redts obtamed in Cbapter 5, let calculate the P(E) at A = 3,

Eb this correspond to -= 7.6 db (keep in mhd that max 4 No 1+4 'A,.mm -p(J!] 1.. is not met). We have ! Program decaen 1 1.exe writîen by Capt Erik Labonte, sept % ! ! PG SMmt at RMC Kiagston ! ! This program calailates the perfmance of a CODE ! in terms of BLOCK ERROR RATE ushg the DECAEN/SEGWs ! LOWER BOUM) oniy ! ! Request dimaisicms ofthe grnerator mat& ! NrEGER Snsip iNTEGER, ALLOCATABLE :: G(:,:),info(:,:),code(:,:) REAL weigth0,weigth 1,weigth2,val,dmin,c&nin2,corcof REAL decagtq 1,prob 1 ,pr&2,prob3,probS REAL, ALLOCATABLE :: delta(:),ebno(:) REAL, ALLOCATABLE :: seguui(:) CWCTERrep PRMT *,'Enter column dimension of the Code fn)' 25 READ (*,*) n IF (n4)THEN PRM*,'Value mus&be Greater than 0' GOTO 25 END ff PM*,'Enter row dimension of the Code (k)' 30 WAD (*,*) k IFOc=O)W PW*,'Value must be Greater than O' GOTO 30 ENDE PM*," PRNI' *,'Dimensi011 witl be:',n,' WJc - PW*," ! ! -est the Grnerator matrùl of the de ! ALL~AWGOSri)) 50 DOi=l,k DOj=lp PRINT *,'Enter element of row',i,' and column'j 1O0 (*,*) (3% -((G(i~y=l)--(G(bY*)) T'I-IEN PRMT *, 'Entry must be a 1 or a O' GOTO 100 WrF ENDDO ENDDO

I ! Request Db value for the calculation ! PiUNT *,'How many points oa the cwve do you want? (must be an integer)' IEAD (*,*) np (np==O) 'r"HEN PRINT *,'Vaiue must be Greater than O' GOTO 300 ENDIF ~~ATE(<a(ap)) PW*,'Enter the dues of EbrNo in Db' Dû i=Ipp READ (*,*) delta(ï) PRINT *,Vaiue of?, deIta(i),' Db entd..' ENDDO PRINT *," PRINT *,ThNo in Db wiil be:' PRINT *," PRINT *,delta PW*," PRNï *,% thae any values you wddLike to change or n)' EEAD (*,*) rep ((rep-->r).oR(rep~r)) THEN PRNï *, 'Which due?' READ (*,*) val DO i=lpp iF (vai==deIta(i)) THEN PW*,'Enter the new value' READ (*,*) deIta(i) GOTO 355 ELSE IF (i==np) THEN PiUNT *,'Wrong value entered' GOTû 380 ELSE CONTINUE END IF END DO ELSE IF ((rep='nl).OR(rep==W)) THEN GOTO 400 ELSE PRINT *, 'Wrong Entry, Try again' GOTO 360 400 ENDIF 1 ! Let now generate aU the possible cctdewlwàs ! ALLOCA'IE(hfô((2** k)- 1 ,k),code((2** k)- 1JI)) Dû i=l,k DO j- 1 ,((2**k)- 1) inf'ofj,i)=û END DO END DO DO i=l,k Dûj=1,((2**k> 1),(2**i) info(i:j+(2**(i-1))-i,i)- 1 END DO END Dû ! ! Let caidate the codewofds Li MODüLO 2 ! cd-MATMUL(ii,G) code=MOD(cod&2) I W~~AW~O(~P)) do i= 1,np ebno(rQ= 1O**(delta(~I 0) end do ! ! Let calculate the prob of emx ! ALLOCA'wwwwm cfmin=n DO I=lJlp prob54 prob2-0. prob3=0. Dû i=1,(2**k)-1 rF (1-1) then Do j=i+ l,(Z8*k)- 1 c&nin2=sum(MOD(code(i,1 :n)+axie(j, 1a),2)) if (dmin2.ltdmin) dmin5dmin2 END DO END IF weigth 1=SUM(code(i 13)) probl=û. DO j=I,(P*k>l weigthO=DOT-PRODUCT(code(i 1n),code(j, 1 m)) weigth2=SUM(OOde(j, 1m)) corcof-iiveigthO/SQRT(weigb1 iveigth2) cd1 quaMd(SQRT(2+k*ebno(l)*weigth I/n),SQRT(2*k*&o(t)iveigth2/n),~0f~0f,decam) probl-probI+decaen END DO caii qgauss(SQRT(2%*ebno(i)*weigth 1/n),q 1) prob2=prob2+((q 1 -2)/pr&l) prob3=prob3+q 1 probS=probI q 1 ENDDO seguin(lhr~ ENDDO PRINT *,'Values of lOlog(EbrNo): ', delta PRINT *," PRINT *,'Values of the original bound: ', seguin Pa"=

subroutine qgaUSS(a,tot) REAL a,b REAL tot,sum,erf EXTERNAL erf INTEGER j FUNCTION @z 1) f'2u.L pizl REAL erf PARAMETER (pi=3.14 159î654) erf==-(z1 **2)n)kqrt(2*pi) END FUNCTION FUNCIION psi(z 1&,mu) REAL pi,zl,zS~u REAL psi PARAMETER (pi=3.141592654) psi=exp(-(z 1 **2-2*rau*z 1*de* *2)/(2* (1 -rau**2)))/(2*pi*sqrt(l -rau**2)) END FUNCTION ANNEX

! ! Program written by Capt Erik Labonte, sept 96 ! ! PG Student at WCKingsba ! ! This program calculata the performance of a CODE ! in terrns of BLOCK ERROR RATE using the UMON UPPER BOUND, ! the FORNEYs LOWER BOUND and the DECAEWSEGWs WWER BOUND I ! Definmg the variables ! WGEN4) kdnp7polyn~,cob~ MTEGER(4), ALLOCATABLE :: G(:,:),WDA(:,:) REAL*8 c?min7~fSmïn1,min2,min3,weigth 1 ,weigtb2 REAL*%exnum l ,ewunS,srdenom,pr&I4,saiian3,~0fI ,&or2 REAL*8 decaen,q 1,prob2,prob3,lower,probl l,decaesQ,exnumS REAL*8, ALLOCATABLE :: etmo(:),delta(:) REAL*8, ALLOCATABLE :: diernoff(:),seguin(:),~imb(:),l~werb(:) CHARACTER rep,filename*40 ! ! Choiœ ofMENU: Weigth distriion or Generator Matrix ofthe code ! 5 PM~*,' I pfint *,' Performance of the deusing its Generatd pNt *,' Matrix or its Weigth Distnbutim polyname' pNt *,' 1 print *," pfint *,' ***MmMENU***' pfint *," print *,II - Caiculate the performance using the Weigth Distribution polynome' print *,2-Calculate the performance using the Generator MaW print *,'3- Exit the p'm' p~t*," 10 print *,'Enter one of the choices on the MENU print *," read (*,*) rep if (rv'1 ') then prinf *," print *,'Enter the Dimemion of the code C(nJc). Type nJc at the screen' read (*,*) a print *," print *,'Enta the numba of coefficients in the Weigîh Distniion polynme' 1 1 read (*,*) poiynum if(polynum.lt. 1) then print *,'Value must be greater than O, Try again' goto 11 end if ALLoCA'WwDA(2,polynum)) print *," print ?Enter coefficient foilowed by the weigth (sepa.ated by a comma)' do i=l,polynum read (*,*) WDA(l,i), WDA(2,i) print *,Values Entered' end do print *," 12 priat *,'The weigtb disîrïicm polynome will be' pfint *," print *,'C&cient:',WDA( 1,l pIynum) print *,Pegree of Z:',WDA(Z,l piynum) print *," PRINT *,% there any value you would tike to change (y or a)' 13 w3D(*,*) rep ((rv==w.oR(rep--'n) THEN PEUNT *, Wchcolumn? READ (*,*) ad PRINT *, 'Which row?' READ (*,*) row PRINT *,'Enter the new value* READ (*,*) WDA(row,al) PRINT *, 'Value has been changeci' GOTO 12 ELSE IF ((rep='n').OR(r-)) THEN GOTO 20 ELSE PIUNT *, Wrong Entry, Try again* GOTO 13 ENDE 20 goto50 else if (r-2') them p~t*,Il print *,'Enter the row dimension of the code (n)' raid (*,*) n print *,'Enter the column dimension of the code (k)' read (*,*) k ALLOCATE(G(k,n), WDA(2,n+ 1)) Dû i=l,k DOj=l,n PRiNT *,'Enter danent of r&,i,' and colurnn'j IO0 READ (*,*) G(ij) IF ((c(i3')/= ~).AND*(G(~JY=O)) PRNï *, 'Entry must be a 1 or a O' GOTO 100 END IF END DO ENI) 15 DO i=1& PRINT *, G(i,lm) END DO p~t*,* PRINT *,*Isthere any value you woutd like to change (y or n)' 16 READ (*,*) rep ((W====Y').OR(rep-=~Y)) I-HEN PW*, 'Which wlumn?' READ (*,*) col PRINT *, 'Which rM READ (*,*) row PRNï *,'Enter the new value' READ (*,*) û(rcm,col) iF ((c(row,col)/=l)-AND.(G(r0~,~01)/4))THEN PRïNT *, 'Must be a 1 or a O' OTO 17 ELSE PRIlUT *, 'Value has beai &anged' GOTO 15 END IF ELSE IF ((rep='n').ORfrep==W)) THEN GOTO 18 ELSE PM*, Wrmg Entry, Try again' GOTO 16 WIF ! cal1 weigth-distr(G,k,n+ 1,WDA) dl wgee(WDb+ l,polyn=) pnnt *," prht *,The weigh distrrioa poiynome wül be' print *," print *,'Coefficient:', WDA(1, I plynum) print *,'Degree of Z:',WDA(2,1 pdynum) gato 50 else if (rw3') then goto w else print *," print *,'Wrmg entry ... TRY AGAIN' goto 10 end if ! ! Get hmthe user SNR to whicfi he wants the perfbmance to be calculateci ! PRINT *,Wwmany SNR point on the graph do you want for the performance? (must be an integer)' AD (*,*) np rF (np.lt. 1) THEN PRNI' *,'value must be Greater than O' GOTO 300 ENDIF ALLûCATE(delta(np)) PRiNT *,'Enter the values of EWNo in Db' DO i=lpp READ (*,*) delta(i) PRINT *,'Value of;.',delMi),' Db enter d..' ENDDO PRINT *," PRINT *,'EbrNo in Db wiil be:' Pm*," PRINT *,delta PRINT *;' PRINT *,'Is there any duesyou would üke to change (y or n)' 360 READ (*,*) rep ïF ((rep==='y').OR(rep---'Y))THEN 380 PEUNT *, 'Which value?' READ (*,*) val DO i=l,np IF (vai=deita(i)) THEN PRINT *,'Enter the new value' READ (*,*) delta(i) GOTO 355 ELSE IF (i-up) THEN PRNî *,Wrmg value mtered' GOTO 380 EUE CONTINUE ENDIF END DO ELSE IF ((rep=='n').OR(rep=+N')) THEN GOTO 400 ELSE PRZNT *, 'Wrmg Entry, Try agaid GOTO 360 400 END IF

ALLûCATE(ebno(npt 1)) do i= 1 pp etmo(i)= I O**(delta(i)/lO) end do ebno(nP+ 1)=O ! ! Let calculate the prob of errm ! ALLoCATE(chemo~np+l),seguin(np+ l),unionù(up+ l),lowerb(op+ 1)) dmin=n do i=2,polynum if (WDA(2,i).It cfrnh) cimin=WDA(2,i) end do DO I==l,np+l prob24 pro634 prob44 Dû i=2,polynum probl l=0 probl4=0 weigth I=WDA(2,i)

&aor2=SQRT(2*k*ho(I)*weigth lh) DO j=2,polynirm weigth2=WDA(2~') if (weigth 1.eq.wei@) goto 653 min 1 =SQRT(weigth2/weigthi) mid=SQRT(weigth l/weigth2) min3=(weigh 1+weigth2-dmin)/(2*sqrt(weigth 1*weigtb2)) mcof=MIN(minl,min2,min3) fiictm i=SQRT(2*k8ebno(l)*weigWn) cal1 quadSd(fictor 1 ,$dor2,amof;decaen) prob I l=probl 1+(WDA(l jj)*decaen) exnum 1=2*sqrt(wigth 1~gth2)*axcof e~num2--(k*&o(i)/n)*(~gth l+weigth2-exnum1) exdenom= l-(corcoPmf) prob 14=pr& l4+(WDA( 1 j]*exp(exnumS/exdenom)) 653 coatinue end do

dl qgauss(fiidor2,q 1) cd1 quadSd(~or2facror2,(I-(Qnin/(2*weigth l))),hen2) prob2=probî+CWDA(l ,i)*(q 1**2)/(q liprob 1 L+(('wDA(l ,i)-l)*deca&))) ewum3=-(k*ebnw)/n)*4* (weigth 1 *weigtb l)/((4Wgth 1Min) exnum5=(k*eimo(l)/n)*weigth 1 prob4=prob4+CWDA(l ,at(ql** 2)/@robl4+exp(mmS)+((WDA( 1,i)- l)*de~llum3)))) prob3=prob33+0vDA(i,i)*q 1) END DO &emo@)=pr& seguùi(l)--Pr*2 tuiionb(I)=-prob3 iowab(l)=Iower(SQRT(2*k*ebn~1)*dmia/n)) END Dû PRINT *,Valueof EWNo in db ', delta( 1np) PRINT *,n PFüNT *,'Pr& of error using Decaen Bound:', seguin(1:np) PW*," PRMT *,'Rob of error using Union Bound: ', unioab(1 np) PRrNT *," PW*,'Pr& of error using tower Bound: ', lowerb(1 mp) PiuNT *," PRINT *,'Rob of enor uçing Chernoff Bound:', cherno@ 1 :np) Pm*," PRINT *,Minimum distance of the & ', dmin PRMT *," PRINT *,'Values of the hdsat -infuiity ' PRINT *,' 1 PFUNT *,'Union:',imionb(np+l) PRïNT *,7&!caen/seguin:',Seguin(npt. 1) PRINT *,Tmqrf,lowerb(nptI) PRINT *,'Chernofl?,cherno~np+1) print *,Do you want to Save DATA to a file (Y or y for yes)' raJ(*,*) rep if((rep--y')-OR(-) then print *,'Type in the filename to whidi you want the data to be saved' read (*,*) filmame open~=2~CTION='WRITE'~E-6:Ieriame,STATUS-"UNKNO~) write(2,*) ' Delta Unicm Lower Chernoff Foniey' do i=lpp write(2,*) deIta(i),unionb(i),seguin(i),chernoffli),io~~i) addo write(2,*) 'Dis&nce minimum is:',dmin wite(2,*) 'Values fm the bounds at DELTA4 are' write(2,*) 'Union: ',unionb(np+ 1) write(2, *) 'Lower: ',seguin(npt 1) write(2,*) 'ChemofE ',chernofqnp+ 1) wri&(2,*) 'Fmey: ',lowerb(apt I ) c1-m end if DEUOCATE(~~011b910werb,de1ta,ebno,WDA) goto 5 999 end

FUNCTION Mzl) REAL*$ pi31 REAL% erf PARAMETER (pi-3.14 1592654) erf-exp(-@1 **2P)/sqrt(2*Pi) END FüNCTION end

FUNCl"I0N qga-(ax,-) REAL88 ax,bx,a2x W3U*8 =mqga& EXTERNAL h INTEGER(4) v REAL*8 -wx( 1O),=( 10)~ DATA 40.15275338713O726O9OO 1491729864726038,O 1420961093 183820,O. 13 1688638449 1766,O. 1 18 19453 196 15 177,O. IO 1930 1 198 17233 I,0.0832767415767û47I,OOO626î2O48334117 139 lSO6Ol DATA xx/0.07652652 1 13349734,02778585 1 I4 1645 l,O.373706O887l54 196,O.S 1086700 l9SO827I ,O0636OS368O726 5 15O,O.74633 1906460 1 SO8,O.839 1 1697 18222 I88,O.g l2U44282fi 3260,0.96397 l9380.3 128599 1 8 50949/ br=-ax) xxnFOS*(bx) Xnr=o.S*(bx) slmlF0 do v=1,10 dxx=wx*xx(v) sumx=-+(wx(v)*(0i(-~og(=+dxx),a2rzmY(~+~))+oi(-~o)))) end do qgaus~x=x~x*sumx END FUNCTION FüNCTION psi@ l&,mu) REAL*8 pi,zl~~ MAL*8 psi PARAMETER (pi=3.14 1592654) psi--@ 1 *92*tau*z 1 *22+22**2)/(2*(1 -rau*-))Y(2+pi*sqrt(l-m~**2)) END FUNCTION fiuiction lower(wdmin) REAL*8 wdmh REAL*8 lower,low cal1 qgauss(wdmin,low) loWeFlow end finiciion

ALLûCATE(Uifo((2**kk)- 1 ,kk),code((2**kk)- 1 ,M- l),weigth((2**kk)- 1)) DO i=l,kk Dû j=i,((2**kk)-1) info(j,i)=û END Dû END Dû Do i=l& Do ?1,((2**kk)- l),(Zf *O infN:j+(2**(i- 1))-1 ,i)- l ENDDO END DO ! ! Let ca1cuJa.e the codewofds in MODULO 2 ? code=MATMül,(ïrnfo,GG) code=MOD(codcQ) do i=1,(2**kk)-1 weigth(i)=SUM(code(i, 1 :nn- 1)) end do do i=l,nn mALA(i ,i)=O wDAN2,i)IO end do I= 1 do i= 1 ,(2**kk)- 1 if (weigth(i)--.;l) goto 666 1=1+ 1 WDAA( 1 ,l)=WDAA( l ,l)+1 WDAA(2,1)==gth(i) do pi+1 ,(2**kk)- 1 if (~eigth(i~eigth@)then WDAA( 1,I)=wDAA(l,l)+ 1 weigthOi3=-1 end if end do 666 continue end do WDAA(l,l)=l WDAA(2,I w rehrm end REFERENCES

C.E. Shannon, "A Mathematid Theory of Communication", BelI Syst. Tech. J., 27, pp. 379-423 (Part I), 623656 (Part II), July 1948, de Caen, Dominique, "A bwer Bodon the Probabiiay of a Union7', to appear m

Discrete Matheniatics,

Seguin, Gerald, "A Lower Bound on P(E) for M-ary Signahg on the AWGN

Channel", subded to IEEE Tram. on Monnafion Theory,

Wozencraft, John and Irwin Jacob, PrÎncioIes of Communication E- John

Wiley and Sons, 1967,

Lh, CostelIo, Error Control Cochg: Fundamentais and Apolicationsy Prentice Hall,

1983,

Pressy Teikolsky' Vetterling and Flannery, MJMENUME RERECIPES m FORTRANl

Second Edition, Cambridge University Press, 1994,

Blahut, Richard E., Theov and Practice of Error Control Codes, Addison-Wesley,

1983,

Poli, A and Huguet, Li, Codes Correcteurs - Théorie et aor>lications, Masson, Paris, 1989,

NGUYEN, CAT, "The Weigth Dishiution of Some Quasi-Cyclic Codes", A Master

Thesis submitted to the Facuity of Graduate Studies of Concordia Universityy 1979,

Giiiliver' Aaron, 'Weigth Enurnerator of Extremal Singiy-Even [60,30,12] Codes",

IEEE Tm.on Information Theory, VOL 42, No. 2, March 1996.