ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 24 Jan 2012 23:30:09 -0600Bug in Graph.girth in 4.7.2 ?http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/sage 4.7.2 incorrectly gives girth of 4 on this graph:
sage: H=Graph([(0, 1), (0, 3), (0, 4), (0, 5), (1, 2), (1, 3), (1, 4), (1, 6), (2, 5), (3, 4), (5, 6)])
sage: H.girth()
4
There is a cycle (0,1,3) and sage 4.3 and magma correctly return 3.Thu, 19 Jan 2012 23:50:42 -0600http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/Comment by G-Sage for <p>sage 4.7.2 incorrectly gives girth of 4 on this graph:</p>
<pre><code>sage: H=Graph([(0, 1), (0, 3), (0, 4), (0, 5), (1, 2), (1, 3), (1, 4), (1, 6), (2, 5), (3, 4), (5, 6)])
sage: H.girth()
4
</code></pre>
<p>There is a cycle (0,1,3) and sage 4.3 and magma correctly return 3.</p>
http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?comment=20464#post-id-20464I copied your code and Sage 4.6 returns 3.Sat, 21 Jan 2012 15:04:14 -0600http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?comment=20464#post-id-20464Answer by Nathann for <p>sage 4.7.2 incorrectly gives girth of 4 on this graph:</p>
<pre><code>sage: H=Graph([(0, 1), (0, 3), (0, 4), (0, 5), (1, 2), (1, 3), (1, 4), (1, 6), (2, 5), (3, 4), (5, 6)])
sage: H.girth()
4
</code></pre>
<p>There is a cycle (0,1,3) and sage 4.3 and magma correctly return 3.</p>
http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?answer=13189#post-id-13189Ahahaah. Ok, I see... Funny bug. I will post a patch soon :-)
NathannTue, 24 Jan 2012 23:05:06 -0600http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?answer=13189#post-id-13189Answer by Nathann for <p>sage 4.7.2 incorrectly gives girth of 4 on this graph:</p>
<pre><code>sage: H=Graph([(0, 1), (0, 3), (0, 4), (0, 5), (1, 2), (1, 3), (1, 4), (1, 6), (2, 5), (3, 4), (5, 6)])
sage: H.girth()
4
</code></pre>
<p>There is a cycle (0,1,3) and sage 4.3 and magma correctly return 3.</p>
http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?answer=13190#post-id-13190This bug is now patch http://trac.sagemath.org/sage_trac/ticket/12355 !
It was a funny one. I wish there was a GOTO statement in Python ;-)
NathannTue, 24 Jan 2012 23:30:09 -0600http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?answer=13190#post-id-13190Answer by Nathann for <p>sage 4.7.2 incorrectly gives girth of 4 on this graph:</p>
<pre><code>sage: H=Graph([(0, 1), (0, 3), (0, 4), (0, 5), (1, 2), (1, 3), (1, 4), (1, 6), (2, 5), (3, 4), (5, 6)])
sage: H.girth()
4
</code></pre>
<p>There is a cycle (0,1,3) and sage 4.3 and magma correctly return 3.</p>
http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?answer=13188#post-id-13188Well, here's what sage-5.0-beta1 has to say on the instance :-p
sage: H=Graph([(0, 1), (0, 3), (0, 4), (0, 5), (1, 2), (1, 3), (1, 4), (1, 6), (2, 5), (3, 4), (5, 6)])
sage: H.girth()
4
sage: H.is_triangle_free()
False
It should notice it is saying something stupid, only it does not. Sage is not a very bright student :-p
Tue, 24 Jan 2012 22:45:59 -0600http://ask.sagemath.org/question/8076/bug-in-graphgirth-in-472/?answer=13188#post-id-13188