Consider the class of simple connected bicyclic graphs on $10$ vertices. Let $A$ be the adjacency matrix of any such graph.
Consider the class of simple connected bicyclic graphs on $10$ vertices. Let $A$ be the adjacency matrix of any such graph. Let $A(i)$ for $i\in{1,2,3,\ldots, 10}$ denote the principal submatrix of $A$, obtained by deleting the $i$-th row and $i$-th column of $A$. Now how to find those graphs from the collection for which nullity of $A(i)$ (for each $i=1,2,3,\ldots, 10$) is $1$.$1$ or equivalently rank of $A(i)$ (for each $i=1,2,3,\ldots, 10$) is $8$.
My attempt:
def principal_submatrix(m, s, sort=False):
if sort:
s = sorted(s)
return m[s, s]
def principal_submatrices(m, k):
S = Subsets(range(m.ncols()), k)
return [principal_submatrix(m, s, sort=True) for s in S]
for g in graphs.nauty_geng("10 -c"):
if g.size() == 11:
A=g.adjacency_matrix()
From this point, can any body please help me to complete the final code