Chircmg CAC PHU0NG PHAP MA HOA VA GIAI MA 6.1 MO DAU 6.1.1 Khai q uat Trong chuang truac chung ta da de cap den ma khoi va dung no de nghien cuu cac gioi han xac suat loi giai ma doi vai cac kenh co nhieu Nhin tu goc toan hoc, ma hoa khong gi khac la phep anh xa mot thong diep vao tap cac ma tu va giai ma la phep anh xa chuoi ma tu thu duoc vao tap cac thong diep N hu vay bat ky phep anh xa toan hoc nao cung co the dung de ma hoa Tuy nhien de co the giai ma mot cach nhat, anh xa phai la anh xa mot-mot Ngoai anh xa dung de ma hoa va giai ma phai phu hop voi dac tinh vat ly cua cac kenh truyen thong thuc te va phai thuan tien cho viec thuc hien bai cong nghe hien thai Ma hoa khong chi la bien phap de truyen chinh xac mot thong diep qua mot kenh co nhieu n hu chung ta da tim hieu ch u an g Ma hoa la giai phap de nen d u lieu (data compression), mot nhung van de dang duoc cong nghe thong tin rat quan tam Muc dich cua nen du lieu la lam giam du thira, dong thoi cung lam tang mat thong tin huu dung cua nguon tin can luu tru hoac chuyen tai di xa Viec nen du lieu co irng dung rat quan trong ltnh vuc luu tru tep tin va o cac he thong phan tan (nhu truyen hinh Internet) Cac kv thuat nen d u lieu duoc xay dung tren nen tang lv thuyet thong tin va th u a n g d u ac nhac den nhu la mot truong hop cua ma hoa ma hoa dugc hieu mot cach chung nhat Nhiem vu quan nhat cua nen du lieu bao gom viec bien doi mot xau thong tin (string) tir mot cach dien ta nao (chang han ASCII) sang mot xau thong tin khac (chang han chuoi nhi phan) cho noi dung thong tin khong mat di nhimg co dai xau ngan den muc co Chuang 6: Cac phuang phap md hoa vd giai md 151 the N hieu cong cu cho phep dat nen trung binh tren 50%, ca bi?t toi 90% Ma hoa (mat ma hoa) cung la phu an g tien de bao mat thong tin rat hieu qua Truoc day mat ma chi duoc dung mot so linh vuc dac biet (an ninh, quan su, ) N gay mat ma da tro cong cu bien cac hoat dong kinh te, ngan hang, thuang mai dien tir, Chung ta se de cap den mat m a chu an g Trong ch uang chiing ta tap trung nghien ciru mot so phu an g phap ma hoa va giai ma da duoc phat trien va ung dung rong rai nhu ma kiem tra chan le, ma cuon, ma BCH, Hau het cac phuong phap ma hoa va giai ma deu dua tren nhirng ket qua ciia ly thuyet truong (Field Theory) Vi vay de tien loi cho nhung trinh bay tiep theo, chung ta nhac lai ngan gon a day mot so khai niem co so ciia cong cu toan hoc 6.1.2 Nhom, vanh va trirong N hom Tap hop G gom cac phan tir a, b, c, ciing voi mot toan phap © goi la mot nhom (group) neu: i a,beG->a@beG ii a, b, c e G —> a © (b © c) = (a © b) © c (tinh ket hop) iii Ton tai phan tir don vi e e G cho a© e = e© a = aVae G iv Voi moi a e G ton tai a ' e G (goi la phan tu nghich dao ciia a) cho a © a ' = a ’1 © a = e Nhom (G, ©) goi la nhom Abel neu a © b = b © a (tinh hoan vi) Tap hop ciia nhom goi la nhom (subgroup) Neu G chi co huu han cac phan tir thi goi la nhom huu han (finite group) Vi du, tat ca cac chuoi nhi phan co dai N va phep cong modj tao mot nhom huu han PhSn tir don vi la chuoi Phan tir nghich dao ciia chuoi la chinh chuoi Cho (G, ©) la mot nhom huu han va a e G Ta ky hieu a = a © a a = a © a © a, v.v Vi nhom la huu han nen se co cac luv thira i va j voi j > i cho: Ly thuyet thong tin va md hoa 152 a' = a, = a ' © a J-' (6.1-1) Bi£u thuc (6.1-1) ham nghTa a 1'1 la phan tu d an vi Bac (order) ciia phan tir a e G la so nguyen duong nho nhat k cho ak = e De dang thay rang, voi X la so nguyen duong bat ky thi a>vk = e N hom co tinh chat vira neu duoc goi la nhom tuan hoan (cyclic group) Can luu y rang, khai niem luy thira o day khong hoan toan giong khai niem luy thira so hoc thong thuong boi vi toan phap © khong dong nghTa vcri phep nhan so hoc Vdnh Tap hop G gom cac phan tir a, b, c, cung voi hai toan phap © va b * • (a b )+1 = a+l ® b = a b +1 a * , a đ b = ac-»b = c Truong (G, ©, ) voi huu han phan tir duoc goi la truang huu han (finite field) Trir&ng Galois Tap hop G gom cac phan tir a, b, c, ciing voi hai toan phap © va goi la truang Galois (Galois field) neu: i (G, ©) la m ot nhom Abel voi phan tir la phan tir don vi ii Toan tir ® G co tinh giao hoan va tinh ket hop iii a * , b * - » a ® b * iv Phep ® co tinh phan phoi (distributive) doi voi phep © NghTa la a (b © c) = (a b) © (a c) Va, b, c e G Be don gian cho cac thao tac tren GF(q), goi toan phap © la phep cong va toan phap la phep nhan va sir dung cac dau cong va nhan ciia so hoc Noi dung chinh cu the cua cac phep toan se duoc xac dinh boi van canh Xet tap s nguyen , 1, , i, , p -1 voi p la so nguyen to Ap dung phep cong va phep nhan modp cho tap so nguyen ta se co mot truong Galois Ta dung ky hieu GF(q) de chi mot truong Galois gom q phan tir Mot phan tir khac ciia GF(q) co bac nhan bang q - goi la phan tu sa dang (primitive element) ciia GF(q) Noi cach khac, neu a la phan tir so dang ciia GF(q) thi aq_l = Neu a la phan tir so dang ciia GF(q) thi (a, a2, , aq'') lap m ot nhom tuan hoan Da tliuc tren GF(q) Bieu thirc: f(D ) = fnD" + f n_,D1’”1+ - + f0 (6.1-2) Ly thuyet thong tin va ma hoa 154 dugc goi la da thuc (polynomial) bac n tren GF(q) neu cac he so f„, f0 la cac phan tu cua GF(q) Mot da thuc tren GF(q) co he so fn = duoc goi la da thuc dinh chuan (monic polynomial) Ky hieu D f(D) mang tinh uoc le NghTa la, no khong dien ta mot bien hay mot phan tir chua biet ciia truong Mot phan vi sau chung ta se thay the D bang mot phan tir khac, mot phan vi chiing ta quan tam den cac he so ciia da thirc hon la ban than da thirc Hai da thirc goi la bang neu chung co ciing chuoi he so, n gugc lai chung khong bang Vi du cac da thirc tren truong mod 2, f(D) = D + D + D va g(D) = D la hai da thirc khong bang Mat khac, neu chiing ta thay D bang cac phan tir hoac ciia truong ta se thay rang f(0) = 0, f(l) = va g(0) = 0, g( l ) = N h u vay, voi tu cach la cac ham so ciia bien truong mod thi f(D) va g(D) bang nhau, mac dii voi tu cach la da thirc thi chung khong bang Tong hai da thuc tren GF(q) cho truoc la mot da thuc tren truong va dugc xac djnh boi: f(D ) + g(D ) = i ( f , + g , ) D ' (6,1-3) 1=0 Bac ciia f(D) + g(D) la so n Ion nhat cho fn + gn * Vi du: (D : + D + 1) + (D : +1) = m o d ,(l + 1)D: + D + m o d ,(l +1) = D (6.1-4) Tich ciia hai da thirc tren GF(q) cho truoc cung la mot da thirc tren truong va dugc xac dinh boi: f(D )g (D ) = X ' ( ' \ X ^ g , , D' V J=° (6.1-5) > Cho f(D) va g(D) * la hai da thirc tren GF(q) Khi ton tai nhat hai da thirc h(D) va r(D) tren GF(q) thoa man: f ( D) = g (D )h(D ) + r(D) ( 1- ) Trong (6.1-6) bac ciia r(D) nho hon bac cua g(D) Vi du voi cac da thirc g(D) = D* + D + va f(D) = D + D + tren truong m od;, ta co h(D) = D + va r(D) = D 155 Chuang 6: Cac phuang phap md hoa vd giai md Neu f(D) * 0, g(D) * va: f(D) = g(D)h(D) (6.1-7) thi ta noi rang f(D) kha qui (reducible), ngugc lai ta noi rang f(D) khong khd qui (irreducible) Bat ky da thuc nao tren GF(q) cung co the phan tich cac da thuc khong the rut gon tren truong Mot phan tir a e GF(q) dugc goi la nghiem (root) ciia da thuc f(D) tren GF(q) neu f(a) = De dang chung minh dugc rang, a la nghiem ciia f(D) va chi (D - a ) la mot thira so ciia f(D) Vi cac phan tir khac ciia GF(q) lap mot nhom Abel theo phep nhan nen chung co bac nhan (bac theo nhom nhan) chia het cho q - Gia sir a la mot phan tir khac cua GF(q), aq_l = Noi cach khac, a la nghiem cua da thuc f(D) = Dq_l - Vi da thuc f(D) = Dq"' - co q - nghiem khac biet nen ta phai co: D q"' - * = f t (D —a,) (6.1-8) i=l Vi du truong cac so nguyen voi phep cong va nhan m odj ta co: D2 - = ( D - l ) ( D - ) (6.1-9) Truong ciia mot truong la mot truong gom tap ciia cac phan tir ciia truong nguyen thuy va tuan thii cac toan phap ciia truong nguyen thiiy N£u F co mot truong la E thi ta noi rang F la m d rong cua E N u E la truong ciia F va a la phan tir cua F, mot da thirc dinh chuan f(I(D) tren truong E co bac nho nhat cho a la nghiem ciia no thi dugc goi la da thirc tdi thieu (minimal polynomial) Vcri mdi truong E ciia truong Galois GF(q) va mot phan tu a khac GF(q), a co nhat mot da thirc toi thieu fu(D) tren E va fa(D) la bdt kha qui Ngoai ra, neu f(D) la da thirc tren E thi fa(D) chia het cho f(D) va chi a cung la nghiem ciia f(D) Goi E la truong ciia truong Galois GF(q) Goi fi(D) f;(D) fi (D) la cac da thirc toi thieu tren E irng voi cac phan tu khac ciia GF(q) Khi ta co: Ly thuyet thong tin va ma hoa 156 D q-' = n f.(D ) (6 M > i=l E la trucmg cua truang Galois GF(q) va co p (p la so nguyen to) phan tu, a la phan tu so din g GF(q) Goi k (D ) la da thuc toi thiSu cua a Gia thi£t bac cua fa(D) b in g n Khi GF(q) co dung pn phan tu va cac phan tu co the dien ta boi: P = ] T i ka k ; i o = l (6.1-11) k=0 Trong (6.1-11) ik la cach dien ta GF(q) bai cac s6 nguyen Vi du, de thay r5 cach dien ta truong GF(24) ta khao sat truang da thuc tren GF(2) theo modulo f(D) = D + D + Chung ta co the bien doi bang cach chia f(D) cho cac da thuc bac va tren GF(2) va rut ket luan f(D) la da thuc bat kha qui Bang 6.1-1 duoi day chi hai cach dien ta cac phan tu cua GF(24), m o rong cua GF(2) Cach thu nhat thong qua luy thua cua phan tir sinh a Cach thu hai thong qua da thirc g(t) = g3t3 + g2t2 + git + go Phep cong va phep nhan thuc hien theo modulo f(t) = t4 + t +1 Can luu y o day rang, cac he so cua da thuc dugc tinh theo mod2 Bang 6.1-1: Dien ta cac phan tic cua truang GF(24) Diln ta qua phin tCr sinh a 93 92 9i go 0 0 Diin ta qua da thirc g(t) Da thi>c tdi thiiu 0 D + a a 0 D4 + D +1 0 D4 + D +1 a3 0 D4 + D3 + D2 a4 a a a a a 0 1 D4 + D +1 1 D2 + D +1 1 0 D4 + D3 + D2 ♦ D ♦1 1 D4 + D3 +1 1 D4 + D -M 1 D4 + D3 + D2 ♦ D +1 D +1 Chiromg 6: Cac phucmg phap md hoa vd giai md 157 Diin ta qua ph£n ti> sinh a Oi 92 9i go 0 0 a 10 1 D2 + D +1 a 11 1 D4 + D3 + a 12 1 1 D4 + D3 + D2 + D +1 a 13 14 a 1 D4 + D3 +1 0 D4 + D3 +1 Diin Ml qua da thirc g(t) Da thirc t6i thiiu Vi du, de tim g(t) tu a n g ung vai a ta ap dung cong thuc: g (t) = m o d (t4+(+|) t ( 1- 12 ) Phan d u cua t 5/(t + t + 1) bang - 12 - Tren GF(2) mod (-1) = nen mod 2( - 12 - 1) = m od 2(t + t) = g(t) Dieu ham nghTa g = 0, g = 1, gi = va go = n h u ta thay bang 6.1-1 De chi rang a k la nghiem cua da thuc toi thieu tu a n g ung, vi du a 12 la nghiem cua da thuc D + D + D + D +1, ta phai chi rang: m od 2( a 48 + a 36 + a 24 + a 12 + 1) - (6.1-13) Vi a 15 = nen (6.3-13) co the rut gon thanh: m od 2( a 12 + a + a + a +1) = (6.1-14) Thay the cac gia tri tuong ung cua a k vao (6.1-14) ta co: m od2(15 + + 12 + + 1) = m od2(46) = (6.1-15) Cac truong G F(pm) p la s nguyen t va m > 1, co mot vai tinh chat dac biet N eu a va (3 la cac phan tu GF(pm) thi: ( a + P)P" = a p" ' + p pm (6.1-16) f (D ) = I f 1D i (6.1-17) N u: i=0 la da thuc tren GF(p) va a la ph&n tu cua G F(pm) thi voi m > ta co: Ly thuyet thong tin vd md hoa 158 m f ( a p ) = [f(a)] nm (6.1-18) Bi£u thuc (6.1-18) x u it phat tu thuc te (fj)p‘‘ = va (f,)p = f, va: [ f ( a ) ] pm = ^ fja ' p” = f ( a pm) 1=0 (6.1-19) 6.2 MA KIEM TRA CHAN LE Ma kiem tra chan le (Parity-Check Code) la mot dang dac biet cua phep anh xa tu chuoi nhj phan co dai L (chuoi thong tin, thong diep) vao mot chuoi nhj phan khac co dai N > L (chuoi m a tu) Truong hop don gian nhat cua ma kiem tra pa-ri-ty chung ta da gap ky thuat vi tinh nguoi ta them vao cuoi chuoi nhj phan dien ta mot kv tu mot ma hieu nua cho tong cac ma hieu (duoc goi la bac cua ma tu) cua chuoi la mot so chan Trong phan ma hoa nguon roi rac ta da chi rang, mot ma nhu vay co kha nang phat hien loi xuat hien mot m a hieu Neu co hai ma hieu bj loi thi bac cua ma tu bj loi se tro chan va loi xuat hien khong the duoc phat hien Viec kiem tra bac chan le cua ma tu duoc thuc hien qua phep tinh modulo co so Ta co the m d rong cach lam tren bang cach su dung mot tap ma hieu kiem tra, moi ma hieu kiem tra co nhiem vu kiem tra mot tap cua chuoi thong tin Vi du, goi U = (ui, u2, , u L) la chuoi gom L ma hieu nhj phan mang thong tin va X la ma tu co dai N > L duoc xay dung cho U theo luat sau: un 1< n < L ( - 1) l m o d ; 2_ u,g, n L+lL.l §L,2 §1 N (6.2-3) Ly thuyit thong tin vd md hoa 260 function x = squarecode(u) % Create square code o f binary sequence % u is a vector containing the input binary sequence % x is output encoded binary sequence n = length(u) nl = sqrt(n) n2 = fix(nl) if ne(nl-n2,0) display('Length o f x is not a square number') return end n2 = nl+1 k=0 while lt(k,nl) for i = :nl a(k + l,i) = u(i+k*nl) end k = k+1 end for i = 1:n xl(i) = mod(sum(a(i,:)),2) end a = [a.xl’] for i = :n2 xu(i) = mod(sum(a(:,i)),2) end a(n2,l :n2) = xu(l :n2) k = n2A2 a = a' x(l :k) = a(l :k) % end o f square_code function u = square decode(x) 261 Phu luc % Decoding o f square code o f binary sequence % x is input binary sequence % u is a vector containing the decoded binary sequence n = length(x) nl - sqrt(n) k=0 while lt(k,nl) for i=l :nl a(k+l,i) = x(i+k*nl) end k = k+1 end n2 = nl-1 for i = 1:n2 y(l :n2) = a(i,l :n2) s = mod(sum(y),2) if ne(s,a(i,nl)) iro w = i logl = break else lo gl= end end y = [] for j = 1:n2 y( 1:n2) = a(l :n2,j) s = mod(sum(y),2) if ne(s.a(nl,j)) j_colum = j log2 =1 break Ly thuy it thong tin vd md hoa 262 else log2 = end end if and(logl,log2) a(i_row,j_colum) - mod((a(i_row,j_colum)+l),2) end b( 1:n2,1:n2) = a( :n2,1:n2) b = b' for i =1 :n2A2 u(i) = b(i) end % end o f s q u a re d e c o d e function x = triangular code(u) % Create triangular code o f binary sequence % u is a vector containing the input binary sequence o f 15 bits % x is output encoded binary sequence o f 21 bits n = length(u) if ne(n,l 5) display('Length o f u is not valid') return end x = [] k l= k= while gt(k.2) y = [] for i =1 :k v(i) = u ( k K i) s = mod(sum(y).2) end Phu luc x = [x,y,s] k 1= k 1+k k = k-l end y = [] y (l:2 ) = u(l 3:14) s = mod((x(3)+x(9)+x(14)),2) x = [x,y,s,u(15)] s = mod((x(2)+x(8)+x( 13)+x( 17)),2) x = [x,s] s = mod((x(l)+x(7)+x(12)+x(16)+x(19)),2) x = [x,s] % end o f triangular code function e = modulo(p,a,b) % calculate modulo(aAb) based on p % The maximum number is 2147483647 ~ 2.10A9 a = mod(a,p) bl = mod(b,2) b2 = (b-bl )/2 s= for i = l:b2 s = mod(s*a*a,p) end e = mod(s*aAb l,p ) % end o f modulo function x = rsa_encode(n,e,u) % RSA % n = (p-1 )(q-l),p and q are large prime numbers % (n,c) is encoding key set % u is a vector of original information sequence 263 Ly thuyet thong tin vd md hon 264 % x is the output vector o f cyphertext y = double(u) ny = length(y) for i = 1:ny x(i) = modulo(n,y(i),e) end % end o f rsa encode function u = rsa_decode(n,d,x) % RSA Decoding % n = (p-1 )(q-l ),p and q are large prime numbers % (n,d) is the decoding key set % x is the input cyphertext % u is the output plaintext nx = length(x) for i = 1:nx y(i) = modulo(n,x(i),d) end u = char(y) % end o f rsa decode function c \ p h e r t e \ t = hill_code(p,q.plaintext) % Determine Hill cyphertext " o q is the encoding matric p is modulo base ec = double(plainte\t) -95 ns = length(cc) [ni.k] = size(q) d = m - mod(ns.m) if gt(d.O) for i =1 :d cc(ns* i ) = 265 Phu luc end end pause z = (ns+d)/m nz = while lt(nz,z) for j - 1:m x(j)= cc(nz*m+j) end nz= nz+ y(nz,:)= mod(x*q,p) end y = y' for i = 1:ns+d c(i) = y(i) end c = c+95 cyphertext = char(c) % end o f hill code function plaintext = hill_decode(p,a,cyphertext) % Mat ma Hill % p is a prime number to bild modulo based on p % a is the decoding matric % s is clear text, ss is ciphertext cc = double(cyphertext) -95 nc = length(cc) [m,k] = size(a) z - nc/m nz = while It(nz.z) L \ thuYel thong tin va m d hoa 266 for j= l :m y(j) = cc(nz*m+j) end nz = nz+1 x(nz,:) = mod(y*a,p) end x = x' for i = 1:nc c(i) = x(i) end c = c+95 plaintext = char(c) % end o f h illd e c o d e function [x,y] = gamal(p,g,b) % ElGamal Encryption % p is a prime number % g is the generator o f GF(p) % k will be choosen, must not be a prime number % x and y will be sent to receiver (ciphertext) % x = modp(gAk), y = m odp(ubAk) k = input('Insert your key k = ') u = input('lnsert your message u = ') uc = double(u) nu = length(uc) x = modulo(p.g.k) yc = modulo(p.b.k) for i = 1:nu ycc(i) = mod(uc(i)*yc,p) end y = ycc % end o f gamal Phu luc function u = degamal(p,g,x,y) % Decoding ElGamal cyphertext % x and y are ciphertext % (p,g,a) decoding keyset % u is the result message a = input(’Insert your key a = ') q = p -l-a ny = length(y) for i = l:ny u 1(i) = modulo(p,x,q) u l(i) = mod(ul(i)*y(i),p) end u = c h a r(u l) % end o f degamal % end o f degamal 267 TAI LIEU THAM KHAO [1] Bernard, S Digital Communications: Fundamentals and Applications Englewood Cliffs, N.J., PrenticeHall, 1988 [2] Gray, R.M Entropy and Information Verlag, New York 2000 Theory, [3] Khalid, S Introduction to Data Compression, San Francisco, Springer- Morgan Kaufmann, 2000 [4] Kondoz, A M Digital Speech , Chichester, England, John Wiley & Sons, 1994 [5] Error-Control Coding: Fundamentals and Lin, D.J Costello, Jr Applications Prentice-Hall, Upper Saddle River, New Jersey, 2004 [6] McEliece, R.J The Theory o f Information and Coding, Second Edition , Cambridge University Press, Cambridge, 2002 [7] Roman, S Coding and Information Springer-Verlag, 1992 Theory , N ew York: [8] Roth, R.M Introduction to Coding Theory , Cambridge University Press, Cambridge, UK 2006 [9] Stepanov, S A Codes on Algebraic Curves, New York: Kluwer, 1999 [10] Thomas, C.M Thomas, J.A Elements o f Information New York, John Wiley & Sons, 1991 Theory, [11] Van Lint J H An Introduction to Coding T heon, New York' Springer-Verlag, 1992 [12] Vermani, L R Elements o f Algebraic Coding Raton FL: CRC Press, 1996 Theon Boca m yc l yc Loi noi d a u Chuwng 1: M d D A U 1.1 Khai quat 1.2 Nhimg dinh huong chinh cua ly thuySt thong tin va ma h oa 11 1.3 So tong quat cua he thong truyen t i n 14 1.4 Nhung kien thuc co so ve xac suat va qua trinh ngau n h ie n .16 1.4.1 Phep thir va bien c o .16 1.4.2 Dinh nghTa xac suat .17 1.4.3 Nguyen ly xac suat nho va xac suat Io n 19 1.4.4 Nguyen ly cong va nhan xac s u a t 20 1.4.5 Xac suat co dieu k ie n 22 1.4.6 Cong thuc Bernoulli 23 1.4.7 Cong thuc xac suat day d u 24 1.4.8 Cong thuc B ay e s 25 1.4.9 Bien ngau nhien va qui luat phan bo xac suat cua bien ngau nhien 27 1.4.10 Ham cua bien ngau nhien mot ch ieu 31 1.4.11 Bien ngau nhien nhieu c h ieu 33 1.4.12 Qua trinh ngau nhien 35 Chirong 2: LlTOTSG TIN VA EN-TRO -PY 37 2.1 Khai quat 37 2.2 Do thong tin cua bien c o .37 2.3 En-tro-py 39 2.4 En-tro-py cua bien co hop va en-tro-py co dieu k ie n 42 2.5 Lugng tin cua phep th u .49 C hirong 3: NGUON ROI RAC VA KENH ROI RAC 57 3.1 Nguon rod r a c 57 3.1.1 Mo hinh tong quat cua nguon rai c J 3.1.2 Nguon M ark o v ^ 3.2 Kenh rai c ^ 3.2.1 Kenh rcri rac khong n h a ^4 3.2.3 Kenh rai rac co n h a 73 3.2.3 Kenh khong phan l y 79 3.2.4 Dung lugng k e n h 84 Chirong 4: MA HOA NGU(!)N RCH R A C 8 4.1 M a d a u 88 4.2 Qui uac mot so thuat n g u 90 4.3 Ma dong d e u 92 4.3.1 Khoang cach H am m ing .92 4.3.2 Ma phat hien l o i 94 4.3.3 Ma sua s a i 95 4.3.4 Mot so ma dong deu k h a c 97 4.4 Ma khong dong d e u 99 4.4.1 Ma giai dugc mot cach n h a t 99 4.4.2 Ma toi u u 105 4.5 Ma so h o c 111 Chirong 5: MA HOA KENH ROI RAC 116 5.1 M a d a u 116 5.2 M a k h o i ] ]6 5.2.1 Qua trinh ma h o a j 5.2.2 Qua trinh giai m a 5.3 Giai ma trucmg hgp hai ma tu k e n h ]20 ] 73 5.3.1 Xac suat loi giai m a j 73 5.3.2 Giai han C hernoff cua xac suat loi giai ma 125 5.3.3 Su phu thuoc cua xac suat loi giai ma vao toe Jo 5.4 Giai m3 truang hap nhieu ma tu k e n h 135 5.4.1 Giai han tren cua xac su it loi giai m a 135 5.4.2 Giai han duai cua xac suit loi giai m a 140 5.4.3 Ma hoa kenh co n h a 146 Chirong 6: CAC PH UONG PHAP MA HOA VA GIAI MA 150 6.1 M a d a u .150 6.1.1 Khai q u a t .150 6.1.2 Nhom, vanh va tr u a n g .151 6.2 Ma kiem tra chan l e 158 6.3 Ma tuan h o a n 167 6.4 Ma B C H .172 6.5 Ma c u o n 187 ChuoTig 7: M AT M A .203 7.1 M a d a u 203 7.2 Nhung kien thuc ca s a 205 7.3 Mat ma hoa bang phuang phap thay the dan g i a n 208 7.4 Mat ma hoa bang phuang phap thay the dung b a n g 209 7.5 Mat ma hoa bang phuang phap tu k h o a 210 7.6 Mat ma H i l l 211 7.7 Mat ma D E S 213 7.8 Mat ma khoa cong k h a i 214 7.9 Chu ky dien t u 217 Chutmg 8: LY TH U Y ET THONG TIN CAC HE LIEN TUC 220 8.1 Nhung dac trung cua ly thuyet thong tin cac he lien t u c .220 8.2 Mot so thuat n g u 222 8.3 Dinh ly lav mau mien thai g ia n 223 8.4 Djnh ly lay mau mien tan s o .230 8.5 Dien ta noi dung binh phuang cua tin hieu qua gia tri mau 232 8.6 Tinh chat ergodic cua tin hieu lien tu c 234 8.7 Su ket dinh tin hieu lien t u c 238 8.8 Tinh chat cua nhieu ngau nhien mien then gian 241 8.9 Tinh chat cua nhieu ngau nhien mien tan s o 244 8.10 En-tro-py thong tin lien tu c 246 Phu luc: Mpt so chtrong trinh mo phong cac thuat ngir m3 hoa viet tren M atlab 253 Tski lieu tham kh ao 268 |_Y T H U Y E T th n g t in v a m a h o a C h i•u t r a c h n h i e• m x u a t b a n l u Xj b i t c v B ie n ta p : An TRAN VU TH U A N G NGO MY HANH C he ban: N G U Y EN TRl/CJNG HAI S f t a b a n in : NGO MY HANH T r i n h b a y b i a : PH A N T H E V INH NHA XUAT BAN Bl/U DIEN Tru sd: 18 N g u y e n Du, TP Ha N oi D ie n th o a i: -9 ,9 F a x :0 -9 E -m a il: n x b b u u d ie n @ m p t.g o v v n W e b s ite : w w w n x b b u u d ie n c o m v n C h i n h a n h T P H C M : 27 N g u ye n B inh K h ie m , Q u a n I, TP H o C hi Minh D ie n th o a i: -9 0 F a x :0 -9 0 E -m a il: c h m h a n h -n x b b d @ h c m v n n v n C h i n h a n h TP D a N in g : 42 T ran Q uoc T oan, Q uan Hai Chau, T P D a N in g D ie n th o a i: 1 -8 7 E -m a il: p n b ic h @ m p t.g o v v n F a x :0 1 -8 7 In 700 ban, kho 16 x 24 cm, tai Cong ty Co p h a n In B ifu d ie n So dang ky ke hoach xuat ban: 96-2006/CXB/53-08/Bu£> So quyet dinh xuat ban: 171.Q O -NXB BO 25/10/2006 In xong va nop luu chieu thang 11 nam 2006 ... giai ma BCH nhu sau: • Buac Tinh So, S i S < j -2 tir chuoi Y nhan dugc • Buac Tinh a(D ) theo (6.4-27) • Buac Tinh nghiem ciia a(D ) de tim vj tri ciia loi • Buac Tinh gia tri loi V |, VS, ,... — nhu sau: • Nhan chuoi dau Y • Tinh S = m od 2YH (H dugc xac dinh theo (6.2-8)) • Giai phuang trinh S = mod; ZH de tim Z • Tinh X = mod (Y + Z) Trong cac buac tinh toan tren day, quan va kho... chuoi ma hieu thong tin U gom 16 ma hieu nhj phan Ta xep cac ma hieu hinh vuong, moi canh co Ly thuyet thong tin vd ma hoa 166 dai ma hieu Ta dung i de chi cac ma hieu thong tin va x de chi cac