On Thursday 02 April 2009, Christophe Oosterlynck wrote:
> Hi,
>
> is it possible to calculate the echelon form of matrices containing
> polynomials over GF(2)? I'm getting the following error:
>
> NotImplementedError: echelon form over Univariate Polynomial Ring in x
> over Finite Field of size 2 (using NTL) not yet implemented
>
> M._maxima_().echelon() does calculate an echelon form but it takes a
> while and it's not taking into account the finite field GF(2)...
Hi,
one question of course is how you define the echelon form over a ring. If you
construct a *multi*variate polynomial ring over GF(2) in *one* variable, then
you have three options:
sage: P = PolynomialRing(GF(2),1,'x')
sage: type(P)
<type
'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular'>
sage: M = random_matrix(P,5,5)
sage: M
[ x^2 + 1 x^2 x^2 + x x^2 + x + 1 x + 1]
[ 0 x^2 + x x 0 x^2]
[ x + 1 x^2 + x + 1 1 0 x + 1]
[ x^2 x^2 + x + 1 x^2 + x + 1 0 x + 1]
[ x^2 + x 1 x^2 + 1 x^2 + x x^2 + 1]
sage: type(M)
<type 'sage.matrix.matrix_mpolynomial_dense.Matrix_mpolynomial_dense'>
sage: M.echelon_form('row_reduction')
sage: M.echelon_form('frac')
sage: M.echelon_form('bareiss')
Check
sage: M.echelon_form?
to see what each does in detail, basically:
* row_reduction: only reduce by base field elements
* frac: compute in the fraction field
* bareiss: fraction free Gauss elimination (the name is rather bad)
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [email protected]
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---