Content deleted Content added
→Description of algorithm: Improve formatting. I still don't understand the explanation, but at least it uses minus signs and italic variable names consistently |
Improve refs. Tighten up some whitespace for better formatting. |
||
Line 24:
|authorlink= James Massey
|title= Shift-register synthesis and BCH decoding
|journal= IEEE
|volume= IT-15
|issue= 1
|
|pages= 122–127
|url= http://crypto.stanford.edu/~mironov/cs359/massey.pdf
|doi= 10.1109/TIT.1969.1054260 }}</ref><ref>{{Citation
|last= Ben Atti
Line 38 ⟶ 39:
|first3= Henri
|title= The Berlekamp–Massey Algorithm revisited
|journal= Applicable Algebra in Engineering, Communication and Computing
|dateApril 2006 |volume=17 |issue=1 |pages=75–82
|citeseerx=10.1.1.96.2743
|url= http://hlombardi.free.fr/publis/ABMAvar.html
|doi= }}</ref> Massey termed the algorithm the LFSR Synthesis Algorithm (Berlekamp Iterative Algorithm),<ref>{{Harvnb|Massey|1969|p=124}}</ref> but it is now known as the Berlekamp–Massey algorithm.▼
|doi= 10.1007/s00200-005-0190-z
▲
==Description of algorithm==
Line 48 ⟶ 53:
In the code examples below, ''C''(''x'') is a potential instance of ''Λ''(''x''). The error locator polynomial ''C''(''x'') for ''L'' errors is defined as:
:<math> C(x) = C_L
or reversed:
:<math> C(x) = 1 + C_1
The goal of the algorithm is to determine the minimal degree ''L'' and ''C''(''x'') which results in all [[Decoding methods#Syndrome decoding|syndromes]]
:<math> S_n + C_1
being equal to 0:
:<math> S_n + C_1
Algorithm:
Line 64 ⟶ 69:
Each iteration of the algorithm calculates a discrepancy ''d''. At iteration ''k'' this would be:
:<math> d \gets S_k + C_1
If ''d'' is zero, the algorithm assumes that ''C''(''x'') and ''L'' are correct for the moment, increments ''m'', and continues.
Line 70 ⟶ 75:
If ''d'' is not zero, the algorithm adjusts ''C''(''x'') so that a recalculation of ''d'' would be zero:
:<math>C(x) \gets C(x)
The ''x<sup>m</sup>'' term ''shifts'' B(x) so it follows the syndromes corresponding to ''b''. If the previous update of ''L'' occurred on iteration ''j'', then ''m'' = ''k'' − ''j'', and a recalculated discrepancy would be:
:<math> d \gets S_k + C_1
This would change a recalculated discrepancy to:
Line 106 ⟶ 111:
/* steps 2. and 6. */
for (n = 0; n < N; n++) {
/* step 2. calculate discrepancy */
field K d = s_n + \Sigma_{i=1}^L c_i * s_{n-i};
if (d == 0) {
/* step 3. discrepancy is zero; annihilation continues */
m = m + 1;
} else
/* step 5. */
/* temporary copy of C(x) */
Line 127 ⟶ 128:
b = d;
m = 1;
} else
/* step 4. */
C(x) = C(x) - d b^{-1} x^m B(x);
|