On Fri, May 12, 2023 at 10:36:48PM +0200, Ralf Hemmecke wrote:
> > So do you want "row echelon" form but are worried about cost of
> > zeroing elements above diagonal?  Or do you want to preserve
> > information in upper part?
> 
> Well, my matrix actually comes from polynomial coefficients of several
> polynomials. I want them to be of different degree eventually and want to
> record how these different-degree polynomials came from the original ones.
> Roughly speaking I want the "representation" of the new in terms of the old
> as "small" as possible. Any tail-reduction would add a new term to the
> representation, so I would like to avoid this.

Let me remark that what you write above looks a bit similar
to Hermite-Pade problem and we have specialized solvers for
Hermite-Pade problem.  If you have different problem, then
Hermite-Pade probably will not help.

> > You probably should look at LU decomposition ('LUDecomp' in
> > package LUDecomposition).
> 
> I've meanwhile found fractionFreeGauss! in MatrixLinearAlgebraFunctions.
> That seems to do what I want.

OK.

> It even looks as if it divides out factors
> that were multiplied in a previous step (the "exquo b" part) here.
> 
> https://github.com/fricas/fricas/blob/master/src/algebra/matfuns.spad#L623
> https://github.com/fricas/fricas/blob/master/src/algebra/matfuns.spad#L628

That looks like what is usually called Bareiss elimination.
Without such step it would be unusable for larger problems
due to exponential complexity (exponential growth of size of
coefficients).

> The only thing I do not yet understand is what the ans thing does?
> Why would I have to negate the last row in case of odd row swaps?

'ans' is to preserve sign of determinanat.  Row swap multiplies sign
of determinant by -1, so we need to compensate this.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/20230512225843.s3ls45mprn3ibn33%40fricas.math.uni.wroc.pl.

Reply via email to