I'm struggling to mathematically define a solution to my problem which is a variant on the famous partition problem. Instead of partitioning a list of integers into two bins that sum to approximately an equal amount I want to partition a list of decimals such that each value goes into each equation once and only once and sums to a pre-specified value.
The simplest example of this I can think of is three values, 1,2, and 3 that I need to partition into two bins summing to 5 and 1.
Obviously this would yield two equations consisting of 1 = 1 and 2 + 3 = 5.
I can convert this into a simultaneous equation pretty easily but can't work out how to apply the constraint that each value can only go into each partition once.
Any advice would be appreciated, even if it's just to links I didn't know about. Sorry if this question hasn't been formulated the best way, first time poster!
Thanks!
EDIT: Thought I'd add a more concrete example that might make it clearer what I can change and what I can't.
Suppose I have a big box filled with legos. Each lego has some number of dots on the top. Now I have several smaller box's in front of me. I want the number of lego dots to sum to a specified (different) amount for each box. I can't change the number of legos I have, nor how many dots each one has, nor how many smaller boxes I have, nor the sum of dots for each box. Not every lego from the big box needs to be put into a smaller box. What I CAN choose is which legos to put in which boxes. I hope that's clear and not just random rambling.