Subset-sum problem
programming
Statement
Subset-sum problem
Given positive integers $a_1, \ldots, a_n$ and $t$, is there a subset $S \subset \{1, \ldots, n\}$ where
$$\sum_{i \in S} a_i = t$$if such a subset exists output it, otherwise return no.
Given positive integers $a_1, \ldots, a_n$ and $t$, is there a subset $S \subset \{1, \ldots, n\}$ where
$$\sum_{i \in S} a_i = t$$if such a subset exists output it, otherwise return no.