#13503: Enhancement of `is_triangle_free' addition of `triangles_count' and a 
minor
change in `spanning_trees_count'
----------------------------------------------------------+-----------------
       Reporter:  azi                                     |         Owner:  
jason, ncohen, rlm
           Type:  enhancement                             |        Status:  
needs_work        
       Priority:  minor                                   |     Milestone:  
sage-5.4          
      Component:  graph theory                            |    Resolution:      
              
       Keywords:  triangles, graphs, number of triangles  |   Work issues:      
              
Report Upstream:  N/A                                     |     Reviewers:      
              
        Authors:  Jernej Azarija, David Coudert           |     Merged in:      
              
   Dependencies:                                          |      Stopgaps:      
              
----------------------------------------------------------+-----------------
Changes (by ncohen):

  * status:  needs_review => needs_work


Comment:

 Hellooooooooo David !!

 First, you do not know how glad I am to hear things like "the difficulty
 with graph algorithms is that the efficiency depends on the data
 structure" from the mouth of researchers. "Adjacency test ? O(1) !" is
 their usual answer. `:-D`

 I have been thinking of reimplementing another version using FastGraph,
 but that would be more trouble than necessary for the moment. And I could
 actually use the same technique to reimplement SubgraphSearch a bit better
 anyway, so I guess I will go there directly.

 About the patch :

     * Where did you find that this "abs" was not needed ? I thought it was
 `O_o`
     * I'm not a big fan of having triangle_count in generic_graph, as I
 don't really see it used with DiGraphs... And the code reflects that
 indeed, but if you think they can, then why not ? Could you at least say
 that not all algorithms are available for Digraphs, and that the method
 looks for "directed C3" in this case, or something similar ? And in
 particular not C3 in the underlying graph.
     * "tests if the trace of the adjacency matrix is positive" would be
 counting the number of loops `:-D` Btw I guess it would be better to have
 "``return (A * * 3 ).trace() == 0``" instead of "``return (A*A*A).trace()
 == 0``", just in case they might implement some smart thing for powers of
 binary matrices eventually... The logarithmic power method changes nothing
 for `k=3` `:-)`

 Thanks for that patch !!

 nathann

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