Reduce Subset Sum to Partition
Balance a target subset against its complement without assuming the target is half the total.
Assignment sources
Related exam and assignment appearances
These links mark a related idea or close version; only groups explicitly marked as exact repeats in the question map count as duplicates.
Problem
For positive integers and target , reduce SUBSET-SUM to PARTITION. Handle immediately the cases and define PARTITION as asking whether the multiset can be split into equal-sum parts. Prove correctness and polynomial encoding length.
Prerequisites
Know the unit definitions and how resources are measured against encoded input length. Distinguish a conditional theorem, a reduction, and an algorithm.
Hint 1
Let and add numbers that force a target offset.
Hint 2
The pair and makes the new total .
Hint 3
In an equal partition the two added numbers cannot lie on the same side.
Subset Sum → Partition
Full solution
If , output a fixed no-instance such as ; positivity makes the source answer no. Otherwise output the multiset
All numbers are positive (if , the source is trivially yes and may be mapped separately). Their total is , so an equal partition gives each side sum .
If a subset of the original numbers sums to , place together with the elements indexed by . Their sum is . Put all remaining original numbers with ; their sum is . Thus a source solution yields a partition.
Conversely, consider an equal partition. The two added numbers cannot be on the same side because their sum is , the required side total. Hence they are separated. On the side containing , the original numbers on that side must sum exactly . They constitute a subset-sum witness. This proves both implications.
Computing uses polynomially many binary additions. The new values have magnitude at most , and , so each has polynomial encoding length. The mapping itself is polynomial-time. Multiplicity is retained: PARTITION and SUBSET-SUM instances are multisets, so equal values at different positions remain distinct selectable items.
An alternative reduction can add one balancing element involving , but it requires a careful case split about which side receives it. The two-marker construction makes the converse transparent. The special cases and should be resolved explicitly rather than allowing a zero or negative “positive integer” in the target instance.
Checkpoints
Check both logical directions, halting of every relevant branch, and that output length and construction time are polynomial in the encoded input length.
Common mistakes
- Adding without handling its sign.
- Failing to prove the marker numbers are separated.
- Measuring output size by numeric magnitude rather than bit length.
Sources and verification
- 2026 transcript 15
- Garey-Johnson, SP12
- Corpus coverage note: No direct merged-summary coverage.
- Catalog mapping:
data/exercises.json; statements and solutions are independently written; personal submissions are non-authoritative.
Provenance and confidence
The exercise is an original synthesis. Confidence reflects verification of the mathematical claim against the textbook sources listed above; course sources are used only where direct coverage is identified.