title: random selection from 1-D vector data
body: <p>would you please share your thoughts on the following question </p>
  
  <p>suppose you have a 1-D vector data like </p>
  
  <pre><code>Data=[ a1 a2 a3 a4..... an];   0&lt;ai&lt;100
  </code></pre>
  
  <p>how we can find a subset of data such as </p>
  
  <pre><code>Data_subset=[ a3 a7 a8]  or  Data_subset=[ a1 a17 a81 a92 a93 a100 a101 ]
  </code></pre>
  
  <p>which  best hold this condition : <code>abs(sum(Data_subset)-700)&lt;10</code>    </p>
  
  <p>any idea?</p>