Finding a group of 'b' numbers that match close to a given target value.

S

Stephen Lundall

I've got a set of 'x' numbers, say 10. When all 10 numbers are added together they always equal 0. I want to split these 10 numbers into 'a' groups of'b', say, 5 groups of 2; however, the total of the 2 numbers in each groupmust equal or be very close to 0. How do i find the groups of 'b' numbers that add to 0 or there about.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top