Divide equal

No.12378668 ViewReplyOriginalReport
How do I divide a sum equal against a certain amount of people that have put out a different amount such that as few people as possible have to send money across?

Is there a mathematical prof for this? Ie as few transactions as possible?