#13990: Bug fix and small improvement of spanning_trees_count
--------------------------------+-------------------------------------------
Reporter: azi | Owner: jason, ncohen, rlm
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.7
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
--------------------------------+-------------------------------------------
Comment (by azi):
Damn. I haven't seen your comment..
A tree is a connected graph with n vertices and n-1 edges. There is no
subgraph of the empty graph having $-1$ edges and $0$ vertices hence there
is no spanning tree of the empty graph. I have also tested the function in
Mathematica which returns 0 as expected.
As for abs(). The matrix tree theorem states the following. Let L_{i,j} be
the Laplacian matrix of a graph G from which we remove the i'th column and
j'th row. Then the number of spanning trees is (-1)^{i+j}det(L_{i,j})
hence for i=j the expression simplifies to simply computing det(L_{i,j})
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13990#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.