© 1998 by British Computer Society
Detecting Substitutions and Transpositions of Characters
Department of Electrical and Computer Engineering, University of California, Davis, CA 95616, USA Email: ghaffar{at}ece.ucdavis.edu
Substitution errors, where individual characters are altered, and transposition errors, where two consecutive characters are interchanged, are commonly caused by human operators. In this paper, codes that detect a single substitution error or a single transposition error are studied. In particular, it is shown that such codes of length n over an alphabet of q characters have at most qn1 codewords if q
3 and at most [2n/3] codewords if q = 2. Codes which have that many codewords are called optimal codes. We present optimal codes for all values of n and q. Simple encoding techniques for these codes are also described.
Received October 22, 1997. revised May 11, 1998.