2010-05-24

Skewed Commutative (?) Matrix (2)

How many such matrices are there?
I first calculated the constraint and tried to find the matrix pairs that satisfy the constraint. I.e., I compute AB and -BA,


Equation first try

then four equations I got. However, there were so many cases and I had no confidence I did this correct.

My next idea is using matlab/octave. To make the problem simple, I added the following condition, I think it is still enough interesting with this condition.

  The elements of the matrix are {-1,0,1} only.

My choise of algorithm is a simple standard 'generate and test' method, I generate 6561 (= 3^4 x 3^4) pairs of matrix, then test each matrix pair satisfying the condision AB=-BA (not allowing AB=0) or not. In this method, I generate the permulation and not the combination, therefore I counted the same pair twice. (For example, If we do D = B, E = A in Equation(1) from the last blog, AB and DE are different solutions.)

The result is 112, therefore, I found 56 pairs of matrix.

No comments: