I'm playing with graphs and python, and I'm trying to test some code on all the possible square matrix that represent an adjacency matrix (i.e. matrix with 0 and 1).
We know that there are 2^{n^2} possible matrix of nxn.
What's the best code for generating all the possible n x n binary matrix in python?
Since I could't find anywhere the solution, and I think it could be helpful to spare some minutes to other people..