ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 27 Aug 2018 22:23:37 -0500Why can't I find the spectral radius of a tree?http://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.GordonMon, 27 Aug 2018 22:23:37 -0500http://ask.sagemath.org/question/43496/NetworkX - create a Graphhttp://ask.sagemath.org/question/10514/networkx-create-a-graph/Hi experts!
I wanna use
networkx.has_path(G)
where G is the graph associated to de adjacency matrix M (a N x N numpy array) of a undirected graph.
How can I create a networkx graph (necesary for use networkx.has_path()) from M?
Thanks a lot!mresimulatorThu, 05 Sep 2013 13:11:59 -0500http://ask.sagemath.org/question/10514/