We have ternary (3,9,2) code called $C$. I know that such a code does exist. What I have trouble with is writing down all the code-words of $C$.
I know that the first two digits in each code-word can be represented by $(F_{3})^{2}$. These have distance = 1.
I now need to show that by adding an additional digit to the code-words of length 2 above, I can get a set of code-words of length 3, with $d(C)\geq2$.
What I am asking is, how does one choose that last digit to satisfy $d(C) \geq2$ for each code-word?
I end up doing it through trial and error, but that is time consuming and I'm sure there is a better and more efficient way to write these code-words down? For instance, how would a programmer go about generating this code above?
Thanks