I also find it fascinating to read the algebraic solutions of others. This algorithm seems to rely on an open source integer problem solver called "CBC" [1]. But is it necessary for a general 'searching solver' of that kind to be used for this particular problem?
The way in which the problem is framed suggests there is a unique solution. The model is presented as a square matrix subject to linear constraints. There are 36 unknowns, being x[1][1] through to x[36][36], each of which is 0 or 1. There is the constraint that the sum of the unknowns is 419. And there are two constraints to ensure that only one number is chosen from each row and each column, which together give rise to 36 constraint equations.
If any one of the latter constraints is replaced by the sum constraint, there is a linear system of 36 equations in 36 unknowns. Is it possible for that system to be constructed and solved directly through matrix inversion?
(For those trying the exercise at home, the number at P[1,2] appears as 90 but from the full problem statement I think it should be 6.)
The way in which the problem is framed suggests there is a unique solution. The model is presented as a square matrix subject to linear constraints. There are 36 unknowns, being x[1][1] through to x[36][36], each of which is 0 or 1. There is the constraint that the sum of the unknowns is 419. And there are two constraints to ensure that only one number is chosen from each row and each column, which together give rise to 36 constraint equations.
If any one of the latter constraints is replaced by the sum constraint, there is a linear system of 36 equations in 36 unknowns. Is it possible for that system to be constructed and solved directly through matrix inversion?
(For those trying the exercise at home, the number at P[1,2] appears as 90 but from the full problem statement I think it should be 6.)
[1]: https://projects.coin-or.org/Cbc