Thank you for your response Alex. Here is the code: # # # # #The second loop (with the “i” variable”) chooses a prime less than 100. # I then set the (2,1) and (3,1) entries of the 3x3 matrix A equal to various multiples of this prime (i.e. (2,1)=c1*prime and (3,1)=c2*prime) # # # # for c in range (1,5000): for i in range (3,100): if is_prime(i)==True: c2=1 c1=1 while c1<30: a4=c1*i c1+=1 while c2<30: a7=c2*i c2+=1 # # #The other entries in the matrix are chosen randomly from [3,100] # a1=randint(3,100) a2=randint(3,100) a3=randint(3,100) a5=randint(3,100) a6=randint(3,100) a8=randint(3,100) a9=randint(3,100) # # # #Now create the 3x3 matrix A, and its characteristic polynomial f # # # A= MatrixSpace(RationalField(),3)([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]) f=A.charpoly() # # #We test to make sure that f is irreducible and Galois and set K to be the resulting extension # # if f.is_irreducible() == True: K=NumberField(f,'t'); if K.is_galois()==True: # # #Now make sure that the prime does not divide the discriminant of our polynomial f # # if f.discriminant()%i != 0: # # #We print out the matrix, char polynomial, # the prime, factorization of f modulo the prime, and indicate which of the three entries (2,1),(3,1),(3,2) are divisible by the prime # print "======================================" A f print "disc = ",factor(f.discriminant()) print "prime=",i L = FiniteField(i,'q'); P.<w>=L[] f.factor_mod(i) print "(2,1) is in prime:",0==a4%i print "(3,1) is in prime:",0==a7%i print "(3,2) is in prime:",0==a8%i # # # # # # # # #
Best, Ben On Mar 3, 4:28 pm, Alex Ghitza <[email protected]> wrote: > Hi, > > On Wed, 3 Mar 2010 08:08:13 -0800 (PST), Ben Linowitz > <[email protected]> wrote: > > I wrote a little program which almost brought my department's server > > down and would like to know why. Here is a brief description of the > > program [I can reproduce the actual code if necessary]: > > That would indeed be helpful. > > > By the way, the version of sage on the server is: SAGE Version 3.1.2, > > Release Date: 2008-09-19 > > My computer tells me that today's date is 2010-03-04. The latest > version of Sage is 4.3.3. That could very well be the issue :) > > If you can, try to get sage-4.3.3 and run your code again. Judging from > your email, I guess that your department's server runs Debian or Ubuntu, > and it has the distribution's (very very old) version of Sage > installed. You could try to convince your system administrator to get > the latest version of Sage and install it (it would have to be a binary > from sagemath.org or building from source, since there isn't a more > recent Debian package). If that's difficult, you can always put Sage > into your own home directory (if your disk quota allows it). > > If you post your full code here then someone else could run it on > sage-4.3.3 and report on their findings. Either it will work well, > which would give you a good argument to get your sysadmin to upgrade; or > it will bring somebody else's server down, in which case there's > probably some bug to fix. > > Best, > Alex > > -- > Alex Ghitza --http://aghitza.org/ > Lecturer in Mathematics -- The University of Melbourne -- Australia -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
