In the naive version of the canonical, test matrix is permuted for all the permutations of 𝐴 𝑆 π and its maximality is checked (Equation ). In the permuted matrices, , their rows and 𝐴π entries are permuted. The original matrix is compared with all the permuted matrices. Two 𝐴 matrices are compared row by row in a lexicographical order (Equation ).