Thank you for sharing my post! This math problem has a weird way of sticking in my head, it's been years and I still feel like there's some "it" to get that I haven't cracked yet. Particularly, I'm pretty sure that there's a finite number of non-trivial solutions, with some amount of taste needed to define trivial, and I haven't yet been able to come up with a definitive definition of trivial, bound the largest possible matrix, or sample from the finite set efficiently. (I do think that the definition of non-trivial I used in the code golf challenge, that it can be at most half zero, is decent- and I strongly suspect but can't prove that the 12 x 12 example found manually by Moritz Schauer is the biggest by this definition.) Another aesthetically pleasing candidate for a definition of trivial is to actually just ban 0 entries from A, since having leading zeros in entries of AB is visually awkward.
- 0 * x = 0 so you don't necessarily test the correct computation of x,
- 1 * x = x so you don't necessarily test if you actually use the input 1,
- 2 * 2 = 2^2 = 2 + 2 so you can get some pretty weird masking.