Finding the addends behind an output series.

51 Views Asked by At

Let's imagine that we have a series of output, say, scores $S_1,S_2,\ldots,S_n \in \mathbb{N}$. We know that these scores are the result of addition of natural numbers, such that the highest score is the sum of every number. How do we find the constituent set of numbers?

An example: We have the output $O=\{0,2,3,4,5,7\}$. Everyone of these numbers can be written as a sum of the form $S=2s_1+2s_2+3s_3$ with $s_i \in\{0,1\}$. But how do we find $s_1,s_2,s_3$ from the output set?