Re: [sage-support] Order of a cyclic group
Yes, exactly that we mean. On 19 January 2012 20:13, John Cremona wrote: > On 19 January 2012 15:39, Santanu Sarkar wrote: >> Consider a polynomial f(x) over GF(2)[x]. How is it possible >> to find the order of the cyclic group generated by f(x)? > > What do you mean by the group generated by the polynomial? Do you > mean the group generated by a root of f (when f is irreducible)? > > John Cremona > >> >> -- >> 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 >> URL: http://www.sagemath.org > > -- > 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 > URL: http://www.sagemath.org -- 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 URL: http://www.sagemath.org
[sage-support] Period of a sequence
I have a sequence of 0 and 1. I know that period is small. Is there any function in Sage by which I can find the period? Or, can we find the period efficiently? For example {0,1,0,1,0,1} has period of length 2. -- 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 URL: http://www.sagemath.org
Re: [sage-support] Period of a sequence
On Fri, Jan 20, 2012 at 9:56 AM, Santanu Sarkar wrote: > I have a sequence of 0 and 1. I know that period is small. Is there > any function in Sage by which > I can find the period? Or, can we find the period efficiently? > For example {0,1,0,1,0,1} has period of length 2. Try http://www.sagemath.org/doc/reference/sage/matrix/berlekamp_massey.html or http://www.sagemath.org/doc/reference/sage/crypto/lfsr.html > > -- > 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 > URL: http://www.sagemath.org -- 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 URL: http://www.sagemath.org
Re: [sage-support] Period of a sequence
Thank you very much. On 20 January 2012 20:57, David Joyner wrote: > On Fri, Jan 20, 2012 at 9:56 AM, Santanu Sarkar > wrote: >> I have a sequence of 0 and 1. I know that period is small. Is there >> any function in Sage by which >> I can find the period? Or, can we find the period efficiently? >> For example {0,1,0,1,0,1} has period of length 2. > > Try > http://www.sagemath.org/doc/reference/sage/matrix/berlekamp_massey.html > or > http://www.sagemath.org/doc/reference/sage/crypto/lfsr.html > >> >> -- >> 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 >> URL: http://www.sagemath.org > > -- > 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 > URL: http://www.sagemath.org -- 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 URL: http://www.sagemath.org
Re: [sage-support] max plus polyhedra and tropical algebra
By max-plus polyhedra, I am referring to something as described in this paper http://www.cmap.polytechnique.fr/~allamigeon/papers/AllamigeonGaubertGoubaultSAS08.pdf . Probably it's a new concept and definition ? Basically, I am looking for some method which takes as input some points (say in 2D) and provide me the max plus polyhedra covering those points and if possible, plot out what it looks like. By tropical algebra, I mean tropical geometry -- I am interested in learning and playing around with it if it's available in Sage -- 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 URL: http://www.sagemath.org
[sage-support] Setting default graph display
Hi, is there a way to change the application that displays 2d or 3d images on Linux ? when I plot something in 2D I want a certain app to open the image. I believe Jmol is the default for 3D which works fine on my machine, but I want to change my app handling 2d to something else. Thanks, -- 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 URL: http://www.sagemath.org
[sage-support] Re: Setting default graph display
xdg-open is called to display images, as per the fdo specs. Refer to your distribution for how to configure defaults on your system. -- 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 URL: http://www.sagemath.org
[sage-support] Re: Problem with sagetex with a large file (many sage calculations)
Well, That's the problem. It only seems to happen when I run desolve_odeint several times. The later runs seem to choke. Note that sage does *not* choke on any later sage calculations other than desolve. So, I don't really have a minimal example. I will try to see if I can come up with one, but it might not be that small. Do you want me to send it to you directly? On Jan 19, 8:34 pm, Dan Drake wrote: > On Fri, 16 Dec 2011 at 12:41PM -0800, Steven McKay wrote: > > Hi, > > I have been writing a large set of notes for Differential Equations, > > and have come across an annoying problem (that is probably my fault.) > > After adding enough sage constructions to my latex file, I started > > getting errors like: > > [...] > > > Which repeats over and over many times. This is only for > > constructions using desolve_odeint, and only for the later sage > > constructions, not the earlier ones. *However*, the same sage code in > > a notebook runs as expected without errors. So I know I don't have > > any errors in my code that is doing this. In fact, I took the sections > > with the "offending code" and compiled them separately in a smaller > > document, and the sage code ran correctly. > > > So, it seems as if I am overloading sage with too many calculations. > > This confuses me, however, because I thought sage did each calculation > > separately. > > It does them separately, but all in one session. > > I'm not sure what is happening here. Can you provide a minimal example > that demonstrates the problem? I've never seen anything like this, and > can't imagine why it would happen. > > Dan > > -- > --- Dan Drake > - http://mathsci.kaist.ac.kr/~drake > --- > > signature.asc > < 1KViewDownload -- 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 URL: http://www.sagemath.org
Re: [sage-support] Re: Setting default graph display
On Fri, Jan 20, 2012 at 10:15 AM, Volker Braun wrote: > xdg-open is called to display images, as per the fdo specs. Refer to your > distribution for how to configure defaults on your system. > Also, if you set the environment variable "SAGE_BROWSER", then that program will be used instead of xdg-open. -- William -- William Stein 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 sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Syntax error attempting to load a python file
Could anyone shed light on what is happening here? In a sage notebook cell I wish to load a python file; I wrote the command: load("/Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py") which produces: SyntaxError: Non-ASCII character '\xce' in file /Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details I am unable to find the offending character in the file. In fact I deleted the first 20 lines of the file (it contains only variable definitions) and I still get the same error pointing to "line 2". I have used the load command successfully in the past with a different python file. Running sage 4.7.2 on an iMac with OS X 10.6.8 Thanks in advance for any insights. Jim Clark -- 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 URL: http://www.sagemath.org
[sage-support] Re: Syntax error attempting to load a python file
On Jan 20, 4:30 pm, Jim Clark wrote: > Could anyone shed light on what is happening here? > > In a sage notebook cell I wish to load a python file; I wrote the command: > > load("/Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py") > > which produces: > > SyntaxError: Non-ASCII character '\xce' in file > /Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py on If you type the following in a notebook cell: -- %sh xxd -g1 /Users/jim/Documents/Fluid_Mechanics/AA543_HW2/ physical_constants.py | head -- you'll see all first few bytes in your file. It should be pretty straightforward to spot the "ce" from that. (xxd is simply a hexdump command for unix. You don't have to do this in the notebook. In a terminal it would work equally well. Leave out the " | head " if you want to see the entire file) -- 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 URL: http://www.sagemath.org
Re: [sage-support] Order of a cyclic group
Well the way I first tried is as follows: age: F.=GF(2)[] sage: G.=F.quotient(x^6 + x^4 + x^2 + x + 1) sage: a.multiplicative_order() --- NotImplementedError Traceback (most recent call last) But it gives a not implemented error. Luckily the following does work: sage: G.=GF(2^6,modulus=x^6 + x^4 + x^2 + x + 1) sage: a.multiplicative_order() 21 -- 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 URL: http://www.sagemath.org
Re: [sage-support] Re: Problem with sagetex with a large file (many sage calculations)
On Fri, 20 Jan 2012 at 10:51AM -0800, Steven McKay wrote: > That's the problem. It only seems to happen when I run desolve_odeint > several times. The later runs seem to choke. Note that sage does > *not* choke on any later sage calculations other than desolve. > So, I don't really have a minimal example. I will try to see if I can > come up with one, but it might not be that small. Do you want me to > send it to you directly? I spent some time yesterday afternoon, and it does seem like multiple calls to one of the DE solvers is the problem. But I don't know much more than that right now. Dan -- --- Dan Drake - http://mathsci.kaist.ac.kr/~drake --- signature.asc Description: Digital signature
[sage-support] Fwd: sagemath question re: implicit differentiation
Forwarded to sage-support. -- Forwarded message -- From: storne...@mathisasport.com Date: Fri, Jan 20, 2012 at 9:52 PM Subject: sagemath question re: implicit differentiation To: wdjoy...@gmail.com I apologize in advance if this is the wrong way to reach you, but at the bottom of this thread on implicit differentiation in sage: http://www.mail-archive.com/sage-support@googlegroups.com/msg04520.html it says reply via email to david joyner. Again, I'm new to the sage community, so perhaps this is the wrong way to ask the followup question, but here goes: I follow your comment, where you instruct the person on how to differentiate. As you know, however, in an implicit differentiation problem often we then went to solve for dy/dx. so, for example, I have this: sage: f = function('f',x) sage: f f(x) sage: equation2 = x*f + 2*f^2 == 1 sage: equation2.diff() x*D[0](f)(x) + 4*f(x)*D[0](f)(x) + f(x) == 0 That's fine, but now I want to solve for dy/dx, so I try: sage: solve(equation2.diff(),diff(f(x),x,1)) /home/stornetta/sage-4.7.2/local/lib/python2.6/site-packages/IPython/iplib.py:2260: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...) exec code_obj in self.user_global_ns, self.user_ns [D[0](f)(x) == -f(x)/(x + 4*f(x))] as you can see, I do get an answer, but the interpreter indicates my approach is deprecated, and I'm not clear on how one would use named arguments in this situation to achieve the same result. Any advice would be welcome, or if their is a forum that I should post to instead, again I apologize for troubling you directly, if you could just give me a pointer for where to post. -- W. Scott Stornetta, Ph.D. 973.944.0410 -- 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 URL: http://www.sagemath.org
Re: [sage-support] Fwd: sagemath question re: implicit differentiation
-- Forwarded message -- From: storne...@mathisasport.com That's fine, but now I want to solve for dy/dx, so I try: sage: solve(equation2.diff(),diff(f(x),x,1)) /home/stornetta/sage-4.7.2/local/lib/python2.6/site-packages/IPython/iplib.py:2260: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...) exec code_obj in self.user_global_ns, self.user_ns [D[0](f)(x) == -f(x)/(x + 4*f(x))] as you can see, I do get an answer, but the interpreter indicates my approach is deprecated, and I'm not clear on how one would use named arguments in this situation to achieve the same result. f here is a symbolic function taking one argument (forget for a second that the argument is called 'x'). f(x) means f evaluated at x, which of course is... f(x), whatever that is. What I'm trying to get at here is that f(x) isn't the function, f is. You can try: f = function('f',x) sage: y = var('y') sage: f(y) f(y) the call f(y) just substitutes 'y' for 'x' in the definition of f, even though we don't really have one, we just refer to it by name, f. It's the same as f(x = y). Thus, your call to f(x) up there makes an unnecessary substitution -- it's equivalent to f(x = x). In fact, to avoid the warning, f(x = x) is what you would do. Of course, it's better to just pass in f and not evaluate it: sage: f = function('f',x) sage: equation2 = x*f + 2*f^2 == 1 sage: solve(equation2.diff(),diff(f,x,1)) [D[0](f)(x) == -f(x)/(x + 4*f(x))] -- 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 URL: http://www.sagemath.org
[sage-support] Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
I am proxying my Django app behind Apache. I created a 404.html in my template directory but when I try to test it I get the following error that appears to come from Apache... Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.2.16 (Ubuntu) Server at phil4.com Port 80 Here is the relevant Apache settings... NameVirtualHost 72.14.188.15:80 NameVirtualHost 72.14.188.15:443 WSGIRestrictEmbedded On # = ServerName phil4.com ServerAlias www.phil4.com DocumentRoot/var/www Options Indexes FollowSymLinks # = WSGIProcessGroupphil4.com WSGIScriptAlias / /etc/apache2/wsgi/phil4.com.wsgi WSGIDaemonProcess phil4.com user=seb group=seb threads=25 # = Order Allow,Deny Allow from All # = Alias /favicon.ico /var/www/static/images/favicon.ico Alias /base.css/var/www/static/base.css Alias /static /var/www/static Alias /public /var/www/static/public Alias /misc/var/www/static/misc Alias /images /var/www/static/images Alias /books/ /var/www/static/books/ Alias /homework/ /var/www/static/homework/ Alias /exams/ /var/www/static/exams/ # = Redirect /sign_in https://phil4.com/sign_in Redirect /register https://phil4.com/register # = -- 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 URL: http://www.sagemath.org
Re: [sage-support] Re: Syntax error attempting to load a python file
On Jan 20, 2012, at 5:05 PM, Nils Bruin wrote: > On Jan 20, 4:30 pm, Jim Clark wrote: >> Could anyone shed light on what is happening here? >> >> In a sage notebook cell I wish to load a python file; I wrote the command: >> >> load("/Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py") >> >> which produces: >> >> SyntaxError: Non-ASCII character '\xce' in file >> /Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py on > > If you type the following in a notebook cell: > -- > %sh > xxd -g1 /Users/jim/Documents/Fluid_Mechanics/AA543_HW2/ > physical_constants.py | head > -- > you'll see all first few bytes in your file. It should be pretty > straightforward to spot the "ce" from that. > Thank you, Nils, that revealed the problem. The file in the path was an alias, created in Finder, and OS X added the link info at the beginning of the file. I replaced the OS X alias with a Unix symbolic link, and now I can load the file. again, thanks, Jim -- 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 URL: http://www.sagemath.org