• No results found

Error-Correcting Codes for Rank Modulation

In document Coding for Information Storage (Page 197-200)

11.1 Introduction

In flash memory, errors will occur due to charge leakage, write disturbance, and read disturbance.

In this chapter, we assume that small change happens more often as an error. In rank modulation, a small increase or decrease of a cell level will count as an error if its rank is interchanged with an adjacent rank.

If we write a permutation(p1, p2, . . . , pn)where pi represents the cell index with ranki, then another permutation is distance 1 from it if two adjacent indices pi, pi+1 are exchanged, for some 1 ≤ i ≤ n−1. For example, in Figure 11.1 an edge connects two permutations of distance one.

If an error occurs in(1, 2, 3), then the corrupted permutation is(2, 1, 3)or(1, 3, 2). Take any two permutations with distance 3 we have a 1-error-correction code. One can take(1, 2, 3),(3, 2, 1)as two legal codewords, for instance. If a single error occurs, one can always tell which codeword is closer to the corrupted word.

Figure 11.1: Permutations of length 3. Permutations of distance 1 are connected by an edge.

A ball of radius R centered at a word x is the collection of words with distance no more than R from x. If d(x, y)represents the distance between two wordsx, y, and letΩ be the space of all words, a ball is

BR(x) = {y∈ Ω : d(x, y) ≤R}.

Define an addition+operation on two words. For binary vectors, it can be viewed as bit-by-bit XOR and for permutations it is composition. Since the metrics we discuss here is translation invariant, or d(x, y) = d(x+a, y+a), the ball size only depends on the radius, not on the center. Therefore, BR(x) = BRfor any centerx. For an arbitrary block code, the sphere-packing bound is an upper bound on the number of codewords that is obtained by packing balls in a certain metric into the space of all possible words [MS77]. LetC be at-error-correction code then

|C| ≤ ||

|Bt|.

The reason to have t as the radius is that we need to be able to distinguish between erroneous versions of codewords aftert errors. For example, in Figure 11.1 the ball size of radius 1 isB1 =3 and the space size isΩ = 6. Therefore, the sphere-packing bound is|C| ≤ 63 = 2 and we can actually achieve this bound. We say a code satisfying equality of the bound is a perfect code. For t =1 error-correction permutation codes, the sphere-packing bound is [JSB08]:

|C| ≤ n!

n = (n−1)!.

In this chapter, we propose a class oft-error-correction codes (ECC) that reduces the permuta-tions to ECC of alphabet size t+1 and Hamming distance. In particular, for rank modulation of sizen = 2r, we have a 1-error-correction code of size(n−1)!/2, that is half the sphere-packing bound.

The error model for rank modulation in flash memory was first proposed in [JSB08] from where we borrowed some results and methods. In [BM10] capacity for the full range of minimum distance O(n1+e),0 ≤ e≤ 1, was derived. This result mainly focused on the case with a large number of errors. For constantt errors, it provides an almost explicit construction which matches the sphere-packing bound except for a constant depending ont, which is similar to the parameters of our work.

The only drawback is that it is not entirely explicit. In [ZJB12] systematic error-correction codes were proposed where some subset of the cells contain only and completely the information message.

We will start with some definitions, and then show constructions of 1-error-correcting codes on rank modulation. After that, we generalize it to correctingt errors.

11.2 Definitions

In this chapter, we consider error-correcting codes for rank modulation ofn elements,{1, 2, . . . , n}. An error is defined as a transposition of adjacent elements, i.e., when (p1, . . . , pi, pi+1, . . . , pn) is changed into (p1, . . . , pi+1, pi, . . . , pn) for some 1 ≤ i ≤ n−1. The distance between two permutations is defined as the smallest number of adjacent transpositions such that one is changed into the other. This distance measure is in fact Kendall’s τ-distance [KG90]. In flash memory cells, an error corresponds to a fluctuation in the charge level of some cell, such that it interchanged rank with a cell with close charge level.

For example, suppose there aren=5 cells and their analog charge values are(1.5, 5.2, 0.3, 4.9, 7.8), and the induced permutation is (5, 2, 4, 1, 3). Suppose the fifth cell experiences some charge leakage and drops its value from7.8 to 5.1. As a result, the corrupted permutation becomes(2, 5, 4, 1, 3)and we say there is 1 error in this permutation.

The main idea in the construction in this chapter is to reduce a permutation to a n−1 digit t+1-ary vector and t correct errors for this vector.

Define coordinates (vn, vn1, . . . , v2) of a permutation (p1, . . . , pi, pi+1, . . . , pn), where vi equals the number of inversions(i, j)such thatj is on the right of i in the permutation and 1≤j<i.

It is easy to see that0 ≤ vi ≤ i−1 and [JSB10] showed the mapping between coordinates and permutations is a bijection. Also define the coordinate sum ass = ni=2vi. Define the coordinate paritiesof a permutation asu= (un, un1, . . . , u2) = (vn, vn1, . . . , v2)mod 2. In general, define the congruent coordinates asu= (un, un1, . . . , u2) = (vn, vn1, . . . , v2)modq for some integer q.

For example, if the permutation is (4, 2, 3, 1)then the coordinates are(3, 1, 1)and its parities areu= (1, 1, 1).

Consider twoq-ary vectors a = (a1, a2, . . . , an), b = (b1, b2, . . . , bn)with ai, bi ∈ [0, q−1] for alli. Then the Hamming distance between the two vectors is defined as the number of indices where they differ, namely,

{i∈ [n]: ai 6=bi}.

The Lee distance of two vectorsa, b is defined as

n i=1

min{|ai−bi|, q− |ai−bi|}.

It indicates the difference with wrap around in the magnitude of two vectors. Since Kendall’s τ distance is not very easy to work with directly, we will transform the problem of error correction to either Hamming distance or Lee distance in the coordinates.

Suppose we fix a distance measure. The minimum distance of a code is the minimum distance of all pairs of codewords. A code correctst errors if the minimum distance is at least 2t+1 [MS77].

We denote the parameters of a code by(n, k, d)wheren is the codeword length, k is the number of information digits, or systematic digits, andd is the minimum distance. The number of redundant digits, or parity digits is r = n−k. Moreover, we mainly consider systematic codes, where the information are stored ink digits and can be obtained easily.

11.3 Correcting One Error

We start with an observation on the coordinates in case of an error.

Lemma 11.1 Supposepi andpi+1 are interchanged in the permutation(p1, . . . , pi, pi+1, . . . , pn), then all the coordinates stay the same except that eithervpi+1 increases by 1 orvpi decreases by 1.

Therefore, the sums changes by 1 if an error occurs.

Proof: First notice interchanging pi andpi+1 will not affect the number of inversions forvj, j6=i, i+1. If pi < pi+1, thenvpi+1 increases by 1 because we have one more inversion(pi+1, pi) forvpi+1 andvpi stays the same. Similarly, ifpi > pi+1, thenvpi decreases by 1 andvpi+1 stays the same.

By the above lemma, if an error occurs and pi and pi+1 are interchanged, then the coordinate parity bitui flips when the coordinate sums decreases by 1; ui+1flips whens increases by 1. Now suppose we have a way to correct 1 error for u, and we only allow codewords as permutations whose coordinate sum satisfiess|4 or(s−1)|4. If there is an error, s is changed to s0 = s+1 or s0 = s−1. We can first identify the flipped position i from the 1-error-correction code. Then if (s0−1)|4 (or(s0−2)|4), then we knows0 = s+1, s|4 (or(s−1)|4, resp.), and pi1 andpi are interchanged. Similarly, ifs0|4 or(s0−3)|4, we know s0 =s−1 and piandpi+1are interchanged.

Thus, we have the following theorem.

In document Coding for Information Storage (Page 197-200)