Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 i1,2,3,,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,,10) is 1.

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 i1,2,3,,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,,10) is 1.

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

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 i1,2,3,,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,,10) is 1.1 or equivalently rank of A(i) (for each i=1,2,3,,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

click to hide/show revision 4
None

updated 0 years ago

Max Alekseyev gravatar image

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 i1,2,3,,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,,10) is 1 or equivalently rank of A(i) (for each i=1,2,3,,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