Any math lovers here? I could use some help. Here's the situation:
A group of friends are playing a game of poker. Each player buys chips on debt, not actually paying any money into the bank. When the game is over, they need to settle up -- losers pay out, winners collect. Each player's net balance will be the difference between the amount of chips they borrowed from the bank and the amount they return at the end of the game.
Is there some mathematical way to achieve balance with the fewest possible transactions? If one player owes $50, and another player is owed the same amount, it makes sense that those two should be paired -- one transaction, two accounts closed. But what if the debts are more complex?
I understand that it's probably a better idea to just buy the chips up front, then pay everyone from the bank, but humor me.
Thanks in advance!
A group of friends are playing a game of poker. Each player buys chips on debt, not actually paying any money into the bank. When the game is over, they need to settle up -- losers pay out, winners collect. Each player's net balance will be the difference between the amount of chips they borrowed from the bank and the amount they return at the end of the game.
Is there some mathematical way to achieve balance with the fewest possible transactions? If one player owes $50, and another player is owed the same amount, it makes sense that those two should be paired -- one transaction, two accounts closed. But what if the debts are more complex?
Player | Bought In | Cashed Out |
---|---|---|
Matt | $100 | $85 |
Jake | $80 | $200 |
Danny | $100 + $100 | $0 |
Hank | $50 | $145 |
I understand that it's probably a better idea to just buy the chips up front, then pay everyone from the bank, but humor me.
Thanks in advance!