Ask Your Question
1

Bug in Graph.girth in 4.7.2 ?

asked 2012-01-19 23:50:42 -0600

joro gravatar image

updated 2015-01-18 11:14:23 -0600

FrédéricC gravatar image

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.

edit retag flag offensive close merge delete

Comments

I copied your code and Sage 4.6 returns 3.

G-Sage gravatar imageG-Sage ( 2012-01-21 15:04:14 -0600 )edit

3 answers

Sort by » oldest newest most voted
2

answered 2012-01-24 23:30:09 -0600

Nathann gravatar image

This bug is now patch http://trac.sagemath.org/sage_trac/ti... !

It was a funny one. I wish there was a GOTO statement in Python ;-)

Nathann

edit flag offensive delete link more
1

answered 2012-01-24 22:45:59 -0600

Nathann gravatar image

Well, 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

edit flag offensive delete link more
0

answered 2012-01-24 23:05:06 -0600

Nathann gravatar image

Ahahaah. Ok, I see... Funny bug. I will post a patch soon :-)

Nathann

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-01-19 23:50:42 -0600

Seen: 186 times

Last updated: Jan 24 '12