Get all vectors from a matrix in Java

I have a little problem and would like some help. The fact is that I was given this control matrix H.

0000111111111 H = 0111000111222 1012012012012 

I will be asked to get all the words in this code. The theory of linear and block codes says that the word V is the word that H * Vt = 0 (zero) , where Vt is transposed V.

At the moment, I know that there are 3 ^ 10 = 59049 possible words. This is the size of the matrix, which is obtained by including the body q in this case q = 3 of the matrix in the dimension, which is a row column.

My problem I do not know how to generate all the vectors (words), so H * Vt = 0. How can I do this in Java? All possible combinations using 13-n vectors with 0.1 and 2. I would also like to know if it is possible to work with matrices in Java.

 [0,0,0,0,0,0,0,0,0,0,0,0,0] [0,0,0,0,0,0,0,0,0,0,0,0,1] [0,0,0,0,0,0,0,0,0,0,0,1,0] [0,0,0,0,0,0,0,0,0,0,0,1,1] .... [0,0,0,0,0,0,0,0,0,0,0,0,0] [0,0,0,0,0,0,0,0,0,0,0,0,2] [0,0,0,0,0,0,0,0,0,0,0,2,0] [0,0,0,0,0,0,0,0,0,0,0,2,2] .... [0,0,1,1,1,1,1,1,1,1,1,1,1] [0,1,1,1,1,1,1,1,1,1,1,1,1] [1,1,1,1,1,1,1,1,1,1,1,1,1] ... [1,1,2,2,2,2,2,2,2,2,2,2,2] [1,2,2,2,2,2,2,2,2,2,2,2,2] [2,2,2,2,2,2,2,2,2,2,2,2,2] 

Thank you very much! I would like to implement it in a general way, I mean not only for this matrix, but also for each matrix that I could use with

+5
source share
1 answer

What you are looking for basically lists all the vectors in the H core. To avoid wheel reuse, you need to find a Java linear algebra library that supports linear field systems on finite fields (which excludes most of the popular Java linear algebra libraries).

I searched for the "finite fields of linear Java algebra" and found this library: JLinAlg , which claims to support it.

All you have to do is find the basis for the H core; after that, the enumeration is simply a matter of enumerating all linear combinations (coordinates) in this basis.

I would go for the org.jlinalg.LinSysSolver#solutionSpace() method, which gives AffineSubSpace , which has the generatingSystem() method, which gives you the desired foundation.

+2
source

All Articles