Ask Your Question

zrathustra's profile - activity

2015-01-12 02:37:44 +0200 received badge  Scholar (source)
2015-01-12 02:37:36 +0200 commented answer digraph.diameter() returning +Infinity for some cases

You're right, I was confusing some definitions about connectivity - though it didn't help that G.is_connected() returns True. I can implement my intended functionality using something along the lines of max(filter(lambda x: x != Infinity, G.eccentricity())).

2015-01-11 23:14:19 +0200 asked a question digraph.diameter() returning +Infinity for some cases

I'm running Sage 6.4.1 on OS X (Yosemite). Creating a directed graph with n vertices (for any n that I tried) returned +Infinity. EG:

sage: digraphs.Path(10).diameter()
+Infinity

or even

sage: digraphs.ButterflyGraph(5).diameter()
+Infinity

However, both of these Path and Butterfly graphs are finite, connected, directed acyclic graphs so their diameter should always be finite.