So I have a list of codewords. The codewords have length 64, so there are 64 codewords in my code. My code is over an alphabet of 4 (the code can be thought of as having four elements $0,1,2,3$ and operations over mod4).
Think of the codewords as vectors of length 6.
I want to find a list of vectors $V$ which, when multiplied with each of the specified codewords $c \in C$, gives $0$.
i.e $V=$ { $v \text{ }| \text{ } v.c=0 \text{ }\forall \text{} c \in C$ }
I figured that $V$ must consist of all the tuples of length 6 over the four-symbol alphabet:
tuples=Tuples[{0,1,2,3}, 6]
I then created a table of values storing the result of each tuple being multiplied (dot product) by each codeword
table=Table[tuples[[i]].codewords[[j]], {i,1,Length[tuples]}, {j,1,Length[codewords]}]
I then attempted to iterate through the table and if there are any entries of 64 zeroes, then we store the tuple corresponding that those zeroes in $V$
If[Total[table[[#]]]==0, tuples[[#]], Nothing]
However, I think this is far too big for mathematica to handle. It keeps crashing. Is there any way of condensing this, or not iterating over everything so that I can find $V$?
Note, I actually constructed my code over GF[4] using the finite fields package, however, my problem is just with the largeness of the dataset of tuples over a four letter alphabet of length 6, so the bones of the question remain the same if you assume it is just a code over mod4 consisting of {0,1,2,3}
NullSpace
of the list of codewords and pick the vectors in the null space that consist only of elements 0,1,2, or 3? $\endgroup$codewords=RandomChoice[Range[4],{64,6}]; Solve[Thread[Array[a,6].#&/@codewords==0],Array[a,6],Integers]
, the only solution found is a vector of zeroes. How am I misunderstanding your question? Can you add a (small) sample of your codewords together with a possible solution? $\endgroup$