Given the check matrix
$$ B =\begin{bmatrix}1&0&0&1&0\\0&1&0&0&1\\0&0&1&1&1\end{bmatrix} $$
I need to solve the binary linear equation to 0 to obtain the basis for the linear code $C$, but I'm getting the wrong answer.
The answer should be:
$$ C = ~<\begin{bmatrix}1\\0\\1\\1\\0\end{bmatrix}, \begin{bmatrix}0\\1\\1\\0\\1\end{bmatrix}> $$
How do I solve B properly?
Put $r := x_4$ and $s := x_5$. You have $x_3+x_4+x_5 = 0$, hence $x_3 = -x_4-x_5 = -r-s = r+s$ (the latter is because we are binary). Also, $x_2+x_5 = 0$, hence $x_2 = -s = s$. Finally, $x_1+x_4 = 0$, i.e., $x_1 = -r = r$. Therefore, the solution writes as $$ x = \begin{pmatrix}x_1\\x_2\\x_3\\x_4\\x_5\end{pmatrix} = \begin{pmatrix}r\\s\\r+s\\r\\s\end{pmatrix} = r\begin{pmatrix}1\\0\\1\\1\\0\end{pmatrix} + s\begin{pmatrix}0\\1\\1\\0\\1\end{pmatrix}. $$