When I try to solve circuit optimize problem I meet the following question: How to judge if matrix $A$ can transfer to matrix $B$ through row swap and column swap in GL(n, 2) through row swap and column swap? It means that whether we can determine that exist type-1 matrices $s_1$, $s_2$, ... $s_k$ such that: $$s_1 \cdot s_2 ... s_j \cdot A \cdot s_{j+1} ... s_{k} = B$$ type-1 matrices are row switching elementary matrices.
I thought many ways to solve this problem like: 1. sum up the matrix by rows and by colums then compare the sums. 2. sort the matrix through by rows and columns. But they all don' t work (1 is wrong and 2 is hard to proof).