#13242: Determine if an edge in a graph is a cut-edge (bridge)
------------------------------------------------+---------------------------
Reporter: lkeough | Owner: jason,
ncohen, rlm
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.3
Component: graph theory | Resolution:
Keywords: days40 | Work issues:
Report Upstream: N/A | Reviewers: David Coudert
Authors: Jeremy Martin, Lauren Keough | Merged in:
Dependencies: | Stopgaps:
------------------------------------------------+---------------------------
Comment (by lkeough):
I need connected_components_number since an edge is a cut-edge if it
increases the number of connected components. So you may be trying to
figure out if an edge in an already disconnected graph is a cut edge. I
used this:
{{{
if self.is_directed():
H = self.copy()
H.delete_edge(u,v,label)
sol = self.connected_components_number() ==
H.connected_components_number()
return not sol
}}}
I ran tests and built the documentation and it looks fine. I'm going to
upload a new patch, but I'm willing to change it if this is a terrible
algorithm.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13242#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.