How to find the graphs from the following collection whose adjacency spectral radius is maximum?
.
for g in graphs.nauty_geng("8 -c"):
if g.size()==10:
A=g.adjacency_matrix().eigenvalues()
A.sort()
g.show()
show(A)
I am trying to find those connected graph(s) having $8$ vertex and $10$ edges, having the highest eigenvalue among all the eigenvalues of the corresponding adjacency matrix of the graph. Bsically I am trying to find the graphs on $8$ vertices and having $10$ edges whose adjacency spectral radius is maximum among all the connected graphs on $8$ vertices and having $10$ edges.
You don't need testing
if g.size()==10
as you can provide the required number of edges directly tographs.nauty_geng()
- like