Content deleted Content added
I don't see why PARI/GP deserves special mention, in the lede |
Petr Matas (talk | contribs) →Overview: Per In "The Art of Computer Programming" Berlekamp matrix Q is of type n × n, and deg(g(x)) ≤ deg(f(x)) − 1 = n − 1, because the degree of a polynomial modulo f(x) is always smaller than the degree of f(x) |
||
Line 16:
In general, not every GCD in the above product will be a non-trivial factor of <math>f(x)</math>, but some are, providing the factors we seek.
Berlekamp's algorithm finds polynomials <math>g(x)</math> suitable for use with the above result by computing a basis for the Berlekamp subalgebra. This is achieved via the observation that Berlekamp subalgebra is in fact the [[kernel (linear algebra)|kernel]] of a certain <math>
:<math>x^{iq} \equiv q_{i,n-1}x^{n-1} + q_{i,n-
With a certain polynomial <math>g(x) \in R</math>, say:
:<math>g(x) =
we may associate the row vector:
:<math>g = (g_0, g_1, \ldots,
It is relatively straightforward to see that the row vector <math>g\mathcal{Q}</math> corresponds, in the same way, to the reduction of <math>g(x)^q</math> modulo <math>f(x)</math>. Consequently a polynomial <math>g(x) \in R</math> is in the Berlekamp subalgebra if and only if <math>g(\mathcal{Q}-I)=0</math> (where <math>I</math> is the <math>
By computing the matrix <math>\mathcal{Q}-I</math> and reducing it to [[reduced row echelon form]] and then easily reading off a basis for the null space, we may find a basis for the Berlekamp subalgebra and hence construct polynomials <math>g(x)</math> in it. We then need to successively compute GCDs of the form above until we find a non-trivial factor. Since the ring of polynomials over a field is a [[Euclidean ___domain]], we may compute these GCDs using the [[Euclidean algorithm]].
|