Values
([],1) => 0
([],2) => 1
([(0,1)],2) => 1
([],3) => 0
([(1,2)],3) => 1
([(0,2),(1,2)],3) => 2
([(0,1),(0,2),(1,2)],3) => 3
([],4) => 0
([(2,3)],4) => 0
([(1,3),(2,3)],4) => 1
([(0,3),(1,3),(2,3)],4) => 3
([(0,3),(1,2)],4) => 1
([(0,3),(1,2),(2,3)],4) => 3
([(1,2),(1,3),(2,3)],4) => 3
([(0,3),(1,2),(1,3),(2,3)],4) => 6
([(0,2),(0,3),(1,2),(1,3)],4) => 6
([(0,2),(0,3),(1,2),(1,3),(2,3)],4) => 10
([(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)],4) => 15
([],5) => 0
([(3,4)],5) => 0
([(2,4),(3,4)],5) => 0
([(1,4),(2,4),(3,4)],5) => 1
([(0,4),(1,4),(2,4),(3,4)],5) => 4
([(1,4),(2,3)],5) => 0
([(1,4),(2,3),(3,4)],5) => 1
([(0,1),(2,4),(3,4)],5) => 1
([(2,3),(2,4),(3,4)],5) => 0
([(0,4),(1,4),(2,3),(3,4)],5) => 4
([(1,4),(2,3),(2,4),(3,4)],5) => 3
([(0,4),(1,4),(2,3),(2,4),(3,4)],5) => 9
([(1,3),(1,4),(2,3),(2,4)],5) => 4
([(0,4),(1,2),(1,3),(2,4),(3,4)],5) => 10
([(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 8
([(0,4),(1,3),(2,3),(2,4),(3,4)],5) => 9
([(0,4),(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 18
([(0,3),(0,4),(1,3),(1,4),(2,3),(2,4)],5) => 20
([(0,3),(0,4),(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 32
([(0,4),(1,3),(2,3),(2,4)],5) => 4
([(0,1),(2,3),(2,4),(3,4)],5) => 3
([(0,3),(1,2),(1,4),(2,4),(3,4)],5) => 9
([(0,3),(0,4),(1,2),(1,4),(2,4),(3,4)],5) => 18
([(0,3),(0,4),(1,2),(1,4),(2,3)],5) => 10
([(0,1),(0,4),(1,3),(2,3),(2,4),(3,4)],5) => 19
([(0,3),(0,4),(1,2),(1,4),(2,3),(2,4),(3,4)],5) => 32
([(0,4),(1,2),(1,3),(2,3),(2,4),(3,4)],5) => 18
([(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 16
([(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 31
([(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 51
([(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4)],5) => 33
([(0,2),(0,3),(0,4),(1,2),(1,3),(1,4),(2,4),(3,4)],5) => 52
([(0,2),(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 77
([(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5) => 110
([],6) => 0
([(4,5)],6) => 0
([(3,5),(4,5)],6) => 0
([(2,5),(3,5),(4,5)],6) => 0
([(1,5),(2,5),(3,5),(4,5)],6) => 1
([(0,5),(1,5),(2,5),(3,5),(4,5)],6) => 5
([(2,5),(3,4)],6) => 0
([(2,5),(3,4),(4,5)],6) => 0
([(1,2),(3,5),(4,5)],6) => 0
([(3,4),(3,5),(4,5)],6) => 0
([(1,5),(2,5),(3,4),(4,5)],6) => 1
([(0,1),(2,5),(3,5),(4,5)],6) => 1
([(2,5),(3,4),(3,5),(4,5)],6) => 0
([(0,5),(1,5),(2,5),(3,4),(4,5)],6) => 5
([(1,5),(2,5),(3,4),(3,5),(4,5)],6) => 3
([(0,5),(1,5),(2,5),(3,4),(3,5),(4,5)],6) => 12
([(2,4),(2,5),(3,4),(3,5)],6) => 0
([(0,5),(1,5),(2,4),(3,4)],6) => 1
([(1,5),(2,3),(2,4),(3,5),(4,5)],6) => 4
([(0,5),(1,5),(2,3),(3,4),(4,5)],6) => 5
([(2,4),(2,5),(3,4),(3,5),(4,5)],6) => 0
([(1,5),(2,4),(3,4),(3,5),(4,5)],6) => 3
([(0,5),(1,5),(2,4),(3,4),(4,5)],6) => 5
([(0,5),(1,5),(2,3),(2,4),(3,5),(4,5)],6) => 14
([(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6) => 8
([(0,5),(1,5),(2,4),(3,4),(3,5),(4,5)],6) => 12
([(0,5),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6) => 26
([(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6) => 12
([(0,5),(1,4),(2,4),(2,5),(3,4),(3,5)],6) => 14
([(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6) => 32
([(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6) => 20
([(0,5),(1,4),(2,4),(2,5),(3,4),(3,5),(4,5)],6) => 26
([(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6) => 52
([(0,4),(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6) => 64
([(0,4),(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6) => 96
([(0,5),(1,4),(2,3)],6) => 0
([(1,5),(2,4),(3,4),(3,5)],6) => 1
([(0,1),(2,5),(3,4),(4,5)],6) => 1
([(1,2),(3,4),(3,5),(4,5)],6) => 0
([(0,5),(1,4),(2,3),(3,5),(4,5)],6) => 5
([(1,4),(2,3),(2,5),(3,5),(4,5)],6) => 3
([(0,1),(2,5),(3,4),(3,5),(4,5)],6) => 3
([(0,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6) => 12
([(1,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6) => 9
([(0,5),(1,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6) => 27
([(1,4),(1,5),(2,3),(2,5),(3,4)],6) => 5
([(0,5),(1,4),(2,3),(2,4),(3,5),(4,5)],6) => 14
([(1,2),(1,5),(2,4),(3,4),(3,5),(4,5)],6) => 11
([(0,5),(1,2),(1,4),(2,3),(3,5),(4,5)],6) => 15
>>> Load all 208 entries. <<<
search for individual values
searching the database for the individual values of this statistic
/
search for generating function
searching the database for statistics with the same generating function
Description
The number of two-component spanning forests of a graph.
A spanning subgraph is a subgraph which contains all vertices of the ambient graph. A forest is a graph which contains no cycles, and has any number of connected components. A two-component spanning forest is a spanning subgraph which contains no cycles and has two connected components.
A spanning subgraph is a subgraph which contains all vertices of the ambient graph. A forest is a graph which contains no cycles, and has any number of connected components. A two-component spanning forest is a spanning subgraph which contains no cycles and has two connected components.
References
[1] Kassel, A., Kenyon, R., Wu, W. Random two-component spanning forests MathSciNet:3414453 zbMATH:1334.82011 DOI:10.1214/14-AIHP625 arXiv:1203.4858
[2] Number of forests with two connected components in the complete graph K_n. OEIS:A083483
[3] Number a(n) of forests with two components in the complete bipartite graph K_n,n. OEIS:A100070
[2] Number of forests with two connected components in the complete graph K_n. OEIS:A083483
[3] Number a(n) of forests with two components in the complete bipartite graph K_n,n. OEIS:A100070
Code
def statistic(g):
n = len(g.vertices())
L = g.kirchhoff_matrix()
# reduced Laplacian matrix
Lred = L[:n-1,:n-1]
a = 0
for i in range(n-1):
skip_i = [j for j in range(n-1) if j != i]
# add number of forests rooted at i and n-1
a += Lred[skip_i,skip_i].det()
for (i,j,_) in g.edges():
if i != n-1 and j != n-1 and i != j:
skip_ij = [k for k in range(n-1) if k != i and k != j]
# subtract number of forests rooted at e+, e-, and n-1
a -= Lred[skip_ij, skip_ij].det()
return a
Created
Jul 26, 2022 at 11:37 by Harry Richman
Updated
Jul 26, 2022 at 11:37 by Harry Richman
searching the database
Sorry, this statistic was not found in the database
or
add this statistic to the database – it's very simple and we need your support!