#5932: graphs.RandomRegular(3,10) often returns a graph on 0 vertices
--------------------------+-------------------------------------------------
Reporter: was | Owner: rlm
Type: defect | Status: new
Priority: major | Milestone: sage-4.0
Component: graph theory | Keywords:
--------------------------+-------------------------------------------------
The docstring for graphs.RandomRegular says
{{{
Returns a random d-regular graph on n vertices, or returns False on
failure.
}}}
However, try calling it a few times with input 3,10 and with probability
about 25% you'll get back an empty graph!:
{{{
sage: graphs.RandomRegular(3,10)
Graph on 0 vertices
sage: [len(graphs.RandomRegular(3,10)) for _ in range(1000)].count(0)
232
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5932>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---