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

Algorithms to implement #33

Open
10 of 25 tasks
dominikbraun opened this issue Sep 1, 2022 · 7 comments
Open
10 of 25 tasks

Algorithms to implement #33

dominikbraun opened this issue Sep 1, 2022 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dominikbraun
Copy link
Owner

dominikbraun commented Sep 1, 2022

This is an umbrella issue for various algorithms that might or should be implemented mid- to long-term.


Clustering

  • Transitivity

Connectivity

  • Is connected
  • Strongly connected components
  • Weakly connected components
  • Condensation

Cycles

DAGs

  • Topological sort
  • Transitive reduction
  • Transitive closure

Eulerian

  • Eulerian circuit
  • Eulerian path

Paths

  • Dijkstra
  • A*
  • All simple paths between two vertices

Traversal

  • DFS
  • BFS
  • DFS tree
  • BFS tree

Trees

  • Minimum spanning tree
  • Maximum spanning tree

Isomorphism & Comparisons

Sets

  • Union-find

These algorithms along with their tests should live in a file named after their category, e.g. DFS is located in traversal.go and tested in traversal_test.go. They should accept a Graph[K comparable, T any] instance and vertex values (T) or vertex hashes (K) where appropriate.

@dominikbraun dominikbraun added enhancement New feature or request help wanted Extra attention is needed labels Sep 1, 2022
@dominikbraun dominikbraun pinned this issue Sep 1, 2022
@pangeran-bottor
Copy link
Contributor

Hi @dominikbraun,

I'm interested in working on some of these tasks and planning to start with the Simple cycles one.
I want to confirm the specific functionality of this method. For example, is it to find all simple cycles from the given graph?

@dominikbraun
Copy link
Owner Author

Hi @pangeran-bottor, thanks for you interest! I've opened issue #39 to describe the function and discuss it.

@purpleidea
Copy link

Fantastic. Would love to see graph isomorphism here. I don't think any golang graph library supports it, and this would be a great win. I document some info about this here: purpleidea/mgmt#199 HTH and thank you!

@dominikbraun
Copy link
Owner Author

@purpleidea I've opened issue #47 for graph isomorphism.

@nathancoleman
Copy link

@dominikbraun I've implemented Nearest Neighbor Graph and Farthest Neighbor Graph for my own purposes and was curious if it was something you'd be interested in as a contribution here.

The interesting part for me was that I sometimes want to calculate this graph using the AdjacencyMap() and other times using the PredecessorMap() depending on which node is my frame of reference in a directed graph. If you're interested in this contribution, what sort of interface would you expect? For my own use case, I have split these into NearestAdjacentGraph() and NearestPredecessorGraph()

@dominikbraun
Copy link
Owner Author

dominikbraun commented Nov 5, 2022

@nathancoleman Thanks for your suggestion, a contribution regarding NNGs and FNGs would definitely be welcome!

I'm not into NNGs though, so it is hard for me to judge and reason about an appropriate API. If I understand you correctly, the distinction between AdjacencyMap and PredecessorMap would be inherent to the problem and isn't due to a flawed API design of this library - in that case, NearestAdjacentGraph and NearestPredecessorGraph would be fine for me.

@zoonage
Copy link

zoonage commented Apr 22, 2024

Could we get a topological generations algorithm as well please? Example from networkx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants