On Dec 15, 8:14 am, "William Stein" <wst...@gmail.com> wrote: > On Mon, Dec 15, 2008 at 8:05 AM, John H Palmieri <jhpalmier...@gmail.com> > wrote: > > > > > > > On Dec 14, 11:16 pm, "William Stein" <wst...@gmail.com> wrote: > >> On Sun, Dec 14, 2008 at 10:53 PM, John H Palmieri > > >> <jhpalmier...@gmail.com> wrote: > > >> > I have some code which generates a bunch of expressions of the form > >> > Sum (n_i a_i) where each n_i is an integer and each a_i is an unknown > >> > in a field, and I'm most interested in the case when the field is GF > >> > (p). Set each of these expressions equal to zero. What's the best way > >> > in Sage to solve the resulting system of equations for the a_i's? > > >> > For example, I can't figure out how to use 'solve', because I can't > >> > figure out how to insist that the variables be treated as elements of > >> > a particular field. Is the only way to convert everything to a matrix > >> > equation? > > >> Is p big or small? Just to be clear above, are you *really* just > >> solving a system of linear equations modulo p? > > > p is small. For each prime p >= 2 and for each integer n >= 3, I have > > a system of equations modulo p in n-1 variables. I am interested in > > solving the system for each pair (p,n) for all values of p and n. I > > understand the characteristic zero situation, and I know about how big > > the coefficients are, so I understand what happens if p is large > > relative to n; I want to see what happens in the other case. (For what > > it's worth, the number of equations is equal to the number of > > partitions of n into three parts.) > > > And yes, I'm solving a homogeneous linear system mod p. > > The only reasonable way to solve this in Sage right now is to create > a matrix and solve the matrix equation, i.e., to encode this as a > linear algebra problem.
Okay, that's what I was afraid of. Thanks, John --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---