Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add k-Components Algorithm for Directed Graphs #7106

Open
henryxu1997 opened this issue Nov 9, 2023 · 3 comments
Open

Add k-Components Algorithm for Directed Graphs #7106

henryxu1997 opened this issue Nov 9, 2023 · 3 comments

Comments

@henryxu1997
Copy link

I would like to propose an extension of the k-components algorithm currently implemented in NetworkX for undirected graphs to also work with directed graphs. This extension would be based on the concepts introduced in the paper titled "Paths and Semipaths: Reconceptualizing Structural Cohesion in Terms of Directed Relations" (https://www.jstor.org/stable/40376146)).

The current implementation of the k_components function in NetworkX only supports undirected graphs, as it uses the Moody and White algorithm which is designed for undirected graphs. However, there is a conceptual framework for considering k-components in directed graphs that could potentially be beneficial for analyses where directionality plays a key role, such as social network analysis, citation networks, etc.

The objective is to develop and integrate an algorithm into NetworkX that can identify k-components in a directed graph by adapting the definitions and methodologies from the referenced paper.

@henryxu1997
Copy link
Author

I would love to contribute and implement this feature, so I am writing a comment here to claim this feature if it's deemed useful.

@aaronzo
Copy link
Contributor

aaronzo commented Mar 3, 2024

I think this is useful - could you maybe flesh out the theory a bit more and suggest a usecase for social network analysis?
How would functionality you add be different to doing nx.k_components(nx.to_undirected(G))? I guess this would be the equivalent of weak_k_components, and you might want to define a strong_k_components in addition?

@rossbar
Copy link
Contributor

rossbar commented Apr 22, 2024

See also #1618 . That's a very old PR, but still valuable especially on the API side!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants