Why I cannot see the graph? Example:
g = RandomGraph[BarabasiAlbertGraphDistribution[100000, 1]]
No further analysis of g can be done. Why?
Why I cannot see the graph?
Because it is too big. Plotting it would take a long time, thus automatic plotting would be counter-productive. You can still request plotting manually through GraphPlot
.
This is the usual way to deal with this situation, not to increase the size limits for automatic plotting. If you do that, you'll eventually find your Mathematica session locked up for a few minutes just because you forgot to suppress output with ;
.
GraphPlot[]
, of about 100K nodes.
$\endgroup$
Commented
Apr 4, 2022 at 14:56
This works in Mathematica 12.3. It took about 1-2 mins.
Clear["Global`*"]
SetSystemOptions[
"GraphOptions" -> {"EdgeCountThreshold" -> 200000,
"VertexCountThreshold" -> 150000}];
g = RandomGraph[BarabasiAlbertGraphDistribution[100000, 1]]
GraphRadius[g]
and they abort.ConnectedComponents
crashed my kernel too. $\endgroup$$Aborted[]
, I'm not sure, but as I recall, many of the shortest path based functions in Mathematica calculated the entire distance matrix before doing anything with the distances. THis is quite unnecessary (and I would consider it a bug). I suspect this is in play here: it cannot allocate a 100000 by 100000 matrix, so it stops. But it shouldn't even try to allocate that matrix. $\endgroup$