I have 3 matrices(M1, M2, M3) in modulo 2. I want to find non trivial vectors v, b1, b2, b3 such that if M1 x v = b1, then if b1[i] = 1, v[i] is 1. And this should hold simultaneously for all M1, M2, and M3. All M1, M2, M3 are invertible. Is there a better way than random trials? The size of these matrices is 32 x 32.
Edit 1: b is variable.
Edit 2: Non trivial.
Edit 3: if I'm able to find a solution with low hamming weight for v, it would be better. The time complexity of my final task somehow depends on the hamming weight of v.
A non-trivial solution, let $v$ be the all one vector, $e$, from there, evaluate $M_iv=b_i$.
Solution before the non-trivial condition is imposed:
If $b$ is a variable, then $v=b=0$ is a solution.
Solution before the edit with the setting that $b$ is given:
If you want to solve $M_i v = b_i \forall i \in \{1, 2, 3\}$ with the condition that $v_i=1$ whenever $b_i=1$.
Go through $b_i$, and note down the indices when $b_i=1$, call the index set $I_i$, let $I=I_1 \cup I_2 \cup I_3$, for any index $i\in I$, we already know that $v_i=1$.
Let $J$ and $I$ be partition of $\{1, \ldots, n\}$ and we separate the index of columns of $M_i$ as $M_{iI}$ and $M_{iJ}$. Similarly for $v$. After reordering, we can write $$M_iv=b_i,\forall i \in \{1, 2, 3\}$$
as $$M_{iJ}v_J+\sum_{j \in I}M_{ij}=b_i,\forall i \in \{1, 2, 3\}$$
which is equivalent to
$$M_{iJ}v_J=b_i-\sum_{j \in I}M_{ij},\forall i \in \{1, 2, 3\}$$
We can view it as a matrix form:
$$\begin{bmatrix} M_{1J} \\ M_{2J} \\ M_{3J}\end{bmatrix}v_J= \begin{bmatrix} b_1-\sum_{j \in I}M_{1j} \\ b_2-\sum_{j \in I}M_{2j}\\ b_3-\sum_{j \in I}M_{3j}\end{bmatrix}$$
Now, you can use Gaussian eliminatin to solve for a solution.
Remark: All operations are modulo $2$ operations.