#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 dcoudert):

 Another option is:
 {{{
     self.delete_edge(u,v,label)
     if self.is_directed():
         ans = self.is_connected()
     else:
         ans = self.distance(u,v) < self.order()
     self.add_edge(u,v,label)
     return not ans
 }}}

 the self.is_connected() function would be sufficient, but the distance
 function is faster for undirected graphs.

 Don't forget to explain the behavior for directed graphs in the
 description of the function.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13242#comment:19>
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.

Reply via email to