ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 03 Jan 2014 12:31:55 -0600Extended Euclid with polynomialshttp://ask.sagemath.org/question/10884/extended-euclid-with-polynomials/Suppose given polynomials $e,q,h,r$ in $R[x]$, $p \in R$ (R a ring), how can I use Sage to find $f$ in $R[x]$ so $f e = q h + r (\text{mod } p)$?
Similarly, given $f,g$ in $R[x]$ with $\text{gcd}(f,g)=1$, what function can I use to compute $s,t$ in $R[x]$ so $s f + g h = 1 (\text{mod } p)$ ?
erinbFri, 03 Jan 2014 12:31:55 -0600http://ask.sagemath.org/question/10884/solving a matrix equation modulo mhttp://ask.sagemath.org/question/10852/solving-a-matrix-equation-modulo-m/Hello,
I am quite new to sage an have troubles with the following problem:
I'm given a matrix 'A' and a vector 'b' and a positiv interger 'm' (m does not have to be prime). 'A' is a matrix with more rows than collums, so it is not quadratic. I would like to find the solution 'x' of the equation: A*x = b (mod m).
I have tried to manage it with e.g.:
A.solve_right(Integers(m),p),
but this works only if m is prime. I also was able to solve my problem if I explicitly insert the equations like this:
gp('matsolvemod([1,2;1,3],6,[1,0]~,1)')
But I need something, where I just have to specify 'A' and 'b' (and of course m). Can somebody help me?
best regardstedmosSun, 22 Dec 2013 00:12:57 -0600http://ask.sagemath.org/question/10852/