Let`s define ternary ECC as a code that its codewords can be defined by $ \{ xyz f(y,z) f(x,z) f(x,y) | x,y,z \in \{0,1\}^m \} $ for some function $f$. $f$ returns bitstring of constant length. 


Are there any known good error correction codes that are ternary? 


Such a family of LDPC codes would be best.


Is there a reason it won't be good(in terms of distance, rate)? 


It might be useful in a construction I have. I just wanted to make sure it is not known already before I dive in.


Thanks



Ternary error correction codes
Well, if the function $f$ has range $GF(2)^m$, represented by $GF(2^m)$ if convenient, it has rate 1/2. Such a function can really control symbol ($GF(2^m)$ ) not bit errors so it is a code over $GF(2^m)$ of length $n=6$ and rate 1/2 (dimension 3). If the code is MDS [best possible] it has symbol distance at most $n-k+1=6-3+1,$ 4, so could correct double symbol errors.


A Reed-Solomon code would achieve this, and is the optimal such code. But we do need $2^m+1\geq n=6,$ (since Reed Solomon codes are essentially evaluation codes) so $m$ would have to be at least 3.


**Edit:** If $f$ maps into $GF(2)$ as suggested by Gerry Myerson, then this is a single error correcting code with $n=3m+3$ and $3$ parity checks. If $3m+3=2^n-1,$ then a Hamming code will do, and no fancy $f$ could do better.


