How to distribute coins to achieve minimum difference?

E

Eric

I get 2 bags and 5 coins with different values, such as
The values for each coin are 14, 21, 23, 30, and 37.
I need to put coins into 2 bags to achieve minimum difference for both.

For example, I can put 14, 21, 23 into bag 1 and 30, 37 into bag 2.
The difference for both bags is
14+21+23 = 58
30+37 = 67
The difference is 67 - 58 = 9.
How do I know whether I achieve the minimum difference between 2 bags?

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 

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