Linear solvers

4 views
Skip to first unread message

Waldek Hebisch

unread,
Apr 27, 2023, 6:17:23 PM4/27/23
to fricas...@googlegroups.com
Correct me if I missed something, but it seems that official linear
solving package(s) (that is LinearSystemMatrixPackage and
LinearSystemMatrixPackage1) only work over fields. We also
have linear solver for PID-s, somewhat hidden as 'diophantineSystem'
in SmithNormalForm.

If one wants general solution (that is including basis of null space),
then restriction to PID-s is natural, since otherwise there is no
warrantly that modules have basis. OTOH, if linear system should
have unique solution and our ring is integral domain, then we can
pass to quotient field and solve there. I have written a little
package implementing 'solveUniquely' that fails if solution is non
unique or does not exist and otherwise returns solution, but it
looks strange that such a simple thing apparently remains unimplemented.

BTW: There are other solution methods that we could use, for example
Cramer formulas or Bareiss elimination. But it is not clear which
method is better is specific cases: IME going via fractions works
well if base ring has GCD, otherwise can be quite slow. Bareiss
is claimed to be best general non-modular method, but my impression
is that in many cases it would loose to fractions. Cramer formulas
may lead to exponential complexity and are likely to be slower than
other methods.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages