Skip to content

Improve exhaustive dense subgraph finder for recursive assembly#103

Merged
tomcur merged 3 commits intomainfrom
dense-subgraph-bfs
Oct 28, 2025
Merged

Improve exhaustive dense subgraph finder for recursive assembly#103
tomcur merged 3 commits intomainfrom
dense-subgraph-bfs

Conversation

@tomcur
Copy link
Copy Markdown
Contributor

@tomcur tomcur commented Sep 18, 2025

The old routine does a depth-first search, which doesn't actually find minimum dense subgraphs, which a a breadth-first search does find. Finding small dense subgraphs is important for solving performance. Note both the DFS and the BFS implementations have exponential time-complexity, but BFS will in general lead to constructing more efficient decomposition plans.

#97 introduced a polynomial-time minimal dense subgraph finder (not minimum). Its correctness is harder to check, so I'm thinking to keep the exhaustive search too, for now, mainly for ease of debugging.

In addition to changing to BFS, this now makes use of the sparsity of the graph (normally, most elements only have a few incident edges) to reduce the amount of scanning performed, making this more useful in practice.

Copy link
Copy Markdown
Contributor Author

@tomcur tomcur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI failure should be solved once based on #102.

The changes here make it much more likely to hit the failure case fixed there.

Comment thread fiksi/src/analyze/graph/recursive_assembly.rs Outdated
Comment thread fiksi/src/analyze/graph/recursive_assembly.rs Outdated
Comment thread fiksi/src/analyze/graph/recursive_assembly.rs Outdated
Copy link
Copy Markdown
Contributor Author

@tomcur tomcur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should succeed once rebased on #106.

tomcur added 3 commits October 8, 2025 15:16
The old routine does a depth-first search, which doesn't actually find
*minimum* dense subgraphs, which a a breadth-first search does find.
Finding small dense subgraphs is important for solving performance. Note
both the DFS and the BFS implementations have exponential
time-complexity, but BFS will in general lead to constructing more
efficient decomposition plans.

#97 introduced a polynomial-time
*minimal* dense subgraph finder (not *minimum*). Its correctness is
harder to check, so I'm thinking to keep the exhaustive search too, for
now, mainly for ease of debugging.

In addition to changing to BFS, this now makes use of the sparsity of
the graph (normally, most elements only have a few incident edges) to
reduce the amount of scanning performed, making this more useful in
practice.
@tomcur tomcur force-pushed the dense-subgraph-bfs branch from 6ec2bb8 to 399fc0c Compare October 8, 2025 13:16
@tomcur tomcur merged commit 5862331 into main Oct 28, 2025
16 checks passed
@tomcur tomcur deleted the dense-subgraph-bfs branch October 29, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants