So I have this question.
let $${F_4} = \{0, 1 , x, x^2 | x^2 = x + 1 \}$$ Use Ham(3,4), with a parity-checkmatrix having columns in lexicographical order, to decode
(a) 1111111 1111111 1111111; (b) 1111111 xxxxxxx x^2 x^2 x^2 x^2 x^2 x^2 x^2
So the length, n=21, r=3 thus dimension, k=18
so the parity check matrix is a 3x21 matrix.
Now I do kind of know how to form the columns of the parity check matrix (columns are elements of V(3,4). no zero vector or vectors that are linear combinations of others) However the arbitrary values of X are really throwing me off.
This is my attempt of the parity check matrix however I am very confident I am wrong, I also only have 20 columns.
$$ \begin{matrix} 0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & x & x & x & x & \\ 0 & 1 & 1 & 1 & x & 0 & 0 & 0 & 0 & 1 & x & x^2 & 1 & 1 & 1 & x & 0 & 1 & 1 & 1 & \\ 1 & 0 & 1 & x & 1 & 0 & 1 & x & x^2 & 0 & 0 & 0 & 1 & x & x^2 & 1 & 1 & 0 & 1 & x^2 \\ \end{matrix} $$
Those $21$ columns should be pairwise linearly independent over $\Bbb{F}_4$. But, there are many ways to choose them, and you should specify the method used in your book. Below I describe two simple methods, the first one is explicit.
Those columns are vectors in $\Bbb{F}_4^3$, so we can really take one from each of the $21$ 1-dimensional subspace. A common way (that I also used in this old MSE answer) is to select the vectors with the first non-zero coefficient equal to one. That gives us a check matrix as follows. Observe that I prefer to denote by $\alpha$ the constant you denote by $x$. This is because it is naturally just the coset of $x$, i.e. $\alpha=x+\langle x^2+x+1\rangle$ in the quotient ring $\Bbb{F}_4=\Bbb{F}_2[x]/\langle x^2+x+1\rangle$. Anyway, one choice for a check matrix is thus $$ H=\left(\begin{array}{ccccccccccccccccccccc} 0&0&0&0&0&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\ 0&1&1&1&1&0&0&0&0&1&1&1&1&\alpha&\alpha&\alpha&\alpha&\alpha^2&\alpha^2&\alpha^2&\alpha^2\\ 1&0&1&\alpha&\alpha^2&0&1&\alpha&\alpha^2&0&1&\alpha&\alpha^2&0&1&\alpha&\alpha^2&0&1&\alpha&\alpha^2 \end{array}\right). $$ So you see that I normalized the first non-zero enty on each column to be equal to one. This makes it easy to generate the full set of $21$ pairwise linearly independent vectors.
Even though the order of columns I gave is quite natural, it is by no means the only sensible one, and to make any kind of progress you need to check it from your textbook. We cannot consult it here (and I probably won't have it on my shelf, so simply naming the book does not help much).
Anyway, my algebraist's heart would also warm to the following check matrix. Let $\beta$ be a primitive element of the bigger field $\Bbb{F}_{64}$. For example, we can pick $\beta$ to be a root of $x^6+x+1$. Unless I made a mistake, the minimal polynomial of $\beta$ over $\Bbb{F}_4$ is $m(x)=x^3+x^2+\alpha^2 x+\alpha$ assuming that we identify $\alpha$ with the element $\beta^5+\beta^4+\beta^3+\beta+1$. It is a quirk of finite fields that even though $\Bbb{F}_{64}$ has a unique subfield isomorphic to $\Bbb{F}_4$, there are two equivalent but different ways of identifying the individual elements.
We can then form a similarly useful check matrix $H$ by writing the powers $\beta^i, 0\le i<21$, w.r.t. some $\Bbb{F}_4$-basis of $\Bbb{F}_{64}$, for example, the basis $\{1,\beta,\beta^2\}$. We must stopo at the twentieth power because $\beta^{21}=\alpha$, so $\beta^0$ and $\beta^{21}$ are linearly dependent over $\Bbb{F}_4$. If we use such a check matrix, the resulting code will have the "near-cyclic" property that if $(c_0,c_1,\ldots, c_{20})$ is a codeword, then so is $(\alpha c_{20},c_0,c_1,\ldots,c_{19})$. Don't know if any textbook would do it this way.