title: Find smallest set of rows whose column sums at least reach a target
body: <p>I'm trying to write an algorithm that prints the solution for the following problem:</p>
  <blockquote>
  <p>Given a target array T = [t<sub>1</sub>, t<sub>2</sub>, ...
  t<sub>n</sub>], and a set of lists S = { A = [a<sub>1</sub>,
  a<sub>2</sub>, ... a<sub>n</sub>], B = [b<sub>1</sub>, b<sub>2</sub>,
  ... b<sub>n</sub>], ... X = [x<sub>1</sub>, x<sub>2</sub>, ...
  x<sub>n</sub>] }, what is the subset of S with the lowest cardinality
  that satisfies the condition where the sum of the i<sup>th</sup> terms
  of each array in the subset are at least t<sub>i</sub>?</p>
  </blockquote>
  <p>Example:</p>
  <pre><code>T = [2, 3, 1]
  
  S = {[0, 1, 2], [1, 0, 1], [2, 2, 0]}
  </code></pre>
  <p>The subset with the lowest cardinality that satisfies the above conditions is the set <code>{[0, 1, 2], [2, 2, 0]}</code>. Expressing the sums of each array's i<sup>th</sup> terms as <code>[2, 3, 2]</code>, you can see that each i<sup>th</sup> sum is greater than or equal to the i<sup>th</sup> term of T.</p>
  <p>I've looked at other subset-sum problems but can't come up with an efficient algorithm to solve this one.</p>