I want to find the possible values for {$x_i$} for given that I know $y$, {$p_i$} and the sum of $x_i$. In other words, let:
$x_1 \cdot p_1 + x_2 \cdot p_2 + \cdots + x_n \cdot p_n = y$
$\sum_{i=1}^n x_i = k$
Example:
$11 x_1 + 22 x_2 + 44 x_3 = 66$
$x_1+x_2+x_3 = 2$
would result in the solution: $x_1 = 0, x_2 = 1, x_3 = 1$.
I wonder if this has to be done by brute force with trying all possible combinations or if there are smarter algorithms for this kind of problem.
What kind of problem is this at all? Not being a mathematician i even don't know what to search for (and probably asked totally wrong - Sorry).
Please feel free to improve the question and add better tags.