Content deleted Content added
m →The algorithm itself: mathified |
m →The algorithm: punctuation |
||
Line 7:
==The algorithm==
#Let
#Initialise three arrays <math>b</math>, <math>c</math> and <math>t</math>
#While <math>N</math> is less than <math>n</math>:
#*Let <math>d</math> be <math>s_N + c_1s_{N-1} + c_2s_{N-2} + ... + c_Ls_{N-L}</math>.
#*If <math>d</math> is zero, then <math>c</math> is already a polynomial which annihilates the portion of the stream from <math>N-L</math> to <math>N</math>; increase <math>N</math> by 1 and continue.
#*If <math>d</math> is 1, then:
#**
#** Set <math>c_{N-m} \leftarrow c_{N-m} \oplus b_0, c_{N-m+1} \leftarrow c_{N-m+1} \oplus b_1, ... </math> up to <math>c_{n-1} \leftarrow c_{n-1} \oplus b_{n-N+m-1}</math> (where <math>\oplus</math> is the [[Exclusive or]] operator).
#** If <math>L \le \frac{N}{2}</math>, set <math>L \leftarrow N+1-L</math>, set <math>m \leftarrow N</math>, and let <math>b \leftarrow t</math>; otherwise leave <math>L</math>, <math>m</math> and <math>b</math> alone.
#**Increment <math>N</math> and continue.
==External links==
|