Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Berlekamp–Massey algorithm

From Wikipedia, the free encyclopedia
Algorithm on linear-feedback shift registers
Not to be confused withBerlekamp's algorithm.
Berlekamp–Massey algorithm

TheBerlekamp–Massey algorithm is analgorithm that will find the shortestlinear-feedback shift register (LFSR) for a given binary output sequence. The algorithm will also find theminimal polynomial of a linearlyrecurrent sequence in an arbitraryfield. The field requirement means that the Berlekamp–Massey algorithm requires all non-zero elements to have amultiplicative inverse.[1] Reeds and Sloane offer an extension to handle aring.[2]

Elwyn Berlekamp invented an algorithm for decodingBose–Chaudhuri–Hocquenghem (BCH) codes.[3][4]James Massey recognized its application to linear feedback shift registers and simplified the algorithm.[5][6] Massey termed the algorithm the LFSR Synthesis Algorithm (Berlekamp Iterative Algorithm),[7] but it is now known as the Berlekamp–Massey algorithm.

Description of algorithm

[edit]

The Berlekamp–Massey algorithm is an alternative to theReed–Solomon Peterson decoder for solving the set of linear equations. It can be summarized as finding the coefficients Λj of a polynomial Λ(x) so that for all positionsi in an input streamS:

Si+ν+Λ1Si+ν1++Λν1Si+1+ΛνSi=0.{\displaystyle S_{i+\nu }+\Lambda _{1}S_{i+\nu -1}+\cdots +\Lambda _{\nu -1}S_{i+1}+\Lambda _{\nu }S_{i}=0.}

In the code examples below,C(x) is a potential instance ofΛ(x). The error locator polynomialC(x) forL errors is defined as:

C(x)=CLxL+CL1xL1++C2x2+C1x+1{\displaystyle C(x)=C_{L}x^{L}+C_{L-1}x^{L-1}+\cdots +C_{2}x^{2}+C_{1}x+1}

or reversed:

C(x)=1+C1x+C2x2++CL1xL1+CLxL.{\displaystyle C(x)=1+C_{1}x+C_{2}x^{2}+\cdots +C_{L-1}x^{L-1}+C_{L}x^{L}.}

The goal of the algorithm is to determine the minimal degreeL andC(x) which results in allsyndromes

Sn+C1Sn1++CLSnL{\displaystyle S_{n}+C_{1}S_{n-1}+\cdots +C_{L}S_{n-L}}

being equal to 0:

Sn+C1Sn1++CLSnL=0,LnN1.{\displaystyle S_{n}+C_{1}S_{n-1}+\cdots +C_{L}S_{n-L}=0,\qquad L\leq n\leq N-1.}

Algorithm:C(x) is initialized to 1,L is the current number of assumed errors, and initialized to zero.N is the total number of syndromes.n is used as the mainiterator and to index the syndromes from 0 toN−1.B(x) is a copy of the lastC(x) sinceL was updated and initialized to 1.b is a copy of the last discrepancyd (explained below) sinceL was updated and initialized to 1.m is the number of iterations sinceL,B(x), andb were updated and initialized to 1.

Each iteration of the algorithm calculates a discrepancyd. At iterationk this would be:

dSk+C1Sk1++CLSkL.{\displaystyle d\gets S_{k}+C_{1}S_{k-1}+\cdots +C_{L}S_{k-L}.}

Ifd is zero, the algorithm assumes thatC(x) andL are correct for the moment, incrementsm, and continues.

Ifd is not zero, the algorithm adjustsC(x) so that a recalculation ofd would be zero:

C(x)C(x)(d/b)xmB(x).{\displaystyle C(x)\gets C(x)-(d/b)x^{m}B(x).}

Thexm termshifts B(x) so it follows the syndromes corresponding tob. If the previous update ofL occurred on iterationj, thenm =kj, and a recalculated discrepancy would be:

dSk+C1Sk1+(d/b)(Sj+B1Sj1+).{\displaystyle d\gets S_{k}+C_{1}S_{k-1}+\cdots -(d/b)(S_{j}+B_{1}S_{j-1}+\cdots ).}

This would change a recalculated discrepancy to:

d=d(d/b)b=dd=0.{\displaystyle d=d-(d/b)b=d-d=0.}

The algorithm also needs to increaseL (number of errors) as needed. IfL equals the actual number of errors, then during the iteration process, the discrepancies will become zero beforen becomes greater than or equal to 2L. OtherwiseL is updated and the algorithm will updateB(x),b, increaseL, and resetm = 1. The formulaL = (n + 1 −L) limitsL to the number of available syndromes used to calculate discrepancies, and also handles the case whereL increases by more than 1.

Pseudocode

[edit]

The algorithm fromMassey (1969, p. 124) for an arbitrary field:

   polynomial(fieldK) s(x) = .../* coeffs are sj; output sequence as N-1 degree polynomial) *//* connection polynomial */   polynomial(field K) C(x) = 1;/* coeffs are cj */   polynomial(field K) B(x) = 1;   int L = 0;   int m = 1;   field K b = 1;   int n;/* steps 2. and 6. */for (n = 0; n < N; n++) {/* step 2. calculate discrepancy */       field K d = sn +L
i=1
ci sn - i
if (d == 0) {/* step 3. discrepancy is zero; annihilation continues */ m = m + 1; }elseif (2 * L <= n) {/* step 5. *//* temporary copy of C(x) */ polynomial(field K) T(x) = C(x); C(x) = C(x) - d b−1 xm B(x); L = n + 1 - L; B(x) = T(x); b = d; m = 1; }else {/* step 4. */ C(x) = C(x) - d b−1 xm B(x); m = m + 1; } }return L;

In the case of binary GF(2) BCH code, the discrepancy d will be zero on all odd steps, so a check can be added to avoid calculating it.

/* ... */for(n=0;n<N;n++){/* if odd step number, discrepancy == 0, no need to calculate it */if((n&1)!=0){m=m+1;continue;}/* ... */

See also

[edit]

References

[edit]
  1. ^Reeds & Sloane 1985, p. 2
  2. ^Reeds, J. A.;Sloane, N. J. A. (1985),"Shift-Register Synthesis (Modulo n)"(PDF),SIAM Journal on Computing,14 (3):505–513,CiteSeerX 10.1.1.48.4652,doi:10.1137/0214038
  3. ^Berlekamp, Elwyn R. (1967),Nonbinary BCH decoding, International Symposium on Information Theory, San Remo, Italy{{citation}}: CS1 maint: location missing publisher (link)
  4. ^Berlekamp, Elwyn R. (1984) [1968],Algebraic Coding Theory (Revised ed.), Laguna Hills, CA: Aegean Park Press,ISBN 978-0-89412-063-3. Previous publisher McGraw-Hill, New York, NY.
  5. ^Massey, J. L. (January 1969),"Shift-register synthesis and BCH decoding"(PDF),IEEE Transactions on Information Theory, IT-15 (1):122–127,doi:10.1109/TIT.1969.1054260,S2CID 9003708
  6. ^Ben Atti, Nadia; Diaz-Toca, Gema M.; Lombardi, Henri (April 2006),"The Berlekamp–Massey Algorithm revisited",Applicable Algebra in Engineering, Communication and Computing,17 (1):75–82,arXiv:2211.11721,CiteSeerX 10.1.1.96.2743,doi:10.1007/s00200-005-0190-z,S2CID 14944277
  7. ^Massey 1969, p. 124

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Berlekamp–Massey_algorithm&oldid=1311849913"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp