Hamming code of length $15$. How many code words are there? Which of the following are code words?

469 Views Asked by At

Hi I'm trying to solve this problem but have some difficulty.

Write down a check matrix for the Hamming code of length $15$. How many code words are there? Assuming that the columns of your matrix are ordered in the natural order, which of the following are codewords?

$c_1 =011010110111000$

$c_2 = 00000000000011$

$c_3 =110110110111111$

I found a very similar question here at the forum: Parity Check Matrix From Hamming code length 15

From that I was pretty much handed the Check matrix (assuming it was right).

$H = \begin{bmatrix}0&0&0&0&0&0&0&1&1&1&1&1&1&1&1\\0&0&0&1&1&1&1&0&0&0&0&1&1&1&1&\\0&1&1&0&0&1&1&0&0&1&1&0&0&1&1\\1&0&1&0&1&0&1&0&1&0&1&0&1&0&1\end{bmatrix}$

My first question would be: why does this constitute a Check matrix?

Second I need to find the number of code words there are. I know that the solution is given by $2^k$ where $k$ is the dimension, but how do I get that from the check matrix?

Thirdly, in order to see if $c_i$ is a word I have the following to rely on: $s:=Hy^T$, $He^T=s$, decode by $y+e$ $(mod$ $2)$.

For the first word I get: $Hy^T=\begin{bmatrix}0&1&1&0\end{bmatrix}$, the sixth column in the check matrix. Thus $e=\begin{bmatrix}0&0&0&0&0&0&0&0&0&0&0&1&0&0&1\end{bmatrix}$. Now $e+y$ $(mod$ $2)$ is $\begin{bmatrix}0&1&1&0&1&0&1&1&0&1&1&0&0&0&1\end{bmatrix}$. Frome here I don't know how to proceed in order to show that $c_1$ is a code word. Help, please.