regarding the discussion question, my guess is that the only cases where the answer becomes unique are those 'trivial' single-vector or equivalent cases. More precisely those cases where min(nnz(row_sums),nnz(col_sums))<=1. The reasons is that if one solution exist where x(a,b)>0 and x(c,d)>0 (and a~=c and b~=d; i.e. they are not in the same row or column), then you could simply subtract one from x(a,b) and x(c,d), and add one to x(c,b) and x(a,d), and the result will also be a valid solution... thoughts?
Nice problem
I confess, I found the results using intlinprog.
I would love to know how you came up with that.
Return the largest number that is adjacent to a zero
3749 Solvers
Generate N equally spaced intervals between -L and L
563 Solvers
724 Solvers
216 Solvers
123 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!