[sage-support] Re: ntl dylib
Thank you very much. I moved to 10.5 and it worked very well. Now, I follow the tutorial! Best regards, Le 6 oct. 08, à 18:33, William Stein a écrit : On Mon, Oct 6, 2008 at 7:15 AM, Guilhem_Bourrie [EMAIL PROTECTED] wrote: hello, I am a new member of this group, I downloaded the source code and tried to compile it. My computer is a Mac PowerPC G5 core 2 duo, the operating system is MacOSX 10.3.9. Unfortunately, building Sage on OS X 10.3 is not supported and won't work. You must upgrade to 10.4 or 10.5. -- William Guilhem Bourrié INRA Géochimie des sols et des eaux Europôle méditerranéen de l'Arbois Bâtiment Laënnec BP 80 F 13545 Aix-en-Provence cedex 04 Tél.: +33 4 42 90 85 41 Fax : +33 4 42 90 85 17 --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
William Stein a écrit : If your hardware is pretty good (which the OP's hardware is), the problem is definitely the webserver and notebook interface. Running many sage sessions at once gets around this. ok, if I understand correctly, running many servers (listening on different ports) will make the job. Note -- if the notebook servers all operated on the same data (via a central database or files on the filesystem or something), then one could have the best of both worlds... I guess. But I doubt I'm putting another month of my life into the Sage notebook anytime in the near future. Can you give me some hints? The notebook servers cannot share the datas? May be we can have some support to develop something... Yours t.d. begin:vcard fn:Thierry Dumont n:Dumont;Thierry org;quoted-printable:CNRS - Universit=C3=A9 Lyon 1. / Villeurbanne France.;Institut Camille Jordan adr:;;43 Bd du 11 Novembre;Villeurbanne Cedex;F;69621;France email;internet:[EMAIL PROTECTED] title;quoted-printable:Ing=C3=A9nieur de Recherche/Research Ingineer tel;work:(33) 4 72 44 85 23 x-mozilla-html:FALSE url:http://math.univ-lyon1.fr/~tdumont version:2.1 end:vcard smime.p7s Description: S/MIME Cryptographic Signature
[sage-support] Re: Using Sage with a large number of undergraduate students.
Alex Clemesha wrote: We have spend a majority of our effort on Knoboo trying to make it a robust and scalable web application (like, for example, the 'frontend' is totally decoupled from the backend 'kernel'). What's missing from Knoboo, and what is so great about the Sage Notebook, is all the awesome usability features like @interact, etc. I'm optimistic that we will be able to merge both our best attributes in due time. Like others have said, the interact and other features from the sage notebook are important (important enough that I can't run Knoboo for what I need). However, I'd *love* to run knoboo as a front end. If @interact and these other features were added to knoboo and knoboo was included as an optional spkg, I'm sure the user base for knoboo would skyrocket, at least compared to the current user base. My guess is that can only be really good for knoboo, and the sooner, the better. Thanks for all your work on knoboo! Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Matrix inverse with symbols as elements
On Oct 7, 8:45 am, Mike Hansen [EMAIL PROTECTED] wrote: Hello, On Mon, Oct 6, 2008 at 6:50 PM, SK [EMAIL PROTECTED] wrote: Now, I try and compute X * (X^(-1)). Instead of getting an identity matrix, I get a complicated matrix in x, y and z. Thinking that the ^ may be the issue, I tried X * (X.inverse()), but got the same issue. Am I doing something wrong? Or is there a way to simplify and reduce it to an identity matrix? I tried Y = X * (X.inverse()) and then Y.simplify(), but it did not help. The simplification routine you want is simplify_rational. This notation / simplification comes from Maxima. For example, sage: x,y,z = var('x,y,z') sage: X = matrix( [ [x, y, z], [y, z, x], [z, x, y] ]) sage: Y = X*X^-1 sage: Y.simplify_rational() [1 0 0] [0 1 0] [0 0 1] Note you could do this by calling simplify_rational on each of the elements of the matrix. The method that allows you to do this is apply_map(). It takes in a function and replaces each entry with the result of calling that function on the entry. sage: Y.apply_map(lambda a: a.simplify_rational()) [1 0 0] [0 1 0] [0 0 1] --Mike What about this for a not-quite solution? sage: R.x,y,z=QQ[] sage: X = matrix( [ [x, y, z], [y, z, x], [z, x, y] ]) sage: Y = X*X^-1 sage: Y [(-1)/(-1) 0 0] [0 (-1)/(-1) 0] [0 0 (-1)/(-1)] John --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: is it possible to show() a variable with it's name = in front of it
This does not format things like a_2 very well. What about this one? def ashow(v): show(sage.calculus.calculus.var(v)==eval(v)) Show seems to format the equations nicely without explicitly using latex. If latex is desired explicitly, the following works, too: def ashow(v): show(latex(sage.calculus.calculus.var(v)==eval(v))) a_2 = 1/2 ashow('a_2') Note that sage.calculus.calculus.var(v) has to be used instead of var(v), otherwise the variable will be reset in the global name space. It took me a while to figure this out. :) Could something like this be included as a standard function in one of the next releases? Stan On Oct 7, 12:27 am, kkwweett [EMAIL PROTECTED] wrote: 'Eval' can do that : def ashow(v): show($+v+=%s$%latex(eval(v))) b=2/3 ashow('b') Hope that helps --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
On Tue, Oct 7, 2008 at 7:10 AM, Jason Grout [EMAIL PROTECTED] wrote: Alex Clemesha wrote: We have spend a majority of our effort on Knoboo trying to make it a robust and scalable web application (like, for example, the 'frontend' is totally decoupled from the backend 'kernel'). What's missing from Knoboo, and what is so great about the Sage Notebook, is all the awesome usability features like @interact, etc. I'm optimistic that we will be able to merge both our best attributes in due time. Like others have said, the interact and other features from the sage notebook are important (important enough that I can't run Knoboo for what I need). However, I'd *love* to run knoboo as a front end. If @interact and these other features were added to knoboo and knoboo was Just to add, the interact code we wrote for Sage is GPLv2+ so I think legally it could be included in Knoboo, and socially I am enthusiastic about you doing so. The more code sharing between the Sage and Knoboo projects, the better. William included as an optional spkg, I'm sure the user base for knoboo would skyrocket, at least compared to the current user base. My guess is that can only be really good for knoboo, and the sooner, the better. Thanks for all your work on knoboo! Jason -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: is it possible to show() a variable with it's name = in front of it
On Tue, Oct 7, 2008 at 2:50 AM, Stan Schymanski [EMAIL PROTECTED] wrote: This does not format things like a_2 very well. What about this one? def ashow(v): show(sage.calculus.calculus.var(v)==eval(v)) Show seems to format the equations nicely without explicitly using latex. If latex is desired explicitly, the following works, too: def ashow(v): show(latex(sage.calculus.calculus.var(v)==eval(v))) a_2 = 1/2 ashow('a_2') Note that sage.calculus.calculus.var(v) has to be used instead of var(v), otherwise the variable will be reset in the global name space. It took me a while to figure this out. :) Could something like this be included as a standard function in one of the next releases? Yes, that could be reasonable, if it has proper documentation, etc. Can somebody open a trac ticket and post it here? William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Sage compile fails on Fedora Core 2
Hi all, I'm using a Fedora Core2 based system, which I can't upgrade. Compilation fails for the latest Sage (3.1.2). I'm not sure how to fix this error. Any help is appreciated. I'm pasting the relevant lines below. Thanks, Venkat. Making all in cxx make[4]: Entering directory `/data/venkat/sage-3.1.2/spkg/build/ gmp-4.2.2.p1.fake/src/cxx' g++ -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMPXX -I.. -m32 -O2 - fomit-frame-pointer -mcpu=pentium4 -march=pentium4 -c osmpz.cc -fPIC - DPIC -o .libs/osmpz.o /bin/sh ../libtool --mode=link g++ -m32 -O2 -fomit-frame-pointer - mcpu=pentium4 -march=pentium4 -o libcxx.la isfuns.lo ismpf.lo ismpq.lo ismpz.lo ismpznw.lo osdoprnti.lo osfuns.lo osmpf.lo osmpq.lo osmpz.lo libtool: link: `/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/libstdc++.la' is not a valid libtool archive make[4]: *** [libcxx.la] Error 1 make[4]: Leaving directory `/data/venkat/sage-3.1.2/spkg/build/ gmp-4.2.2.p1.fake/src/cxx' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/data/venkat/sage-3.1.2/spkg/build/ gmp-4.2.2.p1.fake/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/data/venkat/sage-3.1.2/spkg/build/ gmp-4.2.2.p1.fake/src' Error building GMP. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Adding text/formatting to worksheets in the notebook
William Stein wrote: On Mon, Sep 22, 2008 at 11:05 AM, D. Monarres [EMAIL PROTECTED] wrote: I want to produce a worksheet tutorial for SAGE usage on our campus and was wondering how I could add static text around the notebook cells like is done in the live tutorial . Do I just edit as plain text and add formatting there? Yes, that's what you do right now. Use html markup as for a normal web page. You can also use $$'s for math markup. Couldn't find that information in docs. How do I insert html code into the cell that produces nice html output ? Are there any other ways of text formatting ? Serge William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
On Oct 7, 2008, at 3:58 AM, Thierry Dumont wrote: William Stein a écrit : If your hardware is pretty good (which the OP's hardware is), the problem is definitely the webserver and notebook interface. Running many sage sessions at once gets around this. ok, if I understand correctly, running many servers (listening on different ports) will make the job. Yep. Note -- if the notebook servers all operated on the same data (via a central database or files on the filesystem or something), then one could have the best of both worlds... I guess. But I doubt I'm putting another month of my life into the Sage notebook anytime in the near future. Can you give me some hints? See attached. I'm sure much better could be done, but it's enough to get started. The notebook servers cannot share the datas? All this means is that if someone creates an account on one server, they can't log into another server. May be we can have some support to develop something... That would be very good, it certainly is technically possible, just no one's done it yet. - Robert --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~--- lots_of_notebooks.sage Description: Binary data
[sage-support] Re: Sage compile fails on Fedora Core 2
On Oct 7, 10:01 am, Venkat [EMAIL PROTECTED] wrote: Hi all, Hi, I'm using a Fedora Core2 based system, which I can't upgrade. Compilation fails for the latest Sage (3.1.2). I'm not sure how to fix this error. Any help is appreciated. I'm pasting the relevant lines below. It looks like you are using gcc 3.3.3. To build Sage you need gcc 3.4 or higher since we need C99 capabilities. Even if you update the compiler I doubt Sage will build corrrectly. FC 2 was released in 2004 and is way out of date. Thanks, Venkat. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Adding text/formatting to worksheets in the notebook
Just found an example html(h1Double Precision Root Finding Using Bisection/h1) here: http://wiki.sagemath.org/interact/calculus Sorry to trouble about it. There is also another question: can I group the cells like in Mathematica ? Hide them, expand them ? thanks Serge Serge Salamanka пишет: William Stein wrote: On Mon, Sep 22, 2008 at 11:05 AM, D. Monarres [EMAIL PROTECTED] wrote: I want to produce a worksheet tutorial for SAGE usage on our campus and was wondering how I could add static text around the notebook cells like is done in the live tutorial . Do I just edit as plain text and add formatting there? Yes, that's what you do right now. Use html markup as for a normal web page. You can also use $$'s for math markup. Couldn't find that information in docs. How do I insert html code into the cell that produces nice html output ? Are there any other ways of text formatting ? Serge William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Unexpected changes in worksheet name.
So am i wrong? or it is a bug --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: divmod question
On Oct 7, 2008, at 10:59 AM, Bob Wonderly wrote: You support people fixed my long arithmetic problem. The patch applied and worked! Great. Now here is another puzzlement: alist = [divmod(0,6),divmod(1,6),divmod(2,6),divmod(3,6),divmod(4,6),divmod (5,6)] #of course that's one line print alist for k in range(6): x = divmod(k,6) print x [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5)] Traceback (click to the left for traceback) ... AttributeError: 'int' object has no attribute 'quo_rem' This is because range() returns python ints, not sage Integers. You can use srange() or the [0..5] notation to get a list of Python integrs. Alternatively, divmod should probably be modified to do the function below if neither operand is a python object, and maybe even use the coercion model otherwise (so on int, integer, it would do integer, integer). Though it isn't important for your example, the reason for calling quo_rem rather than x//y, x%y is because the latter may do the same work twice doubling the runtime. def moddiv(x,y): return (x//y,x%y) for k in range(9): x = moddiv(k,6) print x (0, 0) (0, 1) (0, 2) (0, 3) (0, 4) (0, 5) (1, 0) (1, 1) (1, 2) Well, at least I have a workaround. By the way, in an earlier exchange you'all told me how to use the notebook() approach. I like it much better than the command line Sage I was using. Thanks for keeping me happily getting answers with Sage. Bob Wonderly --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] integer linear programming in Sage?
Hi, a question of a colleague from my lab: can Sage solve linear systems A*x=b, where A is a matrix with positive integer coefficients, b is a vector with positive integer coefficients, and the unknown vector x is searched over the positive integers? I guess this is more or less equivalent to integer linear programming (ILP), see http://en.wikipedia.org/wiki/Integer_linear_programming#Integer_unknowns. Paul Zimmermann --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Typesetting problem - Sage VMware appliance on WindowsXP
Dear Sage developers, In the Firefox interface to SAGE, the command show(integrate(x)) results in 2 x 2 rather than 2 x 2 in fact , a number of quotients and fractions are displayed incorrectly. I am using SAGE 3.1.2 VMWare appliance on Windows XP. Regards, Hazem --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Typesetting problem - Sage VMware appliance on WindowsXP
Actually, I just noticed that jsMath gave me an error (jsMath failed to set up properly, error code -7). Could this be related? is this common? why does it happen and how do I fix it? thanks, Hazem On Oct 7, 2:57 pm, Hazem [EMAIL PROTECTED] wrote: Dear Sage developers, In the Firefox interface to SAGE, the command show(integrate(x)) results in 2 x 2 rather than 2 x 2 in fact , a number of quotients and fractions are displayed incorrectly. I am using SAGE 3.1.2 VMWare appliance on Windows XP. Regards, Hazem --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: integer linear programming in Sage?
I believe that the answer is currently: no, Sage cannot do integer linear programming. But I could be wrong, if that capability is hiding in something added since the last time this question came up. I am not sure what open source code is out there to do that - ? M. Hampton On Oct 7, 12:38 pm, Paul Zimmermann [EMAIL PROTECTED] wrote: Hi, a question of a colleague from my lab: can Sage solve linear systems A*x=b, where A is a matrix with positive integer coefficients, b is a vector with positive integer coefficients, and the unknown vector x is searched over the positive integers? I guess this is more or less equivalent to integer linear programming (ILP), seehttp://en.wikipedia.org/wiki/Integer_linear_programming#Integer_unknowns. Paul Zimmermann --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Sage compile fails on Fedora Core 2
Thanks for the response. I'll try to use Sage on a more recent system. Thanks, Venkat. On Oct 7, 1:21 pm, mabshoff [EMAIL PROTECTED] dortmund.de wrote: On Oct 7, 10:01 am, Venkat [EMAIL PROTECTED] wrote: Hi all, Hi, I'm using a Fedora Core2 based system, which I can't upgrade. Compilation fails for the latest Sage (3.1.2). I'm not sure how to fix this error. Any help is appreciated. I'm pasting the relevant lines below. It looks like you are using gcc 3.3.3. To build Sage you need gcc 3.4 or higher since we need C99 capabilities. Even if you update the compiler I doubt Sage will build corrrectly. FC 2 was released in 2004 and is way out of date. Thanks, Venkat. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: integer linear programming in Sage?
On Oct 7, 8:38 pm, Paul Zimmermann [EMAIL PROTECTED] wrote: a question of a colleague from my lab: ... integer linear programming (ILP) I'm not sure either, but he could try his luck with openopt: http://scipy.org/scipy/scikits/wiki/MILP interfacing with lpsolve or glpk. h --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Adding text/formatting to worksheets in the notebook
Serge Salamanka wrote: Just found an example html(h1Double Precision Root Finding Using Bisection/h1) here: http://wiki.sagemath.org/interact/calculus Sorry to trouble about it. There is also another question: can I group the cells like in Mathematica ? Hide them, expand them ? You can hide a cell by putting %hide (hide the input, but make it easy to get it back) or %hideall (hide the input for sure). You can't group cells together yet. There is a project, Knoboo, for creating a Mathematica-like notebook interface to a python application and some people have used it with Sage. It doesn't provide for @interact functionality, though. Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Typesetting problem - Sage VMware appliance on WindowsXP
Hazem wrote: Actually, I just noticed that jsMath gave me an error (jsMath failed to set up properly, error code -7). Could this be related? is this common? why does it happen and how do I fix it? This might be a fonts issue. When you click on the jsMath button in the bottom right, does it say jsMath v3.5 (TeX fonts) in the title of the resulting popup? Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
William Stein wrote: On Mon, Oct 6, 2008 at 10:11 AM, kcrisman [EMAIL PROTECTED] wrote: To emphasize again, I doubt it scales to more than 30 users all hammering the server at once. I can confirm this from our experience as well; on a more moderate size server even 15-20 at once becomes very problematic. One thing I should emphasize is that it's not necessarily a hardware or bandwith limitation, i.e., in my experience running multiple servers on different ports on the same hardware allows one to go serve more users at once. To sum up the discussion about what makes things slow, is it a file-locking bottleneck with the sage server? Thanks, Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
Hello, On Tue, Oct 7, 2008 at 1:15 PM, Jason Grout [EMAIL PROTECTED] wrote: To sum up the discussion about what makes things slow, is it a file-locking bottleneck with the sage server? I don't think anyone has done any serious profiling of the notebook so I think that conclusion is quite a bit premature. One thing that might be helpful would be to run the notebook under Solaris with DTrace. --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: integer linear programming in Sage?
On Tuesday 07 October 2008, Paul Zimmermann wrote: Hi, a question of a colleague from my lab: can Sage solve linear systems A*x=b, where A is a matrix with positive integer coefficients, b is a vector with positive integer coefficients, and the unknown vector x is searched over the positive integers? I guess this is more or less equivalent to integer linear programming (ILP), see http://en.wikipedia.org/wiki/Integer_linear_programming#Integer_unknowns. Is this what you are looking for: http://www.singular.uni-kl.de/Manual/3-0-4/sing_610.htm ? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
On Oct 7, 1:27 pm, Mike Hansen [EMAIL PROTECTED] wrote: Hello, On Tue, Oct 7, 2008 at 1:15 PM, Jason Grout [EMAIL PROTECTED] wrote: To sum up the discussion about what makes things slow, is it a file-locking bottleneck with the sage server? I don't think anyone has done any serious profiling of the notebook so I think that conclusion is quite a bit premature. One thing that might be helpful would be to run the notebook under Solaris with DTrace. Ironically pretty much everything works under Solaris now but the notebook. I think that issue is easy to fix (RAND_MAX related probably), but the even shorter way to profile here is either using VTune (which is proprietary) or Systemtap (which is free). If we can get Mike's notebook testing code to do some larger number of operations in automated mode we could probably easily determine where the bottlenecks are. --Mike Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: integer linear programming in Sage?
I have created a spkg to install lp_solve into Sage; it can be obtained at: http://www.math.unl.edu/~shartke2/files/lp_solve-5.5.0.13.spkg I have posted to sage-devel suggesting this spkg for inclusion into Sage. lp_solve includes a linear programming solver (simplex based) and an integer programming solver (branch and bound). The IP solver is strong enough to solve problems up to about 100 variables (give or take, depending on the problem). lp_solve comes with Python bindings, and their online documentation is very clear. GLPK also has 2 sets of nice Python bindings: python-glpk at http://www.dcc.fc.up.pt/~jpp/code/python-glpk/ and PyGLPK at http://www.cs.cornell.edu/~tomf/pyglpk/ PyGLPK was just updated to work with the latest version of GLPK. I believe that work is ongoing to make python-glpk compile with the very latest version of GLPK. I hope to make a spkg for GPLK and these Python bindings at some point, though seeing how this semester is going, it's probably not going to be anytime soon. Best wishes, Stephen --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
On Oct 7, 2008, at 13:27 , Mike Hansen wrote: Hello, On Tue, Oct 7, 2008 at 1:15 PM, Jason Grout [EMAIL PROTECTED] wrote: To sum up the discussion about what makes things slow, is it a file-locking bottleneck with the sage server? I don't think anyone has done any serious profiling of the notebook so I think that conclusion is quite a bit premature. One thing that might be helpful would be to run the notebook under Solaris with DTrace. FWIW, you can also use DTrace as well on Mac OS X, 10.5, as well. Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds --- If it weren't for carbon-14, I wouldn't date at all. --- --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Matrix inverse with symbols as elements
Thank you Mike and John. It seemed unlikely to me that there was a bug anyway, but I had to ask. I used the 'simplify_rational' and it worked perfectly. Also, I noticed that Mike used 'apply_map'. That and lambda make it look rather close to Lisp; it looks like the more I look at sagemath, the better it seems to be. Thanks again, and the software seems to be *very* addictive! I wish I had had something like this when I was in graduate school. Regards, SK On Oct 7, 2:05 am, John Cremona [EMAIL PROTECTED] wrote: On Oct 7, 8:45 am, Mike Hansen [EMAIL PROTECTED] wrote: Hello, On Mon, Oct 6, 2008 at 6:50 PM, SK [EMAIL PROTECTED] wrote: Now, I try and compute X * (X^(-1)). Instead of getting an identity matrix, I get a complicated matrix in x, y and z. Thinking that the ^ may be the issue, I tried X * (X.inverse()), but got the same issue. Am I doing something wrong? Or is there a way to simplify and reduce it to an identity matrix? I tried Y = X * (X.inverse()) and then Y.simplify(), but it did not help. The simplification routine you want is simplify_rational. This notation / simplification comes from Maxima. For example, sage: x,y,z = var('x,y,z') sage: X = matrix( [ [x, y, z], [y, z, x], [z, x, y] ]) sage: Y = X*X^-1 sage: Y.simplify_rational() [1 0 0] [0 1 0] [0 0 1] Note you could do this by calling simplify_rational on each of the elements of the matrix. The method that allows you to do this is apply_map(). It takes in a function and replaces each entry with the result of calling that function on the entry. sage: Y.apply_map(lambda a: a.simplify_rational()) [1 0 0] [0 1 0] [0 0 1] --Mike What about this for a not-quite solution? sage: R.x,y,z=QQ[] sage: X = matrix( [ [x, y, z], [y, z, x], [z, x, y] ]) sage: Y = X*X^-1 sage: Y [(-1)/(-1) 0 0] [ 0 (-1)/(-1) 0] [ 0 0 (-1)/(-1)] John --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Matrix inverse with symbols as elements
A slight variation on John's answer: you could also do: sage: R.x,y,z=QQ[] sage: X = matrix( [ [x, y, z], [y, z, x], [z, x, y] ]) sage: Y = X*X^-1 sage: Y = matrix(R,Y) sage: Y [1 0 0] [0 1 0] [0 0 1] M. Hampton On Oct 7, 8:16 pm, SK [EMAIL PROTECTED] wrote: Thank you Mike and John. It seemed unlikely to me that there was a bug anyway, but I had to ask. I used the 'simplify_rational' and it worked perfectly. Also, I noticed that Mike used 'apply_map'. That and lambda make it look rather close to Lisp; it looks like the more I look at sagemath, the better it seems to be. Thanks again, and the software seems to be *very* addictive! I wish I had had something like this when I was in graduate school. Regards, SK On Oct 7, 2:05 am, John Cremona [EMAIL PROTECTED] wrote: On Oct 7, 8:45 am, Mike Hansen [EMAIL PROTECTED] wrote: Hello, On Mon, Oct 6, 2008 at 6:50 PM, SK [EMAIL PROTECTED] wrote: Now, I try and compute X * (X^(-1)). Instead of getting an identity matrix, I get a complicated matrix in x, y and z. Thinking that the ^ may be the issue, I tried X * (X.inverse()), but got the same issue. Am I doing something wrong? Or is there a way to simplify and reduce it to an identity matrix? I tried Y = X * (X.inverse()) and then Y.simplify(), but it did not help. The simplification routine you want is simplify_rational. This notation / simplification comes from Maxima. For example, sage: x,y,z = var('x,y,z') sage: X = matrix( [ [x, y, z], [y, z, x], [z, x, y] ]) sage: Y = X*X^-1 sage: Y.simplify_rational() [1 0 0] [0 1 0] [0 0 1] Note you could do this by calling simplify_rational on each of the elements of the matrix. The method that allows you to do this is apply_map(). It takes in a function and replaces each entry with the result of calling that function on the entry. sage: Y.apply_map(lambda a: a.simplify_rational()) [1 0 0] [0 1 0] [0 0 1] --Mike What about this for a not-quite solution? sage: R.x,y,z=QQ[] sage: X = matrix( [ [x, y, z], [y, z, x], [z, x, y] ]) sage: Y = X*X^-1 sage: Y [(-1)/(-1) 0 0] [0 (-1)/(-1) 0] [0 0 (-1)/(-1)] John --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: integer linear programming in Sage?
Martin - is that already accessible in sage or would some sort of wrapper have to be written? Is this what you are looking for: http://www.singular.uni-kl.de/Manual/3-0-4/sing_610.htm ? Cheers, Martin -- name: Martin Albrecht _pgp:http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99 _www:http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Using Sage with a large number of undergraduate students.
On Tue, Oct 7, 2008 at 1:27 PM, Mike Hansen [EMAIL PROTECTED] wrote: Hello, On Tue, Oct 7, 2008 at 1:15 PM, Jason Grout [EMAIL PROTECTED] wrote: To sum up the discussion about what makes things slow, is it a file-locking bottleneck with the sage server? I don't think anyone has done any serious profiling of the notebook so I think that conclusion is quite a bit premature. One thing that [...] --Mike This hits the nail on the head.Mike's right on -- essentially no work at all has gone into any profiling of the notebook. We simply don't know why or what about it is slow or doesn't work well under a heavy load. I could guess, since I'm intimately familiar with the code, but I would likely be wrong. In fact, at present, the *only* tool we have for observing this slowness is anecdotal situations that some of us have experienced when teaching -- that's it. Like Michael says, we need good tools for simulating a heavy load, etc. William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---