Skip to content

Fix #363: [Rule] PARTITION to INTEGRAL FLOW WITH MULTIPLIERS#1068

Closed
isPANN wants to merge 2 commits into
mainfrom
issue-363
Closed

Fix #363: [Rule] PARTITION to INTEGRAL FLOW WITH MULTIPLIERS#1068
isPANN wants to merge 2 commits into
mainfrom
issue-363

Conversation

@isPANN
Copy link
Copy Markdown
Collaborator

@isPANN isPANN commented May 25, 2026

Summary

Add the implementation plan for the Partition -> IntegralFlowWithMultipliers reduction and then execute it in follow-up commits.

Fixes #363

isPANN and others added 2 commits May 26, 2026 02:59
Adds Sahni's multiplier-flow gadget: each Partition element becomes an item
vertex whose multiplier amplifies a binary source choice into either 0 or a_i
units entering a relay. A single bottleneck arc of capacity S/2 converts the
target's "net inflow at least R" condition into the exact equality needed by
Partition. Odd-S inputs reduce to a fixed infeasible 3-vertex instance.

- src/rules/partition_integralflowwithmultipliers.rs: reduction impl
  with odd-S/even-S branches and witness extraction from source arcs
- src/unit_tests/rules/partition_integralflowwithmultipliers.rs: 5 tests
  (closed-loop, structure on even-total YES instance, even-total NO
  exercises bottleneck, odd-total fixed NO target, witness extraction,
  canonical example spec)
- src/rules/mod.rs: register module and example specs
- docs/paper/reductions.typ: full theorem with construction, correctness
  proof, and worked example using the canonical fixture

Closes #363.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 99.28571% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.93%. Comparing base (8df8ac0) to head (24dfc58).

Files with missing lines Patch % Lines
src/rules/partition_integralflowwithmultipliers.rs 98.52% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1068    +/-   ##
========================================
  Coverage   97.93%   97.93%            
========================================
  Files         966      968     +2     
  Lines      100154   100294   +140     
========================================
+ Hits        98083    98222   +139     
- Misses       2071     2072     +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[Rule] PARTITION to INTEGRAL FLOW WITH MULTIPLIERS

1 participant