-
Notifications
You must be signed in to change notification settings - Fork 155
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 a function to find densest subgraph #570
Comments
What is a "densest subgraph"? Take any graphs with at least one edge. Take that edgs, along with its endpoints, as a subgraph: it has density 1, the highest possible. |
That's my bad it should be something like |
This commit adds a new function find_densest_subgraph_of_size() to retworkx. This function is used to find a subgraph in a given graph of a specified size that has the highest degree of connectivity of nodes. Fixes Qiskit#570
What is the expected enhancement?
Something that came up in the review on Qiskit/qiskit#7740 is that it would be good for retworkx to have a function to find the densest subgraph in a graph. To start we can just reuse the algorithm from the
DenseLayout
pass which just performs a BFS list from every node in the graph (in parallel) and takes the firstn
nodes from that and applies the weights and picks the most connected one with the best score from the weights. I'm not familiar with the literature on this problem space, but if there is a better algorithm that offers a faster or more complete solution we can look at implementing that too.The text was updated successfully, but these errors were encountered: