Minimal Polynomial Algorithms for Finite Sequences
We show that a straightforward rewrite of a known minimal polynomial algorithm yields a simpler version of a recent algorithm of A. Salagean.
Authors: Graham H. Norton
Minimal P olynomial Algorithms for Finite Sequences Graham H. Norton Dept. Mathemat i cs, Univ ersity of Queensland Brisbane, Queensland 4072, Austral ia ∗ 15 Marc h, 201 0 Abstract W e sho w that a straigh tforw ard rewr ite o f a kno wn minimal p olynomial algorithm yields a simpler ve r sion of a recen t algorithm of A. Salagean. Keyw ords: Berlek amp-Mass ey algorithm, c hara cteristic p olynomial, finite sequence, minimal p olynomial. 1 In tro duction Let K b e a field, n ≥ 1 and s = ( s 1 , . . . , s n ) b e a finite sequen ce ov er K . The Berlek amp- Massey (BM) algorithm computes an LFSR of shortest length L and a feedbac k p olyno- mial F ∈ K [ x ] generating s , v acuous ly if L = n [1]. W e b egin with the approac h and basics of [2]. Multiplication mak es L a uren t series in x − 1 in to a K [ x ]-mo dule and p o wer serie s with non-zero annihilator ideal corresp ond to line ar r e curring se quenc es : they hav e a non- zero ’characteristic p olynomial’ (c.p.) [2 , Section 2]. F or finite seq uences, we w ork with Lauren t p olynomials and C ∈ K [ x ] is a c.p. of s if C 0 · s j − d + · · · + C d · s j = 0 (1) for d + 1 ≤ j ≤ n , where d = deg ( C ) ≥ 0 [2, Definition 2.7, Prop osition 2.8]. Any C with d ≥ n is v acuously a c.p. of s . A c.p. C of s is a minimal p olynomial of s if deg ( C ) = min { deg ( D ) : D is a c.p. of s } and t he line ar c omplexity o f s is the degree of any minimal p olynomial of s [2, Definition 3.1], [3, Definition 2.2]. F or example, D = x L − deg ( F ) F ∗ is a c.p. of s — as usual, F ∗ is the recipro cal of F — and D is a minimal p olynomial of s since D ∗ = F and deg ( D ) = L . ∗ e-mail: ghn@maths.uq.edu.au 1 As far a s w e kno w, Algorithm 4 .2 of [2] (Algorithm 3.1 b elow) w as the first algorithm to compute a minimal p olynomial of s iterativ ely . In fact, it is v alid for finite sequences o ve r a comm utative unital in tegral domain. Algorithm 2.2 of [4 ] also computes a minimal p olynomial of s . W e show that these tw o algorithms are closely related: a straightforw ard rewrite of the f ormer using the notation of [4] yields the latter, except that w e initia lise a p olynomial to 0 instead of 1. F urther, the rewrite uses few er v ariables and is simpler. See also Remark 3.2 (iv). W e note that [2] and [3] (an exp ository version of [2]) were referred to in [5, In tro duc- tion]. 2 The Indu c tiv e Const ruction The whole pro cess of Algorithm 3.1 is b est explained in terms of the inductiv e construction of a minimal p olynomial of s whic h w as deriv ed from first principles in [2]. 2.1 The Naiv e V ersio n A natural choice f o r C (1) is 1 if s 1 = 0 and x otherwise; C (1) is certainly a c.p. of minimal degree. No w assume inductiv ely that 2 ≤ i ≤ n and w e ha v e c.p.’s C ( j ) for ( s 1 , . . . , s j ) where 1 ≤ j ≤ i − 1. F rom Equation (1), C ( i − 1) is a c.p. of ( s 1 , . . . , s i ) if a nd only if the discr ep ancy c i − 1 = d( C ( i − 1) ) = d i − 1 X j =0 C ( i − 1) j · s j + i − d i − 1 ∈ K is zero, where d i − 1 = deg ( C ( i − 1) ) [2 , Definition 2.1 0], cf. [1, Equation (10)]. If c i − 1 = 0 then clearly d i − 1 is minimal. But if c i − 1 6 = 0, a new c.p. is needed. W e use an index a i − 1 suggested b y [1, Equation ( 1 1)] a = a i − 1 = max 1 ≤ j ≤ i − 2 { j : d j < d i − 1 } (2) to index a previous c.p. [2, Definition 3.12]. The e xp onent e i − 1 = 2 d i − 1 − i and C ( i ) are from [2, Prop osition 4.1]: C ( i ) = c a · C ( i − 1) − c i − 1 · x + e C ( a ) if e = e i − 1 ≥ 0 c a · x − e C ( i − 1) − c i − 1 · C ( a ) otherwise. (3) No w a = a i − 1 and Equation (3) require i ≥ 3 and d i − 1 > d 1 . F or i ≥ 2 and d i − 1 = d 1 , we complete our construction by C ( i ) = x i if s 1 = 0 s 1 · x i − 2 C ( i − 1) − c i − 1 otherwise. (4) 2 The case s 1 = 0 o ccurs when s has i − 1 ≥ 1 leading zero es. P art (i) of the follo wing prop osition is a n analogue of [1 , Equation (1 5 )]. F or P art (ii), see [3, Prop ositions 4.3, 4.5]. Prop osition 2.1 F or 2 ≤ i ≤ n , if c i − 1 6 = 0 then (i) d i = max { d i − 1 , i − d i − 1 } and (ii) C ( i ) is a c.p. of ( s 1 , . . . , s i ). An analogue of [1, Lemma 1] establishes minimality . Lemma 2.2 ([2, Theorems 3.8, 3.13] or [3, Lemma 5.2]) Let 2 ≤ i ≤ n , f b e a c.p. of ( s 1 , . . . , s i − 1 ) and d( f ) 6 = 0. If g is a c.p. of ( s 1 , . . . , s i ), then deg ( g ) ≥ i − deg( f ). W e no w hav e a naiv e inductiv e construction for a minimal p olynomial of s a nd illus- trate it with t wo binary examples. Example 2.3 Consider the subsequence s = (0 , 1 , 1 , 0 ) of [4, T able I]. W e ha v e C (1) = 1 as s 1 = 0 and c 1 = s 2 6 = 0 . As i < 3, w e apply Equation (4 ): C (2) = x 2 (there is one leading zero). Now i = 3 , c 2 = s 3 6 = 0 and d 2 = 2 > d 1 = 0, so that a 2 = 1. Equation (3) applies with exp onen t e 2 = 2 · 2 − 3 = 1 giving C (3) = C (2) + x 1 C (1) = x 2 + x . Fina lly , c 3 = s 4 + s 3 6 = 0 and d 3 = 2 > d 1 = 0, so that a 3 = a 2 = 1. Equation (3) applies again with exp o nen t e 3 = 2 · 2 − 4 = 0 and C (4) = C (3) + x 0 C (1) = x 2 + x + 1. Example 2.4 Let s = (1 , 1 , 0 , 0). Clearly C (1) = x and c 1 = s 2 6 = 0, s o C (2) = x 0 C (1) + 1 = x + 1 from Equation (4). Next, c 2 = s 3 + s 2 6 = 0 and Equation ( 4) obtains as d 2 = d 1 = 1, giving C (3) = x 1 C (2) + c 2 = x 2 + x + 1. F or i = 4, c 3 = s 4 + s 3 + s 2 6 = 0, d 3 = 2 > d 1 = 1 and a 3 = 2. Eq uat io n (3) with expo nen t e 3 = 2 · 2 − 4 = 0 giv es C (4) = C (3) + x 0 C (2) = x 2 . 2.2 The Refined V e rsion The naiv e construction can b e refined in three w ays. Firstly , by noting that if e i − 1 ≥ 0 then a i = a i − 1 since d i − 1 ≥ i − d i − 1 i.e. d i = d i − 1 b y Prop osition 2.1. But if e i − 1 < 0 , d i = i − d i − 1 > d i − 1 and a i = i − 1. Secondly , we up date e i − 1 = 2 d i − 1 − i (a nd so a void using d i − 1 ) as follows : it is trivial that e i = e i − 1 − 1 if c i − 1 = 0 and easy to c hec k that e i = | e i − 1 | − 1 if c i − 1 6 = 0. Thirdly , we change the inductiv e basis b y in tr o ducing ar t ificial v alues C (0) = 1 (whic h is only a c.p. if s 1 = 0), C ( a 0 ) = 0 (whic h is not a c.p. b y definition) and c a 0 = 1 (which is not a discrepancy). F or definiteness, w e take a 0 = − 1. T hen remark ably (i) e 0 = − 1 (ii) Equation (3) a ccomo dates all three cases and (iii) the up dating o f a i − 1 and e i − 1 remains v alid. W e state this formally . Theorem 2.5 ([2]) Put a 0 = e 0 = − 1, C ( − 1) = 0, c − 1 = 1 and C (0) = 1. F o r 1 ≤ i ≤ n , define C ( i ) , a i , e i b y (i) if c i − 1 = 0, C ( i ) = C ( i − 1) , a i = a i − 1 and e i = e i − 1 − 1 3 (ii) if c i − 1 6 = 0 let C ( i ) b e as in Equation (3 ), a i = a i − 1 if e i − 1 ≥ 0 , a i = i − 1 if e i − 1 < 0 and e i = | e i − 1 | − 1. Then for 1 ≤ i ≤ n , C ( i ) is a minimal p olynomial of ( s 1 , . . . , s i ) and deg ( C ( i ) ) = e i + i +1 2 . The BM algorithm decodes Reed-Solomon, Go ppa and negacyclic co des [6], [7] and has b een extended to m ultiple sequences [8]. F or similar applications and extensions of Theorem 2.5, see [3, Section 8], [9]. 3 The Algo rithm W e deduce Algorithm 3.1 f rom Theorem 2.5. Firstly , we can disp ense with the indices a i if w e define B ( i ) = C ( a i ) and scalars b i = d( C ( a i ) ) for 0 ≤ i ≤ n − 1 pro vided w e up date B ( i − 1) and b i − 1 when e i − 1 < 0. Secondly , we replace d i − 1 b y e i − 1 + i 2 in c i − 1 . Finally , since only curren t v alues are used we can suppress all indices — provided w e k eep a copy T of C ( i − 1) to up date B ( i − 1) when e i − 1 < 0. Algorithm 3.1 ([2, Algorithm 4.2] rewritten) Input: n ≥ 1 and a sequence s = ( s 1 , . . . , s n ) ov er a field K . Output: C , a monic minimal p olynomial for s . b egin B ← 0; b ← 1; C ← 1 ; e ← − 1; for i = 1 to n do c ← P e + i 2 j =0 C j · s j + i − e 2 ; if c 6 = 0 then if e ≥ 0 then C ← b · C − c · x e B ; else T ← C ; e ← − e ; C ← b · x e C − c · B ; B ← T ; b ← c ; endif endif e ← e − 1; endfor return ( C /b ) end. Remark 3.2 W e obtain [4, Algorit hm 2 .2] except tha t (i) w e could (but do not) mak e each C monic (ii) in the notatio n of [4, p. 469 6 ], we do not k eep track of ’ m ’ or deg ( B ) to r ecompute v = N − m − (deg( C ) − deg( B )) at each iteration (where 0 ≤ N ≤ n − 1) (iii) in fact, (a) N corresponds to i − 1 ( b) if there are N leading zero es v = N + 1 (c) if deg ( C ) > deg( B ) then deg ( C ) = m + 1 − deg ( B ) and v = N − m − (deg ( C ) − deg( B )) = N + 1 − 2 deg ( C ); thus v corresp onds to − e (iv) B (0) = 0 and some initial minimal p olynomials will differ; with B (0) = C ( − 1) = 1, C ( i ) = x i − c i − 1 when there are i − 1 ≥ 0 leading zero es, Theorem 2.5 remains v alid, the 4 algorithms are equiv alen t and their outputs are identical. Remarks 3.3 (added in pro of ) (i) Theorem 2.4 of [4] on the set of minimal p olynomials of s is an immediate con- sequence of [2, Theorem 4.16 ]: simply replace d in Theorem 4.16, lo c. cit. b y − v = deg( C ) − deg ( B ) − ( n − m ) and tak e first comp onen ts. (ii) In [10], we calculate the monic recipro cals of the minimal p olynomials o f The- orem 2.5. This readily yields an algorithm similar to the BM algorithm, exc ept that w e do not calculate the ’lengths’ L i ; we up date the exponents as ab ov e and o bt a in L n as e n + n +1 2 . This ar ticle also con tains pro ofs for the results of Section 2 using similar notatio n. The a ut ho r thanks the anony mo us review ers for their helpful commen ts and sugges- tions. References [1] J. L. Massey . Shift-register syn thesis and BCH deco ding. IEEE T r an s. Inform. The ory , 15:122–12 7, 1 969. [2] Graham H. No rton. On the minimal realizations of a finite sequence. J. Symb olic Computation , 20:93–115 , 1995. [3] Graham H. Norton. On shortest linear recurrences. J. Symb olic Computation , 27:32 3 – 347, 1999. [4] A. Salag ean. An Algorithm for Computing Minimal Bidirectional Linear Recurrence Relations. I EEE T r ans. Inform . The ory , 55:4695–4 700, 2009. [5] Graham H. Norton and A. Salagean. On the key equation o ver a comm utativ e ring. Designs, C o des and Crypto gr aphy , 20:1 25–141, 2000. [6] E.R. Berlek amp, A lge br aic Co ding The ory , McGraw - Hill Series in Systems Science , New Y ork-T oron to, 1968 . [7] N.J. P a t t erson. The algebraic deco ding of G oppa co des IEEE T r ans. Info rm. T he ory , 21:203–20 7, 1 975. [8] G.L. F eng and K.K . Tzeng. A generalization of the Berlek amp-Mass ey alg orithm for m ultisequence shift register sequence syn thesis with applications to decoding cyclic co des, IEEE T r ans. Inform. Th e ory , 37:1274 –1287,1991 . [9] Graham H. Norton. Some deco ding applications of minimal realization, In (C. Boyd Ed.) Crypto gr aphy and Co ding , Lecture Notes in Computer Science, Springer, 10 25:53– 62, 1995. 5 [10] Graham H. Norton. The Berlek amp-Mass ey Algo rithm via Minimal P o lynomials. http://arXiv.or g , 10 01.1597. 6
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment