Snake-in-the-box code is a Gray code which is capable of detecting a single error. Gray codes are important in the context of the rank modulation scheme which was suggested recently for representing information in flash memories. For a Gray code in this scheme the codewords are permutations, two consecutive codewords are obtained by using the “push-to-the-top” operation, and the distance measure is defined on permutations. In this paper the Kendall’s -metric is used as the distance measure. We present a general method for constructing such Gray codes. We apply the method recursively to obtain a snake of length for permutations of , from a snake of length for permutations of~. Thus, we have , improving on the previous known ratio of $\lim\limits_{n\to \infty} \frac{1}{\sqrt{\pi n}}$. By using the general method we also present a direct construction. This direct construction is based on necklaces and it might yield snakes of length for permutations of . The direct construction was applied successfully for and , and hence .

生成讲解博客的中文版本

生成AI智能校验的中文版本