Presentation is loading. Please wait.

Presentation is loading. Please wait.

236601 - Coding and Algorithms for Memories Lecture 8 1.

Similar presentations


Presentation on theme: "236601 - Coding and Algorithms for Memories Lecture 8 1."— Presentation transcript:

1 236601 - Coding and Algorithms for Memories Lecture 8 1

2 Flash Memory Cell 1 0 3 2 Can only add water (charge) 2

3 The Leakage Problem 1 0 3 2 Error! 3

4 The Overshooting Problem 1 0 3 2 Need to erase the whole block 4

5 Possible Solution – Iterative Programming Slow… 1 0 3 2 5

6 Relative Vs. Absolute Values 01 Less errors More retention Jiang, Mateescu, Schwartz, Bruck, “Rank modulation for Flash Memories”, 2008 6

7 The New Paradigm Rank Modulation Absolute values  Relative values Single cell  Multiple cells Physical cell  Logical cell 7

8 Rank Modulation 3 2 1 4 1234 Ordered set of n cells Assume discrete levels Relative levels define a permutation Basic operation: push-to-the-top Overshoot is not a concern Writing is much faster Increased reliability (data retention) 8

9 New Number Representation System permutation in lexicographical order [Lehmer 1906, Laisant 1888] FACTORADIC decimal a n-1 …a 3 a 2 a 1 = a n-1 ·(n-1)! + … + a 3 ·3! + a 2 ·2! + a 1 ·1! 0 ≤ a i ≤ i 0 1 2 0 2 1 1 0 2 1 2 0 2 0 1 2 1 0 0 0 1 1 0 1 2 0 2 1 012345012345 9

10 231231 312312 123123 132132 213213 321321 Gray Codes for Rank Modulation Find cycle through n! states by push-to-the-top transitions 231231 312312 123123 132132 213213 321321 Transition graph, n=3 n=3 3 cycles 2 3 1 123 The problem: Is it possible to transition between all permutations? 10

11 Gray Codes for Arbitrary n Recursive construction: – Keep bottom cell fixed – (n-1)! transitions with others 1234 4 ~ (n-1)! 2 3 1 231231 312312 123123 132132 213213 321321 11 1 3 2 3 1 2 2 1 3 2 3 1 3 2 1 1 2 3 4 4 4 4 1 2 1 4 2 2 4 1 2 1 4 1 2 4 4 2 1 3 3 3 3 4 2 4 3 2 2 3 4 2 4 3 4 2 3 3 2 4 1 1 1

12 Gray Codes for Arbitrary n 1 3 2 3 1 2 2 1 3 2 3 1 3 2 1 1 2 3 4 4 4 4 1 2 1 4 2 2 4 1 2 1 4 1 2 4 4 2 1 3 3 3 3 4 2 4 3 2 2 3 4 2 4 3 4 2 3 3 2 4 1 1 1 4 1 3 4 3 1 1 4 1 3 4 3 3 3 4 1 1 4 2 2 2 12

13 3 2 1 4 2 3 1 4 3 2 4 1 13

14  2134  2143 Kendall’s Tau Distance For a permutation  an adjacent transposition is the local exchange of two adjacent elements For ,π ∊ S m, d τ ( ,π) is the Kendall’s tau distance between  and π = Number of adjacent transpositions to change  to be π  =2413 and π=2314 2413 d τ ( ,π) = 3 It is called also the bubble-sort distance Lemma: Kendall’s tau distance induces a metric on S n The Kendall’s tau distance is the number of pairs that do not agree in their order  2143  2134  2314 14

15 Kendall’s Tau Distance Lemma: Kendall’s tau distance induces a metric on S n The Kendall’s tau distance is the number of pairs that do not agree in their order For a permutation , W τ (  ) = {(i,j) | i  -1 (i) } Lemma: d τ ( ,π)= |W τ (  )  W τ (π)| = |W τ (  )\W τ (π)| + |W τ (π)\W τ (  )| d τ ( ,id) = |W τ (  )| The maximum Kendall’s tau distance is n(n-1)/2 The inversion vector of  is x  =(x  (2),…,x  (n)) x  (i) = # of elements to the right of i and are less then i d τ ( ,id) = |W τ (  )| = Σ 2≤i≤n x  (i) 15

16 Kendall’s Tau Distance The Kendall’s tau ball: B r (  ) = {π|d τ ( ,π) ≤ r} The Kendall’s tau sphere: S r (  ) = {π|d τ ( ,π) = r} They do not depend on the center  |B 1 (  )| = n, |S 1 (  )| = n-1 16

17 How to Construct ECCs for the Kendall’s Tau Distance? Goal: Construct codes with some prescribed min Kendall’s tau dist d 17

18 ECCs for Kendall’s Tau Distance Goal: Construct codes correcting a single error Assume k or k+1 is prime Encode a permutation in S k to a permutation in S k+2 A code over S k+2 with k! codewords – s=(s 1,…s k ) S k is the information permutation – set the locations of k+1 Z k+1 and k+2 Z k+2 to be loc(k+1) = Σ 1 k (2i-1)s i (mod m) loc(k+2) = Σ 1 k (2i-1) 2 s i (mod m) m=k if k is prime and m=k+1 is k+1 is prime Ex: k=7, s=(7613245) loc(8) = 1  7+3  6+5  1+7  3+9  2+11  4+13  5 = 3 (mod 7) loc(9) = 1 2  7+3 2  6+5 2  1+7 2  3+9 2  2+11 2  4+13 2  5 = 2 (mod 7) E(s) = (769183245) 18

