Partition

Input

Finite set AA and a size s(a)Z+s(a) \in \mathbb{Z}^{+} for each aAa \in A.

Question

Is there a subset AAA' \subseteq A such that aAs(a)=aAAs(a)\sum_{a \in A'} s(a) = \sum_{a \in A - A'} s(a)?

Classes

Comments

Remains NP-complete even if we require that A=A2|A'| = \frac{|A|}{2}, or if the elements in AA are ordered as a1,a2,,a2na_1, a_2, \dots, a_{2n} and we require that AA' contains exactly one of a2i1a_{2i-1}, a2ia_{2i} for 1in1 \leq i \leq n. However, all these problems can be solved in pseudo-polynomial time by dynamic programming.

Proofs

NP-complete

Transformation from 3-Dimensional Matching (Karp, 1972).

Reducible from

Reducible to

References