Fix #164: MaximumClique to MaximumIndependentSet reduction#604
Merged
Fix #164: MaximumClique to MaximumIndependentSet reduction#604
Conversation
Implement complement graph reduction (Karp 1972): a clique in G corresponds to an independent set in the complement graph. - Reduction rule with overhead: n vertices, n(n-1)/2 - m edges - 5 unit tests including closed-loop, triangle, empty graph, weights - Example program with JSON export - Paper entry with proof and worked example Co-Authored-By: Claude Opus 4.6 <[email protected]>
Collaborator
Author
Implementation SummaryChanges
Deviations from Plan
Open Questions
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #604 +/- ##
==========================================
+ Coverage 96.61% 96.73% +0.12%
==========================================
Files 218 220 +2
Lines 29352 29434 +82
==========================================
+ Hits 28357 28472 +115
+ Misses 995 962 -33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Implements the classical Karp (1972) complement graph reduction from MaximumClique to MaximumIndependentSet, where a clique in G corresponds to an independent set in the complement graph.
Changes:
- New reduction rule building the complement graph with identity solution extraction
- 5 unit tests covering closed-loop verification, triangle, empty graph, weights, and overhead
- Example with JSON export and documentation in reductions.typ
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/rules/maximumclique_maximumindependentset.rs | Core reduction implementation with complement graph construction |
| src/unit_tests/rules/maximumclique_maximumindependentset.rs | 5 unit tests |
| src/rules/mod.rs | Register new reduction module |
| examples/reduction_maximumclique_to_maximumindependentset.rs | Example with JSON export |
| tests/suites/examples.rs | Register example test |
| docs/src/reductions/reduction_graph.json | Updated auto-generated graph |
| docs/paper/reductions.typ | Formal reduction specification |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
Review Pipeline Report
🤖 Generated by review-pipeline |
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
Changes
src/rules/maximumclique_maximumindependentset.rs— reduction rule implementationsrc/unit_tests/rules/maximumclique_maximumindependentset.rs— 5 unit tests (closed-loop, triangle, empty graph, weights, overhead)examples/reduction_maximumclique_to_maximumindependentset.rs— example with JSON exportdocs/paper/reductions.typ— reduction-rule entry with proofsrc/rules/mod.rs,tests/suites/examples.rs,reduction_graph.jsonTest plan
make checkpasses (fmt + clippy + test)Fixes #164
🤖 Generated with Claude Code