Find the smallest group of numbers with sum bigger then $X$ Given a list of numbers $S$ where $0 &lt; s_i &lt; 100$, find the minimum sum group of numbers with a sum bigger than $X$.
Each number can be used multiple times.
Ex: for $S = [3,4.1], X = 10$ the solution is $[3, 3, 4.1]$
Is it a known problem? What will be the best way of solving it?
For now, my best solution is to randomly pick numbers and repeat the process multiple times.
Assuming you are looking for $S' \subset S$ with minimal $\sum_{x \in S'} x &gt; X$ like Steven suggested, then you should be able to reduce the problem to an instance of knapsack with weights $w_i$ and costs $c_i$ with $w_i = c_i = s_i$ for every $s_i \in S$ where the weight of the knapsack is bounded by $X$.
If the solution $K := \sum_{x \in S'} x$ is not greater than $X$, you need to repeat the process by setting $X := X + \varepsilon$ where $\varepsilon$ is the minimal distance between any two subset sums of $S$ and running knapsack again until it yields a solution $K &gt; X$.
Edit: Turns out that finding $\varepsilon$ isn't an easy problem. I first assumed $\varepsilon$ is the minimum between any two numbers in $S$, which can be found by sorting the list and finding the minimum between two adjacent elements. This would yield a good approximation in most cases, but it might not be the optimal solution. If your problem statement uses $\geq$ instead of $&gt;$, transforming the problem into knapsack will yield an optimal solution, no repetitions required.