Conversation
Add 10 new reduction rules connecting existing problem models: Tier 1a (simple): - Partition → BinPacking (#396): capacity=S/2, identity extraction - ExactCoverBy3Sets → MaximumSetPacking (#823): identity transformation - NAESatisfiability → MaxCut (#821): literal-pair edges + variable edges ThreePartition scheduling (5 rules): - ThreePartition → ResourceConstrainedScheduling (#477): 3 processors, resource=size - ThreePartition → SequencingWithReleaseTimesAndDeadlines (#469): filler-task slots - ThreePartition → SequencingToMinimizeWeightedTardiness (#473): filler-task slots - ThreePartition → FlowShopScheduling (#482): 3-machine separators - ThreePartition → JobShopScheduling (#485): 2-processor separators ILP/graph: - ILP/i32 → ILP/bool (#769): FBBT + truncated binary encoding - MaxCut → MinimumCutIntoBoundedSets (#849): complement graph bisection Also adds num_literal_pairs() getter to NAESatisfiability model and updates dominated-rules allow-list and path parity tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #972 +/- ##
==========================================
+ Coverage 98.01% 98.03% +0.02%
==========================================
Files 764 784 +20
Lines 80775 82310 +1535
==========================================
+ Hits 79169 80695 +1526
- Misses 1606 1615 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Agentic Review Report
|
- Register all 9 unregistered rule modules in rules/mod.rs (were dead code) - Wire 9 canonical rule example specs in canonical_rule_example_specs() - Add ExactCoverBy3Sets -> ILP to dominated-rules allow-list - Rename misleading test_..._infeasible to test_..._two_triples - Fix unused variable warning in JobShopScheduling example builder Test count: 4258 -> 4312 (54 previously-dead tests now compiled and passing) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The new reduction rules (especially MaxCut -> MinCutBounded) created an alternative 3-step path to QUBO via complete graph construction, producing O(n^4) QUBO variables. MinimizeSteps tied at 3 steps and the tie-breaker selected this expensive path. Using MinimizeStepsThenOverhead with actual problem size (Petersen: 10v, 15e) ensures the compact SpinGlass path is chosen. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Agentic Review Report (Updated)
Structural CheckStructural CompletenessAll 10 rules pass structural checks. The
Build Status
Semantic Review (naesatisfiability_maxcut)
Issue Compliance
Quality CheckDesign Principles
IssuesImportant:
Minor: Agentic Feature TestsNAESatisfiability → MaxCut Test Results
Minor Finding: Duplicate Edges in NAESatisfiability → MaxCutThe reduction can produce parallel edges when the same literal pair appears in multiple clauses. The reduction still produces correct results but violates the SimpleGraph invariant. Fixes Applied (post-review)
Generated by review-pipeline |
|
Follow-up items (recorded during final review):
|
… entries Complete missing documentation and test coverage for 41 reduction rules shipped across PRs #777, #779, #804, and #972. Check 10: 39 new `test_find_rule_example_*` tests in example_db.rs covering all cross-problem reductions from the four PRs (ILP i32→bool excluded as a same-name variant edge). Check 11: 31 new `#reduction-rule(...)` entries in reductions.typ — 30 for cross-problem reductions (PRs #777, #779, #972) plus 1 for the ILP<i32> → ILP<bool> variant reduction via FBBT + truncated binary encoding. Closes #974 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… rules (#997) * docs: add design spec for proposed reductions Typst note Covers 9 reductions: 2 NP-hardness chain extensions (#973, #198), 4 Tier 1a blocked issues (#379, #380, #888, #822), and 3 Tier 1b blocked issues (#892, #894, #890). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(#974): add 39 example-db lookup tests and 31 paper reduction-rule entries Complete missing documentation and test coverage for 41 reduction rules shipped across PRs #777, #779, #804, and #972. Check 10: 39 new `test_find_rule_example_*` tests in example_db.rs covering all cross-problem reductions from the four PRs (ILP i32→bool excluded as a same-name variant edge). Check 11: 31 new `#reduction-rule(...)` entries in reductions.typ — 30 for cross-problem reductions (PRs #777, #779, #972) plus 1 for the ILP<i32> → ILP<bool> variant reduction via FBBT + truncated binary encoding. Closes #974 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Delete docs/superpowers/specs/2026-03-31-proposed-reductions-note-design.md * docs: add Institute of Science Tokyo affiliation to paper Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: remove accidentally committed docs/superpowers directory Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add worked example for HamiltonianCircuit -> RuralPostman reduction Upgrade the prose-only reduction-rule entry to include data-driven example with load-example binding, pred-commands, three construction steps, and multiplicity note. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for HamiltonianCircuit -> HamiltonianPath reduction Upgrade the prose-only reduction-rule entry with load-example data binding, pred-commands reproducibility block, and a 3-step worked example showing the vertex-splitting construction on a C4 cycle graph. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for HamiltonianCircuit -> BottleneckTravelingSalesman reduction Add data-driven example with load-example binding, pred-commands block, step-by-step construction walkthrough, and solution verification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for HamiltonianCircuit -> StrongConnectivityAugmentation reduction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add worked example for HamiltonianCircuit -> QuadraticAssignment paper entry Upgrade the prose-only reduction-rule entry to include a data-driven worked example with load-example binding, pred-commands block, and step-by-step construction/verification using the C4 cycle graph fixture. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for Partition -> BinPacking reduction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for ThreePartition -> JobShopScheduling reduction Add data-driven example with load-example binding, pred-commands block, and step-by-step walkthrough showing the m=1 canonical instance with 3 elements, sizes (4,5,6), bound B=15 on 2 machines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add worked example for Partition → MultiprocessorScheduling reduction Upgrade the prose-only reduction-rule entry to include a data-driven worked example with load-example binding, pred-commands block, and step-by-step verification of the canonical witness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for ThreePartition -> ResourceConstrainedScheduling reduction Also remove duplicate Partition -> ShortestWeightConstrainedPath entry that caused a label collision. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for ThreePartition -> SequencingWithReleaseTimesAndDeadlines reduction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add worked example for ThreePartition -> FlowShopScheduling reduction Add data-driven example with load-example binding, pred-commands block, and step-by-step walkthrough showing source instance, job construction, separator window mechanism, and end-to-end solution verification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for KSatisfiability -> KClique reduction Add data-driven worked example with load-example binding, pred-commands reproducibility block, step-by-step construction walkthrough, and end-to-end solution verification for the 3-SAT to k-clique reduction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for MinimumVertexCover -> MinimumFeedbackArcSet reduction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for Satisfiability -> NAESatisfiability reduction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for ExactCoverBy3Sets -> MaximumSetPacking reduction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for KSatisfiability -> MinimumVertexCover reduction Also remove duplicate ThreePartition -> FlowShopScheduling entry that caused a duplicate label compilation error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(paper): add worked example for MaxCut -> MinimumCutIntoBoundedSets reduction Also remove duplicate ThreePartition -> FlowShopScheduling prose entry that was left over from a merge conflict. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove duplicate SAT→NAESatisfiability prose-only entry Leftover from parallel worktree merge — the data-driven entry was placed at line ~10136 by the SAT→NAE agent, but the original prose-only entry at line ~13454 was not cleaned up. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: GiggleLiu <cacate0129@gmail.com>
Summary
Adds 10 new reduction rules from the #770 tiered implementation priority list, connecting existing problem models:
Tier 1a — Simple (3 rules):
ThreePartition scheduling (5 rules):
ILP/graph (2 rules):
Additional changes:
num_literal_pairs()getter to NAESatisfiability modelFixes #396
Fixes #469
Fixes #473
Fixes #477
Fixes #482
Fixes #485
Fixes #769
Fixes #821
Fixes #823
Fixes #849
Test plan
make checkpasses (fmt + clippy + all tests)🤖 Generated with Claude Code