Question: Matrices of zeros and ones

How to most effectively generate all matrices from zeros and ones (matrices size 6 by 6), such that in each row and in each column exactly 4 units. This problem was encountered in solving one problem in the field of entertaining mathematics. I know how to solve it in about 100 seconds, but I so far do not give my solution so that everyone can enjoy solving it.

Please Wait...