We've been stumped by a much larger version of this problem, but we have simplified it down to a simple example:
| A | B | 3 --------- | C | D | 7 --------- 4 6
The constraints are simple:
- The numbers are the sums of the variables in the line (A+B=3, C+D=7, A+C=4, B+D=6)
- The variables will be positive numbers
- This is obviously a very easy example, but we're trying to apply it to huge grids so brute force isn't an option
So can somebody help us solve this, or give us an example of a similar problem?