The previous post described the restriction given by partial sums – depicted by red points – which appear on exactly one row. Looking at these pictures, one sees, that there must be done more: Because of the type of the matrix also the partial sums of one row have to avoid the mandatory (green) points of all other rows. For the time being this has been implemented for the upper – right hand side – mandatory points. This is visible by the fact, that no longer any cyan colored point is in the same vertical with a green point on the right hand side.
The former example for Z = 10 looks now as follows
whereas the former example for Z = 22 looks now so:
Interestingly, a red point on row 18 remains without cyan filling, which means that this point cannot be reached if the restrictions from green points on the right hand side are respected. By the way, the restriction implementation is for the sake of simplicity currently a bit too prohibitive.
Finally let’s also look at the Z = 30 example
What remains to do? On the left hand side there are still cyan points in the same vertical with green points. These restrictions must be implemented too.
So, progress is slow, but not zero.