19 ECCs for Kendall’s Tau Distance A code over S k+2 with k! codewords – s=(s 1,…s k ) S k is the information permutation – set the locations of k+1 Z k+1 and k+2 Z k+2 to be loc(k+1) = Σ 1 k (2i-1)s i (mod m) loc(k+2) = Σ 1 k (2i-1) 2 s i (mod m) m=k if k is prime and m=k+1 is k+1 is prime Ex: k=3, m=3 123 => 15423 ; loc(4)=1  1+3  2+5  3=1(mod3), loc(5)=1  1+9  2+25  3=1(mod3) 132 => 13542 ; loc(4)=1  1+3  3+5  2=2(mod3), loc(5)=1  1+9  3+25  2=2(mod3) 213 => 21543 ; loc(4)=1  2+3  1+5  3=2(mod3), loc(5)=1  2+9  1+25  3=2(mod3) 231 => 52431 ; loc(4)=1  2+3  3+5  1=1(mod3), loc(5)=1  2+9  3+25  1=0(mod3) 312 => 34512 ; loc(4)=1  3+3  1+5  2=1(mod3), loc(5)=1  3+9  1+25  2=2(mod3) 321 => 35241 ; loc(4)=1  3+3  2+5  1=2(mod3), loc(5)=1  3+9  2+25  1=1(mod3) 19

20 ECCs for Kendall’s Tau Distance A code over S k+2 with k! codewords – s=(s 1,…s k ) S k is the information permutation – set the locations of k+1 Z k+1 and k+2 Z k+2 to be loc(k+1) = Σ 1 k (2i-1)s i (mod m); loc(k+2) = Σ 1 k (2i-1) 2 s i (mod m) Theorem: This code can correct a single Kendall’s tau error. Proof: Enough to show that the Kendall’s tau distance between every two codewords is at least 3 – s=(s 1,…s k ) S k, u=E(s); t=(t 1,…t k ) S k, v=E(t) – If d τ (s,t)≥3 then d τ (u,v)≥3 ✔ – If d τ (s,t)=1, write t=(s 1,…s i+1,s i …s k ), let δ = s i+1 -s i loc s (k+1)-loc t (k+1)=(2i-1)s i +(2i+1)s i+1 –(2i-1)s i+1 -(2i+1)s i =2s i+1 -2s i =2δ(mod k) thus, they are not positioned in the same location. ✔ loc s (k+2)-loc t (k+2)=(2i-1) 2 s i +(2i+1) 2 s i+1 –(2i-1) 2 s i+1 -(2i+1) 2 s i =8is i+1 -8is i =8iδ(mod k) thus, they are not positioned in the same location either ✔. 20

21 ECCs for Kendall’s Tau Distance Proof (cont): – s=(s 1,…s k ) S k, u=E(s); t=(t 1,…t k ) S k, v=E(t) – If d τ (s,t)=1, write t=(s 1,…s i+1,s i …s k ), let δ = s i+1 -s i loc s (k+1)-loc t (k+1)=(2i-1)s i +(2i+1)s i+1 –(2i-1)s i+1 -(2i+1)s i =2s i+1 -2s i =2δ(mod k) thus, they are not positioned in the same location. ✔ loc s (k+2)-loc t (k+2)=(2i-1) 2 s i +(2i+1) 2 s i+1 –(2i-1) 2 s i+1 -(2i+1) 2 s i =8is i+1 -8is i =8iδ(mod k) thus, they are not positioned in the same location either ✔. – If d τ (s,t)=2, write t=(s 1,…,s i+1,s i,…,s i+1,s i,…,s k ), δ 1 =s i+1 -s i, δ 2 =s j+1 -s j loc s (k+1)-loc t (k+1)=2(δ 1 +δ 2 )(mod k) loc s (k+2)-loc t (k+2)=8iδ 1 +8jδ 2 (mod k) If δ 1 +δ 2 is NOT a multiple of k then k+1 appears in different locations ✔ Otherwise, δ 2 =-δ 1 (mod k) and loc s (k+2)-loc t (k+2)=8(i–j)δ 1 (mod k), so k+2 appears in different locations ✔ – If d τ (s,t)=2, write t=(s 1,…,s i+2,s i,s i+1,…,s k ) loc s (k+1)-loc t (k+1)=(2i-1)s i +(2i+1)s i+1 +(2i+3)s i+2 -(2i-1)s i+2 -(2i+1)s i -(2i+3)s i+1 ) =4s i+2 -2s i+1 -2s i (mod k) loc s (k+2)-loc t (k+2)=8((2i+1)s i+2 -(i+1)s i+1 -is i )(mod k) 21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38


Download ppt "236601 - Coding and Algorithms for Memories Lecture 8 1."

Similar presentations


Ads by Google