Write down a parity-check matrix for the Hamming code Ham$(3, 3)$ and use it to decode the vector $0111111111111$

243 Views Asked by At

The solution I have been given is the following

$$H = \begin{pmatrix} 0&0&0&0&1&1&1&1&1&1&1&1&1\\0&1&1&1&0&0&0&1&1&1&2&2&2\\1&0&1&2&0&1&2&0&1&2&0&1&2\end{pmatrix}$$

The syndrome $S(011111111111111111) = 1(100)$ in $\mathbb{F}_3$. Thus we decode y as the codeword $111101111111111111$

I understand how to decode y but struggling to understand where the entries to the parity-check matrix come from?