Variation on the Subset Sum Problem

I believe your problem is indeed NP-hard, via the following reduction from subset sum. Let $(a_i)_{i=1}^n$ be an instance of SUBSET SUM. We will make an instance of SMALLEST SUBSET SUM as follows. Let $a_k$ be such that $a_k \neq 0$ and $|a_k|$ is minimal among all $a_i$. Let $p$ be the smallest prime which is at least $n$. Now scale each entry by a factor of $p$ and then append $p$ copies of $-a_k$ to the instance. Note that this new instance has a subset which sums to zero by construction. Now, run SMALLEST SUBSET SUM on the new instance. Observe that the original instance has a zero-sum set if and only if the new instance has a zero-sum set of size at most $n$.


This is merely a simplification of Tony Huynh's answer, but still more than a comment imho. Note that throughout, I work with multi sets (or sequences of integers) rather than sets. Reduce SUBSET SUM to SMALLEST SUBSET SUM as follows: Given an instance $(a_1, \ldots, a_n)$ of SUBSET SUM, let $b := -(a_1 + \ldots + a_n)$ and plug the sequence $(a_1, \ldots, a_n, b)$ into your fictional SMALLEST SUBSET SUM algorithm.

(1) Clearly $a_1 + \ldots + a_n + b = 0$, so your instance has a zero-sum subset.

(2) If the original instance has a zero-sum subset, then this is still a zero-sum subset in the modified instance, hence the smallest such set will have cardinality at most $n$.

(3) If the modified instance has a zero-sum subset of cardinality at most $n$, there are two cases

(a) It does not contain $b$. Then that is a zero-sum subset of the original instance.

(b) It is $\{ b \} \cup \{ a_i : i \in I \}$ for some (possibly empty) $I \subsetneq [n]$. Then $\sum_{i \in I} a_i = \sum_{i=1}^n a_i$ and thus $\{ a_j : j \notin I \}$ is a non-empty zero-sum subset.

Hence the original instance has a zero-sum subset if and only if the modified instance has a zero-sum subset of size at most $n$.