# Ternary error correction codes

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

• Your question is not clear. Please give more details if you want appropriate answers. – Shahrooz Janbaz Mar 24 at 19:50
• I improved this, but let me know what is unclear, if it is still unclear. – user2679290 Mar 24 at 20:29
• Does $xy$ means the concatenation of $x$ and $y$? Please give an example for such codes and the function $f$ – Shahrooz Janbaz Mar 24 at 20:55
• This is an interesting question, but the choice of "ternary" seems unfortunate-- there's a already a whole literature on ternary ECCs, where "ternary" means "base-3". Your codes are binary with special structure. – Bill Bradley Mar 25 at 3:17
• The function $f$ is not defined. I guess it is any function of two variables where the input is a pair of binary words of length $m$ and the output is a binary word of length $m$. So the code words have lengths $6m$, the first half of a word is an arbitrary binary word of length $3m$ and the second half depends on $f$ and is for error checking. Then everything depends on $f$. For example if $f$ is a constant function, then the second halfs of the code words are the same and the usefulness of this code is doubtful. In general, using so many bits for error correcting seems excessive. – user6976 Mar 25 at 4:28

## 1 Answer

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.