Suppose I've got $n$ debts with principals $P_1, P_2, ..., P_n$, with corresponding interest rates $r_1, r_2, ..., r_n$, compounded monthly.
Further, assume I have a constant $A$ dollars per month to split between all $n$ debt payments.
EDIT: There are monthly minimum interest payments as well.
Given these constraints, how can I minimize the total interest paid?