Say you have two binary (i.e., (0, 1) ) m x n matrices A and B. Their row and column sums match up - i.e., for each attained row (column) sum k in A, there are the same number of rows (columns) with this sum in A as in B. So, it's not obvious that you can't obtain B by taking row and column permutations of A.
Other than trying every possible permutation, is there a way to know whether you can obtain B from A?