Text this: Mutual debt compensation as a minimization problem