luelista / libresplit

Group expense web app
GNU Affero General Public License v3.0
4 stars 2 forks source link

Simplify Debt #5

Open mweinelt opened 6 years ago

mweinelt commented 6 years ago

If A owes B and B owes C and C owes A we have a loop, which can be simplified to reduce the amount of physical transactions and total money exchanged between users.

The general idea of an algorithm is:

Simplified!

More References:

luelista commented 6 years ago

I'd love to have this and would definitely integrate it if someone would implement the algorithm in PHP or Javascript. Not sure how quick I'll understand it enough to do it myself... ;-)