Repository navigation
fix(mincut): report sampled cuts on the original graph - #1097
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix #1085.
ApproxMinCutused to return the numerical minimum cut of a sampled, rescaled graph, then attach an unrelated BFS partition of the original graph. The returned value could be below the exact minimum cut and did not equal the reported partition's crossing weight.This change solves each sampled graph for a candidate partition with the crate's existing exact kernel, evaluates that partition on all original edges, and selects the lightest valid candidate. The reported
value,upper_bound, andpartitionnow refer to the same original-graph cut. A conservative0.0lower bound replaces the uncertifiedvalue / (1+ε)expression for nonnegative weights. The requested ε remains a sampling parameter; this PR does not claim a(1+ε)approximation guarantee. Cached queries retain the matching partition, and updates invalidate both value and partition.For small or disconnected graphs the same exact kernel runs on the original edges. Finite nonnegative weights are enforced at insertion, matching the premise of the cut bound. The old duplicate dense Stoer–Wagner implementation and unrelated BFS partition builder are removed.
Reproduction and validation
reported value >= exact minimum.[lower_bound, upper_bound], and cached-query consistency. A second regression verifies insert/delete cache invalidation.subpolynomial::tests filtered; 26 doctests passed, 20 ignored.rustfmt --checkandgit diff --check: passed.The full workspace CI and long subpolynomial tests were not run locally. The reduced harness resolves dependencies from crates.io rather than the workspace lockfile. No performance benchmark or all-graph approximation ratio is claimed. This is independent of #1092's
DynamicMinCutresult-label fix, though both PRs edit nearby documentation in this module.