We can "travel" on all the vector space $V =GF(2)^n$ by doing the following
(a) choose a primitive polynomial $P(t)$ of degree $n$ over $GF(2)$.
(b) change vector $ X = (x_1, \ldots,x_{n-1}) \in V$ into vector $Y = (y_1, \ldots, y_{n-1}) \in V$.
(c) repeat until $V$ is exhausted (2^n times)
where
$y_1+y_2z+ \cdots + y_nz^{n-1} = z(x_1+x_2z+ \cdots + x_nz^{n-1})$
and $z$ is a zero of $P$, i.e., $P(z)=0.$
I want to do the same with integral vectors containing only 1 and -1
I.e.: "travel" on all possible vectors $(r_1, \ldots, r_{n-1})$
with $r_i^2=1$
How to do that ???
I do some trys without success...
reason of the question: I have only limited time on a computer ((five days per job, two jobs allowed)) and I need to try some computations on all such vectors with moderately large $n$
the loop:
from r_1=-1 to 1 by 2 do;
from r_2=-1 to 1 by 2 do
$\cdots$
from r_{n-1}=-1 to 1 by 2 do;
do not "fit" in my allowed time.
following suggestion (thanks) let consider the following:
I need to examine each of the $2^n$ vectors.
To fit time allowed suffices to break the $2^n$ in smaller parts and apply to each of them the method I am asking for here !
I tried:
(a) $r_i \in \{−1,1\}$ go to $si=(r_i+1)/2$ in $\{0,1\}$
(b) apply idea with primitive polynomial, to the $s_i$'s
(So forced to take some reduction modulo $2$ in some coordinates)
(c) recover $R_j$ the new $r_j$, by $R_j=2s_j−1$
so that from vector
$(r_1,…,r_n)$ we get new vector $(R_1,…,R_n)$
and applying this $2^n$ times we should (hopefully) get all the $2^n$ vectors
but this does NOT work since I ended, e.g. to the cycle
$(−1,−1,…,−1)$ going to itself indefinitely
In other words: Can I write these $2^n$ vectors as a sequence
$v_1,…,v_{2^n}$ in such a manner
that I can with some simple algebraic computation,
(similar to the use of the primitive polynomial in case the vectors are in $GF(2)^n$))
get the vector
$v_k$ from the vector $v_{k−1}$
beginning with any fixed vector
$v_1$
???