You are given a list of debts as triples (debtor, creditor, amount), where each amount > 0. Return a set of settlement transfers (from, to, amount) that clears all balances among the participants. Minimize the number of transactions; if multiple optimal solutions exist, return any one. Describe your algorithm (e.g., backtracking with pruning on net balances, min-cut formulation, or greedy heuristics), prove correctness or provide a justification, analyze time/space complexity, and discuss how you would scale the solution for large N and skewed debt graphs.