Simplify debts by minimizing transactions. The algorithm does not aim in minimizing transaction amounts but only the number of transactions.
Updated for python3
- Create debts file, e.g. example.txt:
# Everyone owes Joe
* -> Joe: 16.80
Sue -> Joe: 24.40
Bob -> Sue: 12.20
# Ellen is part of everyone
Ellen
- Run:
$ python3 src/simplify.py <example.txt
Bob -> Joe: 16.4
Sue -> Joe: 16.4
Ellen -> Joe: 4.2
Run with graphviz
$ python3 src/simplify.py -g <example.txt |dot -Tpng >example.png
Robot framework required
$ cd test
$ pybot run-test.txt
Licensed with GPLv2.
This project is a grateful recipient of the Futurice Open Source sponsorship program. 🌶🦄