Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why can't 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.