Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Connectedness of directed graphs #1088

Closed
simonschoelly opened this issue Dec 23, 2018 · 6 comments
Closed

Connectedness of directed graphs #1088

simonschoelly opened this issue Dec 23, 2018 · 6 comments
Labels
wontfix known (and usually documented) limitation; no remediation necessary

Comments

@simonschoelly
Copy link
Contributor

Currently is_connected(g) is equivalent to is_weakly_connected(g) if g is a digraph. The English Wikipedia on the other hand says, that for a digraph, g is connected if for every pair of vertices (u, v) there is either a path from uto v or one from v to u.
To make stuff more complicated, I can't find that definition anywhere else in the literature. But apparanently this concept is called semi-connected in a lot of places (for example also in Networkx).
I would therefore propose to add a deprecation warning to is_connected for digraphs and also to implement a function is_semi_connected for digraphs.

Related issue: #368

@sbromberger
Copy link
Owner

There was a lot of discussion around this after #368. Paging @jpfairbanks.

@stale
Copy link

stale bot commented Feb 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix known (and usually documented) limitation; no remediation necessary label Feb 21, 2019
@simonschoelly
Copy link
Contributor Author

Can we revive this?

@stale stale bot removed the wontfix known (and usually documented) limitation; no remediation necessary label Feb 24, 2019
@sbromberger
Copy link
Owner

Sure. But I think this does what you want: is_weakly_connected is exactly

g is connected if for every pair of vertices (u, v) there is either a path from u to v or one from v to u.

So having is_connected(g::::DiGraph) equal is_weakly_connected(g) adheres to the Wikipedia definition. What am I misunderstanding?

@simonschoelly
Copy link
Contributor Author

In the digraph

u <-- v --> w

there is no path from u to w or from w to u, but the graph is still weakly connected.

@stale
Copy link

stale bot commented May 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix known (and usually documented) limitation; no remediation necessary label May 5, 2019
@stale stale bot closed this as completed May 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix known (and usually documented) limitation; no remediation necessary
Projects
None yet
Development

No branches or pull requests

2 participants