How group debts can be settled with fewer payments
In a group of friends, nearly everyone owes someone. Most of those debts cancel out, and only a few payments are really needed.
A small example
Asha owes Bikram 500. Bikram owes Chandra 500. Settling literally takes two payments, but Bikram is only passing money along. If Asha pays Chandra 500 directly, one payment replaces two and Bikram owes nothing.
Use net balances
For each person, add up what they are owed and subtract what they owe. A positive result means the group owes them. A negative result means they owe the group. All balances in a group add up to zero.
Match debtors to creditors
Take the largest debtor and the largest creditor. The debtor pays the creditor as much as the smaller of the two balances, and at least one of them reaches zero. Repeat until everyone is at zero. A group of n people never needs more than n minus 1 payments, however tangled the original debts were.
Circular debts vanish
If A owes B, B owes C and C owes A the same amount, every net balance is zero and nobody pays anyone.
What does not change
Simplifying changes who pays whom, never how much each person is worth overall. I used this approach in BillSplit, where the app only records balances and people pay each other however they prefer.