[sage-support] Question about xgcd method

2011-09-29 Thread juaninf
Hi everybody, I want implement a modified extend Euclidean Algorithm, (egcd function), but this give wrong results, below my egcd, please help me to fix ... def egcd(p1,p2): if p2 == PR(0): return (p1,1,0) else: (q1, r1) = (p1).quo_rem(p2) (d,s1,t1) = egcd(p2, r1)

[sage-support] Re: Strange behaviour in a simple function

2011-09-29 Thread John H Palmieri
Note that 439+584 = 1023 = 2^10-1, so -439 and 584 are congruent mod M=2^10-1. (While B, M, and N are integers, x is element of Z/MZ, so comparisons like x==B are done mod M. Any printing of numbers involving x are done mod M.) -- John -- To post to this group, send email to sage-support@

[sage-support] Strange behaviour in a simple function

2011-09-29 Thread Maarten Derickx
Mod(B*x, M) doesn't return an integer but an element of Integers(M) = the ring of integers modulo M. So the differences you see are because B is a normal integer so the subtractions involving B and M are just integer subtractions, but the substractions involing x and M are substractions in Inte

[sage-support] Strange behaviour in a simple function

2011-09-29 Thread m m
Hi I have written very simple function, which code I paste below. The thing is that it produces completely unexpected results. I paste them below. Please let me know if this is a bug or I just do something completely wrong. I change in tests only the modulus M. def MLCG_S(B,M,N,x0): x = x0

[sage-support] Re: Using sagenb

2011-09-29 Thread kcrisman
> That used to be the case, but I think since the major upgrade in July, > sagenb.org can probably handle this (no guarantees, of course). But one could use all the various sub-nbs like demo, demo1, alpha, etc.? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe

[sage-support] Re: Using sagenb

2011-09-29 Thread Jason Grout
On 9/29/11 8:00 AM, Berkin Malkoc wrote: AFAIK, sagenb would most probably (if not certainly) not support that many people -administrators of sagenb would of course be more knowledgeable. Actually, your situation is a recurring issue on this list and people are always advised to set up their own

Re: [sage-support] Using sagenb

2011-09-29 Thread Berkin Malkoc
> I'm teaching a new cohort of students this year and was hoping to give > them a quick SAGE tutorial. Our IT guys have not been able to setup a > SAGE server in time so I was wondering how stable sagenb is. Is it > realistic to run a 90 minute lab session (tops) with about 40 odd > students each l

Re: [sage-support] Re: Minimal set of Generators(basis) for an ideal/module

2011-09-29 Thread Vinay Wagh
@Volker Thanks for pointing that out... I had forgotten to mention that in my post. BY the way any idea, why such a restriction? Can we get away with that in sage (of course for that now we cant use Martin's code...) @Martin Thanks for the code. Actually I wanted to do this "without" going back an

Re: [sage-support] Re: Bug in Graph.is_chordal

2011-09-29 Thread Nathann Cohen
Hello Jan ! I am trying to write the patch corresponding to your modifications, but the file has changed much since and I have some trouble dealing with your diff file... Could you copy/paste the totality of the code ? :-) Thaanks ! Nathann -- To post to this group, send email to sage-

[sage-support] Re: Question about congruence

2011-09-29 Thread juaninf
in the paper that I reading say use Euclides Algorithm, but I dont know how On 29 sep, 07:29, juaninf wrote: > g(x) is prime polynomial > > On 29 sep, 07:28, juaninf wrote: > > > > > > > > > How do a(x) congruence b(x)R(x) mod (g(x)) in sage? > > > thanks by your answers -- To post to this gro

[sage-support] Using sagenb

2011-09-29 Thread Vince
Hi all, I'm teaching a new cohort of students this year and was hoping to give them a quick SAGE tutorial. Our IT guys have not been able to setup a SAGE server in time so I was wondering how stable sagenb is. Is it realistic to run a 90 minute lab session (tops) with about 40 odd students each lo

[sage-support] Re: Question about congruence

2011-09-29 Thread juaninf
g(x) is prime polynomial On 29 sep, 07:28, juaninf wrote: > How do a(x) congruence b(x)R(x) mod (g(x)) in sage? > > thanks by your answers -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.c

[sage-support] Question about congruence

2011-09-29 Thread juaninf
How do a(x) congruence b(x)R(x) mod (g(x)) in sage? thanks by your answers -- 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.co

Re: [sage-support] Re: Minimal set of Generators(basis) for an ideal/module

2011-09-29 Thread Martin Albrecht
On 29 September 2011 09:44, Volker Braun wrote: > I don't know if this particular function is wrapped in Sage. Yes it is, as almost any function in Singular, thanks to the Singular function interface :) Using the example from http://www.singular.uni-kl.de/Manual/latest/sing_266.htm sage: P. =

[sage-support] Re: Minimal set of Generators(basis) for an ideal/module

2011-09-29 Thread Volker Braun
I don't know if this particular function is wrapped in Sage. But this Singular function requires the ideal to be homogeneous or the ring to be local. You don't mention this in your email, so I just wanted to point it out. -- To post to this group, send email to sage-support@googlegroups.com To

[sage-support] Minimal set of Generators(basis) for an ideal/module

2011-09-29 Thread VInay Wagh
I am working in a multi-variable polynomial ring over a field (e.g. QQ or CC). How do I get the minimal set of generators for an ideal I (or module M)? I am here referring to something I can do in Singular with the command minbase. (http://www.singular.uni-kl.de/Manual/latest/sing_266.htm) Thanks

[sage-support] Question About Primitive Element

2011-09-29 Thread Maarten Derickx
Phi(z) since by in your example the reduction of z will be primitive by definition. -- 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