ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 28 Aug 2018 05:23:37 +0200Pairs of graphs with same spectral radius but with different diameter and different number of edgeshttps://ask.sagemath.org/question/41990/pairs-of-graphs-with-same-spectral-radius-but-with-different-diameter-and-different-number-of-edges/ I know that graphs.cospectral_graphs() gives all pairs of graphs with same eigenvalues. But I need graphs with same spectral radius i.e. largest eigenvalue (the other eigenvalues may be different) and differing in diameter and number of edges.
What to do for this? Thank you in advance.Deepak SarmaThu, 12 Apr 2018 07:47:21 +0200https://ask.sagemath.org/question/41990/Why can't I find the spectral radius of a tree?https://ask.sagemath.org/question/43496/why-cant-i-find-the-spectral-radius-of-a-tree/ If I create some connected graphs, and ask SageMath for their spectral radius, the command never returns (well, I have only let it run for a few minutes) if the target is a tree.
Here is a simple example:
g = graphs.CompleteBipartiteGraph(1,3)
print g.spectrum()
print g.spectral_radius()
The only advertised requirement for the target is that it be strongly connected, but as it is a connected graph, this should automatically be satisfied.
Yes, I can work around by computing the spectrum and taking the biggest, but I'd still like to know why this does not work.GordonTue, 28 Aug 2018 05:23:37 +0200https://ask.sagemath.org/question/43496/