[sage-support] Strange results in DiGraph.girth()
Got results with DiGraph.girth() which appear inconsistent to me. girth() returns 3 and powers of the adjacency matrix suggest there are no directed triangle cycles and couldn't s see a directed triangle cycle on the plot of the digraph. sage: GR=DiGraph('FWE@_WF@o?');M=GR.adjacency_matrix() sage: GR.girth() 3 sage: (M^3).trace() 0 sage: GR Digraph on 7 vertices -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Strange results in DiGraph.girth()
On 10/27/2012 08:34 PM, Georgi Guninski wrote: Got results with DiGraph.girth() which appear inconsistent to me. girth() returns 3 and powers of the adjacency matrix suggest there are no directed triangle cycles and couldn't s see a directed triangle cycle on the plot of the digraph. sage: GR=DiGraph('FWE@_WF@o?');M=GR.adjacency_matrix() sage: GR.girth() 3 sage: (M^3).trace() 0 sage: GR Digraph on 7 vertices Well, the documentation says Computes the girth of the graph. For directed graphs, computes the girth of the undirected graph. So, that's what you are getting. :) -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
Re: [sage-support] Re: Unable to Solve Simple Problem
Please, could you explain more what is the problem. According to my understand. b and c are two parameters and you want to solve for d. and you try to use grobner basis, but what I know grobner basis for polynomial and this is not polynomial because the square root. So , you can write d=y^2, y^2==b*y+c if d is real. And if d is complex, d=-y^2, -y^2==i*b*y+c. On 26 October 2012 12:42, Jan derwurzel...@gmail.com wrote: I have a similar problem I can't solve d==b*sqrt(d)+c for d. All suggestions (to_poly_solve, use_grobner) did not work. Thanks, Jan -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en. -- Doaa Mostafa Ali Elsakout PhD student at Heriot-Watt University Institute of Petroleum Engineering *Phone:* +44 (0) 131 451 3563 Mobile +44 (0) 7450722558 *Email:* doaa.elsak...@pet.hw.ac.uk *Address:* - Energy Academy 1.14, Heriot-Watt University, Edinburgh EH14 4AS -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Unable to Solve Simple Problem
On 2012-10-26, Jan derwurzel...@gmail.com wrote: I have a similar problem I can't solve d==b*sqrt(d)+c for d. All suggestions (to_poly_solve, use_grobner) did not work. For the record, here's what I get with Maxima 5.28.0. I think to_poly_solve has been updated in the not so distant past so maybe Sage is using an older version? (%i2) load (to_poly_solve); (%i3) to_poly_solve (d = b * sqrt(d) + c, d); (%o3) %union(%if(?%and(-%pi/2 parg(b-sqrt(4*c+b^2)), parg(b-sqrt(4*c+b^2)) = %pi/2), [d = -(b*sqrt(4*c+b^2)-2*c-b^2)/2],%union()), %if(?%and(-%pi/2 parg(sqrt(4*c+b^2)+b), parg(sqrt(4*c+b^2)+b) = %pi/2), [d = (b*sqrt(4*c+b^2)+2*c+b^2)/2],%union())) I didn't check the result; sorry about that. best Robert Dodier -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Unable to Solve Simple Problem
On 2012-10-27, Robert Dodier robert.dod...@gmail.com wrote: On 2012-10-26, Jan derwurzel...@gmail.com wrote: I have a similar problem I can't solve d==b*sqrt(d)+c for d. All suggestions (to_poly_solve, use_grobner) did not work. For the record, here's what I get with Maxima 5.28.0. I think to_poly_solve has been updated in the not so distant past so maybe Sage is using an older version? it does; it's still 5.26.0 -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] composition in power series ring
Hi! I found the following issue: sage: R.u,v,t,T=PowerSeriesRing(QQ) sage: f=u+O(u,v,t,T)^200 sage: g=f-u sage: g(u^4,v^4,t^4,T^4) --- AttributeErrorTraceback (most recent call last) /home/tincho/ipython console in module() /home/tincho/sage-5.3/local/lib/python2.7/site-packages/sage/rings/multi_power_series_ring_element.py in __call__(self, *x, **kwds) 470 else: 471 newprec = self.prec()*min(valn_list) -- 472 return self._value().subs(sub_dict).add_bigoh(newprec) 473 474 def _subs_formal(self,*x,**kwds): /home/tincho/sage-5.3/local/lib/python2.7/site-packages/sage/structure/element.so in sage.structure.element.Element.__getattr__ (sage/structure/element.c:3475)() /home/tincho/sage-5.3/local/lib/python2.7/site-packages/sage/structure/misc.so in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1509)() AttributeError: 'sage.rings.rational.Rational' object has no attribute 'add_bigoh' sage: it seems that g = 0 + O(u, v, t, T)^200 cannot be composed with the 4th powers because of the constant remainder it popped out in a big loop involving sums of power series and some of those terms were of the shape g = 0 + O(u, v, t, T)^200 I think it'll be nice that sage treat g = 0 + O(u, v, t, T)^200 any other power series in R kind regards tincho -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.