$A, B$ are non-symmetric matrices of dimension $m \times n$ where $m=n$ or $m \neq n$.
Example: An example of $6 \times 3$ non-symmetric matrix is
$$ \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix}. $$
$A \simeq B$ and $g(h(A))=B$ where
$g$ is a permutation that acts on $n$ columns and $h$ is a permutation that acts on $m$ rows.
Problem: How to construct a non exponential algorithm to test such isomorphism?
Note: I have an idea to construct such algorithm which is based on less rigorous argument. Therefore, I would like to have a formal (i.e. mathematically rigorous) solution .
Some quick (definitely true) observations:
Here's my first thought at an algorithm; I'm not sure whether it works. The fundamental idea I'm operating on is that given a matrix $A$, we should find an algorithm that selects a member of the equivalence class of $A$ (that is, a second matrix $M \cong A$) such that if $A \cong B$, the algorithm will produce the same matrix $M$ if either $A$ or $B$ are given as an input to the algorithm.
Start with your $A$, and sort the rows from top to bottom in numerical order, reading each row as a binary number. So, $$ A =\pmatrix{ 1&&\\ &1\\ &1&1\\ 1\\ &&1\\ &1} \to \pmatrix{ &&1\\ &1\\ &1\\ &1&1\\ 1\\ 1 } $$ Then, sort the columns in decreasing order from left to right (in this case, this means nothing happens).
The algorithm repeats this sort of row and column if the matrix is still not sorted by row and by column in this fashion. The algorithm terminates either when the matrix is sorted or when the same matrix is attained twice.
The output of the algorithm is the last matrix obtained.
There are probably several things wrong with this algorithm, but I thought it might be a useful staring point nevertheless.