Floating Codes for Joint Information Storage in Write Asymmetric Memories



Similar documents
In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

Soving Recurrence Relations

Department of Computer Science, University of Otago

CS100: Introduction to Computer Science

CS100: Introduction to Computer Science

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

Asymptotic Growth of Functions

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth

Domain 1: Designing a SQL Server Instance and a Database Solution

CS103X: Discrete Structures Homework 4 Solutions

5 Boolean Decision Trees (February 11)

Sequences and Series

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT

CHAPTER 3 DIGITAL CODING OF SIGNALS

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

Your organization has a Class B IP address of Before you implement subnetting, the Network ID and Host ID are divided as follows:

A probabilistic proof of a binomial identity

Incremental calculation of weighted mean and variance

Annuities Under Random Rates of Interest II By Abraham Zaks. Technion I.I.T. Haifa ISRAEL and Haifa University Haifa ISRAEL.

I. Chi-squared Distributions

Exploratory Data Analysis

Research Article Sign Data Derivative Recovery

LECTURE 13: Cross-validation

Engineering Data Management

Measures of Spread and Boxplots Discrete Math, Section 9.4

Modified Line Search Method for Global Optimization

CHAPTER 3 THE TIME VALUE OF MONEY

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

1 Computing the Standard Deviation of Sample Means

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Factors of sums of powers of binomial coefficients

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Overview on S-Box Design Principles

Infinite Sequences and Series

A Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.


A Secure Implementation of Java Inner Classes

(VCP-310)

The analysis of the Cournot oligopoly model considering the subjective motive in the strategy selection

3. Greatest Common Divisor - Least Common Multiple

THE HEIGHT OF q-binary SEARCH TREES

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

Chapter 7 Methods of Finding Estimators

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized?

Output Analysis (2, Chapters 10 &11 Law)

Lecture 2: Karger s Min Cut Algorithm

Basic Elements of Arithmetic Sequences and Series

Convexity, Inequalities, and Norms

Domain 1 - Describe Cisco VoIP Implementations

1. Introduction. Scheduling Theory

Universal coding for classes of sources

Chapter 5 Unit 1. IET 350 Engineering Economics. Learning Objectives Chapter 5. Learning Objectives Unit 1. Annual Amount and Gradient Functions

Properties of MLE: consistency, asymptotic normality. Fisher information.

2-3 The Remainder and Factor Theorems

Professional Networking

1. MATHEMATICAL INDUCTION

Domain 1: Configuring Domain Name System (DNS) for Active Directory

7.1 Finding Rational Solutions of Polynomial Equations

Determining the sample size

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return

Desktop Management. Desktop Management Tools

1 The Gaussian channel

How To Solve The Homewor Problem Beautifully

Permutations, the Parity Theorem, and Determinants

INVESTMENT PERFORMANCE COUNCIL (IPC) Guidance Statement on Calculation Methodology

Multiplexers and Demultiplexers

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments

The Forgotten Middle. research readiness results. Executive Summary

hp calculators HP 12C Statistics - average and standard deviation Average and standard deviation concepts HP12C average and standard deviation

ODBC. Getting Started With Sage Timberline Office ODBC

Trigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE The absolute value of the complex number z a bi is

Definition. A variable X that takes on values X 1, X 2, X 3,...X k with respective frequencies f 1, f 2, f 3,...f k has mean

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

Chapter 7: Confidence Interval and Sample Size

WHEN IS THE (CO)SINE OF A RATIONAL ANGLE EQUAL TO A RATIONAL NUMBER?

INVESTMENT PERFORMANCE COUNCIL (IPC)

Listing terms of a finite sequence List all of the terms of each finite sequence. a) a n n 2 for 1 n 5 1 b) a n for 1 n 4 n 2

The Stable Marriage Problem

Automatic Tuning for FOREX Trading System Using Fuzzy Time Series

Confidence Intervals for One Mean


Chapter 5: Inner Product Spaces

FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix

Hypothesis testing. Null and alternative hypotheses

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 8

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

TruStore: The storage. system that grows with you. Machine Tools / Power Tools Laser Technology / Electronics Medical Technology

Baan Service Master Data Management

Transcription:

Floatig Codes for Joit Iformatio Storage i Write Asymmetric Memories Axiao (Adrew Jiag Computer Sciece Departmet Texas A&M Uiversity College Statio, TX 77843-311 ajiag@cs.tamu.edu Vaske Bohossia Electrical Egieerig Departmet Califoria Istitute of Techology Pasadea, CA 9115 vicet@paradise.caltech.edu Jehoshua Bruck Electrical Egieerig Departmet Califoria Istitute of Techology Pasadea, CA 9115 bruck@paradise.caltech.edu Abstract Memories whose storage cells trasit irreversibly betwee states have bee commo sice the start of the data storage techology. I recet years, flash memories ad other o-volatile memories based o floatig-gate cells have become a very importat family of such memories. We model them by the Write Asymmetric Memory (WAM, a memory where each cell is i oe of q states state 0, 1,, q 1 ad ca oly trasit from a lower state to a higher state. Data stored i a WAM ca be rewritte by shiftig the cells to higher states. Sice the state trasitio is irreversible, the umber of times of rewritig is limited. Whe multiple variables are stored i a WAM, we study codes, which we call floatig codes, that maximize the total umber of times the variables ca be writte ad rewritte. I this paper, we preset several families of floatig codes that either are optimal, or approach optimality as the codes get loger. We also preset bouds to the performace of geeral floatig codes. The results show that floatig codes ca itegrate the rewritig capabilities of differet variables to a surprisigly high degree. I. INTRODUCTION Memories whose storage cells trasit irreversibly betwee states have bee commo sice the begiig of the data storage techology. Examples iclude puch cards ad digital optical discs, where a cell ca chage from a 0-state to a 1- state but ot vice versa. I recet years, flash memories ad some other o-volatile memories based o floatig-gate cells have become a very importat family of such memories. They have good properties icludig high data desity, fast readig time, physical robustess, etc., ad have bee widely used i mobile, mass as well as stadard storage devices. We use flash memories as a typical example to explai the basic storage mechaisms based o floatig-gate cells. A flash memory cosists of floatig-gate cells as its basic storage elemets. I most products, a cell has two states; but to icrease data desity, multi-level storage (where a cell has 4 to 56 or eve more states is beig developed. For a cell with q states, we deote its states by 0, 1,, q 1. To write (program a cell, the hot-electro ijectio mechaism or the Fowler-Nordheim tuelig mechaism is used to iject electros ito the cell, where the electros become trapped. The umber of trapped electros i a cell determies the threshold voltage of the cell: the more electros, the higher the threshold voltage. The umber of trapped electros is chose to cocetrate aroud q discrete levels, correspodig to the q cell states. The state of a cell ca be read by measurig the threshold voltage. Programmig ad readig cells are fast; however, rewritig data is much more complex. Most of the time, it requires movig cells to lower states for rewritig data, which meas to remove electros from the cells. I flash memories, cells are orgaized ito blocks. A typical block usig biary cells stores 64, 18 or 56 kilobytes of data. Due to circuit complexity reasos, to rewrite, first the whole block has to be erased (which meas to lower all the cells of the block to the 0-state, the all the cells are reprogrammed. This happes eve if oly oe cell really eeds to lower its state for the rewritig, ad it leads to a writig speed about 10 5 times slower tha readig. Therefore, it will be very beeficial to desig codes for storig data such that the data ca be rewritte may times before the block has to be erased. Reducig the umber of block erasig operatios is critical ot oly for reducig the average rewritig time, but also for the flash memory s lifetime. Every erasig reduces the quality of cells, ad curretly, a flash memory s lifetime is bouded by about 10 5 program-erase cycles. Although techically speakig, a cell ca retur to a lower state through block erasig, i this paper, we are iterested i the writig ad rewritig of data betwee two block erasig operatios. I that period, the cells ca oly go from lower states to higher states. We model the memories metioed above usig the followig Write Asymmetric Memory (WAM model. A WAM cosists of cells, where each cell has q states: state 0, 1,, q 1. Such a cell is called a q-ary cell. A cell ca go from state i to state j if ad oly if i < j. WAM is a straightforward geeralizatio of the Write Oce Memory (WOM model, firstly proposed by Rivest ad Shamir [10], where q =. WAM is also a special case of the Geeralized WOM model [3], where the state trasitio diagram of a cell ca be ay directed acyclic graph. Historically, there has bee research o WOM codes, where a sigle variable is stored i a WOM, ad the code eables it to be rewritte multiple times [10]. I practice, a memory stores may let s say k variables. If we wat to apply the codes to a memory, a simple approach is to partitio the memory ito k parts, where each part stores a variable idepedetly. This simple approach, however, has a serious limitatio. If the rewritig frequecies are very ouiform for the variables

commo i may applicatios the WAM becomes uusable very soo. For example, say that each storage part allows t times of rewritig of a variable. Oce oe of the k variables eeds rewritig for the (t+1-th time, the WAM ca o loger meet the requiremet, eve if the other k 1 variables have ot bee rewritte yet. Therefore, it will be very beeficial to itegrate the rewritig capabilities of the variables, so that the variables ca be rewritte may times regardless of what the rewritig sequece is. As we will show i this paper, such a itegratio is feasible, may times to a surprisigly high degree. We call the codes that achieve it the Floatig Codes. We formally defie the problem we study as follows. k variables are stored i a WAM, where each variable takes its value from a alphabet of size l: {0, 1,, l 1}. The WAM has q-ary cells. Iitially, all the cells are i the 0-state, ad all the variables have the default value 0. Each rewritig updates the value of oe variable. We use (v 1, v,, v k called the variable vector to deote the values of the k variables, where v i {0, 1,, l 1}. We use (c 1, c,, c called the cell state vector to deote the states of the cells, where c i {0, 1,, q 1}. A cell state vector (c 1, c,, c is said to be above aother cell state vector (c 1, c,, c if c i c i for all i. Whe the cells chage their states, they ca oly chage to a state vector above the curret oe. A floatig code has two fuctios, α : {0, 1,, q 1} {0, 1,, l 1} k, ad β : {0, 1,, q 1} {1,,, k} {0, 1,, l 1} {0, 1,, q 1}. Fuctio α maps each cell state vector to a variable vector, which is used to decode (iterpret the stored data. Fuctio β shows how to rewrite: give the curret cell state vector ad the iformatio o which of the k variables is to be updated to which ew value, the fuctio β outputs the ew cell state vector. The ew cell state vector should correspod to the ew values of the variables. A floatig code allowig t times of rewritig is a code that allows the variables to be rewritte at least t times i total, regardless of what the sequece of rewritig is. A fudametal objective of floatig codes is to maximize t. I the followig, we first preset a brief overview of the related work. The, we preset the costructios of several families of floatig codes, which either are optimal, or approach optimality as the codes get loger. We also preset upper ad lower bouds to t for geeral floatig codes. II. RELATED WORK WOM codes were first studied by Rivest, Shamir [10] et al., where a sigle variable is stored i a WOM ad ca be updated multiple times. Capacities of WOMs have bee studied [3] [4] [6] [8] [10] [11], ad multiple classes of codes have bee iveted. The majority of those codes are biary, ad they iclude tabular codes [10], liear codes [] [10], codes costructed usig Golay codes [] or projective geometries [9], etc. Besides WOM, costraied memories also iclude write efficiet memory (WEM, write uidirectioal memory (WUM ad write isolated memory (WIM [8]. There is o work we are aware of that addresses the use of codes for flash memories for icreasig the umber of (rewrites betwee two erasig operatios, useful for improvig writig speed ad prologig the memory lifetime. The use of error-correctig codes for improvig data reliability i flash memories has bee proposed i some works [1] [5]. III. AN OPTIMAL CODE FOR TWO BINARY VARIABLES I this sectio, we preset a floatig code for biary variables. That is, l =, so each variable has value 0 or 1. I flash memories, the 16 bits of a word are usually stored at the same positio of 16 parallel blocks. Cosequetly, a rewritig operatio o a word becomes the rewritig of a bit i a block. Therefore, it is importat to study the case of l =. The code we preset is for k =, l = ad arbitrary ad q. The code maximizes t, the umber of rewrites, ad is thus optimal. We prove the code s optimality by providig a geeral upper boud to t for floatig codes, which is ot limited to the case k =, l =. A. Optimal Floatig Code for k =, l = ad Arbitrary, q Three examples of the code are show i Fig. 1, correspodig to = 1, ad 3, respectively. We commet that = 1, are, i fact, degeerated cases; it is oly whe = 3 or more that the code reveals the full structure of its costructio. The umbers iside each circle are a cell state vector, while the bold umbers beside the circle are the correspodig variable vector. For example, i Fig. 1(a, the cell state vector (c 1 = (3 correspods to the variable vector (v 1, v = (0, 0; i Fig. 1(c, the cell state vector (c 1, c, c 3 = (1, 0, 0 correspods to the variable vector (v 1, v = (1, 0. The arrows leavig a cell state vector shows how the ext rewritig should be performed whe this cell state vector is the curret cell state vector. For example, for the code i Fig. 1(c, if the curret cell state vector is (1, 0, 0 ad the ew rewritig request is to chage the first variable to 0 (which meas to chage the variable vector from (1, 0 to (0, 0, the the cell state vector will become (1, 1, 0. Similarly, if the sequece of rewritig chages the variable vector as (0, 0 (1, 0 (1, 1 (0, 1 (ote that every rewritig chages the value of just oe variable, the cell state vector chages as (0, 0, 0 (1, 0, 0 (1, 0, 1 (1, 0, We defie the cell state vectors of the i-th geeratio to be the cell state vectors reachable after i times of rewritig. I Fig. 1, all the cell state vectors i the same geeratio are placed at the same horizotal level. For example, i Fig. 1(c, the cell state vectors i the d geeratio are (1, 1, 0, (1, 0, 1 ad (0, 1, 1. The codes i Fig. 1 are all for arbitrarily large q, ad they all have periodic patters; specifically, every code is a repetitio of the structure show i the dotted box labelled by oe period. To see how, otice that the first geeratio i the dotted box cotais two cell state vectors correspodig to two differet variable vectors, ad so is true for the geeratio of cell state vectors directly followig the dotted box; what s more, the latter two cell state vectors ca be obtaied from the former two cell state vectors by raisig every cell s state by. (For example, i Fig. 1(b, the former two cell state vectors are (1, 0 ad (0, 1; whe we raise every cell s state by,

q=7 q=5 q= 4,,4 3,3 5 6 (1,0 q=4 (1,0 (1,0 3,,3 3 4,1 1,, (1,0 (1,0,0 0, 1,1 1 q= (1,0 1,0 0,1 oe (1,0 0 period 0,0 (a,,0 3,,,3,,,1,1, 1,,,, (1,0 (1,0 (1,0,0, 0,,,1,1 1,,1,1,0 1,,0,0,1 1,0, 0,,1 (1,0 (1,0 (1,0 1,1,0 1,0,1 0,1,1 1,0,0 0,1,0 (1,0 0,0,0 (c (b 1,1, 0,1, oe period oe period Fig. 1. Three examples of a optimal floatig code for k =, l = ad arbitrary, q. (a = 1. (b =. (c = 3. we get (3, ad (, 3, the latter two cell state vectors. The code is built for arbitrarily large q i the followig way. A period i the code cotais 1 geeratios. The secod period directly follows ad has the same structure as the first period, except that: (i every cell s state is raised by, (ii the pair of variable vectors (1, 0 ad (0, 0 are switched, ad the pair of variable vectors (0, 1 ad (1, 1 are also switched. For i = 1,, 3,, the (i + 1-th (resp., (i + -th period has the same structure as the 1st (resp. d period except that every cell s state is raised by 4i. If q is fiite, it is simple to get the correspodig code: just trucate the above code to the maximum geeratio, subject to the costrait that every cell s state is at most q 1. We preset the formal costructio of the code i Fig. to 3. The costructio is i fact quite regular ad elegat. It is straightforward to verify the correctess (validity of the code i Fig. to 3. The key step is to verify that for every cell state vector, its two outgoig arrows eter two cell state vectors i the ext geeratio that correspod to two differet ad correct variable vectors (v 1, v. It is also straightforward to verify the correctess of the followig theorem. Theorem 1: For the code costructed i Fig. ad Fig. 3, t = ( 1(q 1 + q 1. We see that the floatig code itegrates the WAM s rewritig capabilities for differet variable to a very high degree. Let s call i=1 c i the weight of the cell state vector. Clearly, every rewritig eeds to icrease that weight by at least 1. If the cells are split ito two ad used idepedetly by the k = variables, t ca ever exceed (q 1. The floatig code, however, achieves t ( 0.5(q 1. The code costructio i Fig. to 3 ca be easily coverted ito very efficiet ecodig (for rewritig ad decodig (for mappig cell state vectors to variable vectors algorithms. Due to the space limitatio, we skip the details. Floatig Code Costructio: k =, l = ad arbitrary, q 1. For i = 1,,, 1, do: The i-th geeratio of cell state vectors cotais all the i + 1 elemets that satisfy the followig properties: (1 Amog the first i + 1 cells, i of them are i state 1 ad oe of them is i state 0; ( The last (i + 1 cells are all i state 0. I the i-th geeratio, if a cell state vector is (1, 1,, 1, 0, 0,, 0 (that is, the first i cells are i state 0, ad the last i cells are i state 0, the it correspods to the variable vector (v 1, v = (1, 0 (if i is odd or (v 1, v = (0, 0 (if i is eve; otherwise, the cell state vector correspods to the variable vector (v 1, v = (0, 1 (if i is odd or (v 1, v = (1, 1 (if i is eve. Let a deote a cell state vector i the (i 1-th geeratio. The two outgoig arrows of a are as follows: oe arrow goes to the cell state vector i the i-th geeratio where the first i cells are i state 1 ad the last i cells are i state 0; the other arrow goes to the cell state vector of the i-th geeratio that is the same as a except that its (i + 1-th cell is i state 1 istead of state 0.. Note that by the above costructio, the ( 1-th geeratio cotais cell state vectors, where each cell state vector has 1 cells i the state 1 ad oe cell i the state 0. Let s deote those cell state vectors by s 1, s,, s. For s i (1 i, let s deote the 1 cells i state 1 by b π(i,1, b π(i,,, b π(i, 1, ad deote the cell i state 0 by b π(i,. (1 π(i, j. 3. For i =, + 1,, 3, do: The i-th geeratio of cell state vectors cotais (i + elemets, which we partitio ito groups. For j = 1,,,, the j-th group cotais all the i + = [i ( 1]+1 elemets that satisfy the followig properties: amog the [i ( 1] + 1 cells b π(j,1, b π(j,,, b π(j,i ( 1+1, i ( 1 of them are i state ad oe of them is i state 1; the i 3 cells b π(j,i ( 1+, b π(j,i ( 1+3,, b π(j, 1 are all i state 1; the cell b π(j, is i state 0. I the i-th geeratio, for a cell state vector i the j-th group, if the cells b π(j,1, b π(j,,, b π(j,i ( 1 are all i state, the it correspods to the variable vector (v 1, v = (1, 0 (if i is odd or (v 1, v = (0, 0 (if i is eve; otherwise, the cell state vector correspods to the variable vector (v 1, v = (0, 1 (if i is odd or (v 1, v = (1, 1 (if i is eve. Let a deote a cell state vector i the (i 1-th geeratio ad i the j-th group. (If i 1 = 1, the let a be s j. The two outgoig arrows of a are as follows: oe arrow goes to the cell state vector i the i-th geeratio ad the j-th group where the i ( 1 cells b π(j,1, b π(j,,, b π(j,i ( 1 are all i state ; the other arrow goes to the cell state vector i the i-th geeratio ad the j-th group that is the same as a except that its cell b π(j,i ( 1+1 is i state istead of state 1. 4. Note that by the above costructio, the ( 3-th geeratio cotais ( 1 cell state vectors, where each vector has cells i state, oe cell i state 1, ad oe cell i state 0. 5. ( The ( -th geeratio of cell state vectors cotais + elemets, which we partitio ito two groups. The first group cotais all the vectors where 1 cells are i state ( ad oe cell is i state 0. The secod group cotais all the vectors where cells are i state ad two cells are i state 1. All the cell state vectors i the first (resp., secod group correspod to the variable vector (v 1, v = (0, 0 (resp., (1, 1. The ( 1-th geeratio of cell state vectors cotais + 1 elemets, which we partitio ito two groups. The first group cotais all the cell state vectors where 1 cells are i state ad oe cell is i state 1; the secod group cotais oe cell state vector where all the cells are i state. The cell state vectors i the first (resp. secod group correspod to the variable vector (v 1, v = (1, 0 (resp. (0, 1. Let a deote a cell state vector i the ( 3-th (resp., ( -th geeratio. The two outgoig arrows of a eter two cell state vectors of the ( -th (resp., ( 1-th geeratio, respectively i the first group ad i the secod group, both of which are above a. (To be cotiued i Fig. 3. Fig..

Floatig Code Costructio: Cotiuatio of Fig. 6. The above 1 geeratios of cell state vectors form the first period of the code. Repeat the period s structure to get the d, 3rd, periods (as described before i this paper. Just remember that for the i-th period, if i is eve, the switch the variable vector (0, 0 with (1, 0, ad switch the variable vector (1, 1 with (0, 1. If q is fiite, trucate the code to the maximum geeratio subject to the costrait that all the cells states are at most q 1. Fig. 3. B. A Geeral ad Tight Upper Boud to t We ow preset a geeral upper boud to t, which holds for ay k, l, ad q. The boud ca show that the code i Fig. ad Fig. 3 is optimal. Theorem : For ay floatig code, if k(l 1 1, the t [ k(l 1 + 1] (q 1 + [k(l 1 1] (q 1 ; if < k(l 1 1, the t (q 1. Proof: Due to the space limitatio, we preset oly the sketch of the proof here. Please refer to [7] for the details. The idea is to show that for ay floatig code, whe k(l 1 1, there is a sequece of at most [ k(l 1 + 1] (q 1 + [k(l 1 1] (q 1 rewritig operatios after which o more rewritig ca be performed. The case < k(l 1 1 ca be aalyzed similarly. We fid such a bad sequece of rewritig operatios usig the followig method. For i = 0, 1,, after the i-th rewritig operatio, we use a set S i to remember the k(l 1 1 cells whose states are the lowest. The i-th rewritig operatio is selected i this way: if all the choices for the rewritig icreases the weight of the cell state vector by oly oe, we select the i-th rewritig operatio to be the oe that raises the state of a cell outside S i 1 ; otherwise, we select the i-th rewritig operatio to be the oe that icreases the weight of the cell state vector by at least two. Let a 1, a,, a deote the cells, ad let c i j deote the state of the j-th cell after the i-th rewritig operatio. (0 c i j q 1. Let P i = a j S i (q 1 c i j, ad let Q i = a j / S i (q 1 c i j. Let t 0 deote the umber of rewritig operatios i our rewritig sequece. With a careful iductive aalysis, we show that for all i, t 0 i Q i + P i. By replacig i with 0, we obtai the fial coclusio. By pluggig k = ad l = ito Theorem, ad comparig it with Theorem 1, we get the followig coclusio. Theorem 3: The floatig code preseted i Fig. ad Fig. 3 is optimal, amely, it maximizes the umber of rewrites t. The above observatio also shows that i some cases, the upper boud preseted i Theorem is tight. IV. NEARLY OPTIMAL LINEAR CODES I this sectio, we preset two liear codes of similar structures for biary variables. Both codes have lim t = (q 1 + o(. Sice all floatig codes have t (q 1, the two codes approach optimality as. I both codes, every cell essetially correspods to a iteger, ad a liear combiatio of those itegers form the umerical represetatio of the k variables. We borrow the idea from the WOM codes proposed by Fiat ad Shamir i [3]. Those WOM codes are for updatig a sigle variable i a biary WOM. The floatig codes we preset are, respectively, for rewritig two or three variables i q-ary WAMs. We defie a fuctio odd(x as follows: for ay oegative iteger x, if x is odd, odd(x = 1; otherwise, odd(x = 0. Let (a x1 1 ax ax h h deote a strig that cosists of x 1 cosecutive a 1 s, followed by x cosecutive a s,, eded with x h cosecutive a h s. For example, (1 0 1 1 1 0 3 is (1, 1, 0, 1, 0, 0, 0. Below are the costructios of the two floatig codes. Code Costructio I: k =, l =, 3, arbitrary q I this code, a valid cell state vector (c 1, c,, c always satisfies the followig two costraits: (1 i, j, c i c j 1; ( (c 1, c,, c = ((a + 1 x 1 a x (a + 1 x 3 for some a, x 1, x, x 3 where 0 a < q 1, x 1 + x + x 3 =, x 1. (For example, whe = 5, q = 3, (1, 1, 1, 0, 1 = (1 3 0 1 1 1 ad (1, 1, 1, 1, = ( 0 1 4 1 are both valid cell state vectors. A cell state vector ((a + 1 x1 a x (a + 1 x3 correspods to the variable vector (v 1, v i the followig way: v 1 = odd(x 1, v = odd(x 3. The rewritig operatio is as follows. Whe the rewritig chages the value of variable v 1 (resp., v, we usually icrease x 1 (resp., x 3 by 1 ad decrease x by 1. The exceptio happes whe x = 1; i that case, we first raise all the cells to the state a + 1 (which makes x 1 = x 3 = 0 ad x =, the icrease x 1 or x 3 (or both based o ecessity. For example, assume that = 4, q = 3 ad the rewritig operatios chage the variable vector (v 1, v as follows: (0, 0 (0, 1 (0, 0 (1, 0 (1, 1. The, the cell state vector chages as follows: (0, 0, 0, 0 (0, 0, 0, 1 (0, 0, 1, 1 (1, 0, 1, 1 (, 1, 1,. Theorem 4: Whe is odd, the floatig code i Code Costructio I has t = ( 1(q 1; if is eve, it has t = ( (q 1 + 1. We skip the proof for theorem 4 due to the space limitatio. Iterested readers please see [7]. By theorems ad 4, we see that whe q =, the above code is strictly optimal. Code Costructio II: k = 3, l =, 5, arbitrary q I this code, a valid cell state vector (c 1, c,, c always satisfies the followig two costraits: (1 i, j, c i c j 1; ( the cell state vector is either i the form ((a + 1 x 1 a x (a + 1 x 3 a x 4 (a + 1 x 5, where 5 i=1 x i =, x 1, x 4 1 (which we call form I, or i the form ((a+1 x1 a x (a+1 x5, where x 1 +x +x 5 =, x 1 (which we call form II. A cell state vector correspods to the variable vector (v 1, v, v 3 i the followig way: if the cell state vector is i form I, the v 1 = odd(x 1, v = odd(x 3, v 3 = odd(x 5 ; if the cell state vector is i form II, the v 1 = odd(x 1, v = 0, v 3 = odd(x 5. The rewritig operatio is as follows. Whe the rewritig chages the value of variable v 1 (resp., v 3, we usually icrease x 1 (resp., x 5 by 1 ad decrease x (resp., x 4 or

x, depedig o if the cell state vector is i form I or form II by 1. Whe the rewritig chages the value of variable v, we either icrease x 3 by 1 ad decrease x or x 4 by 1 (whe the cell state vector is i form I, or chage the cell i the middle of the sequece of a s from state a to state a+1 (whe the cell state vector is i form II. If x or x 4 becomes zero due to the above operatio, the cell state vector is reevaluated, ad the operatio described above is carried out agai based o the values of the variables. If the above operatio caot be carried out ay more whe the cells remai i the curret two states state a ad state a + 1 the we start to use the two states a + 1 ad a +, i the same way as we have used the two states a ad a + 1 above. The followig examples show how the code works. Assume that = 10, q = 3. (1 If the cell state vector is (1 1 0 9 1 0, the (v 1, v, v 3 = (1, 0, 0; if the ext two rewritig operatios chage (v 1, v, v 3 to (0, 0, 0 ad the to (0, 1, 0, the cell state vector chages to (1 0 8 1 0, ad the to (1 0 3 1 1 0 4 1 0. ( If the cell state vector is (1 3 0 1 1 1 0 4 1 1, the (v 1, v, v 3 = (1, 1, 1; if the ext two rewritig operatios chage (v 1, v, v 3 to (0, 1, 1 ad the to (0, 1, 0, the cell state vector chages to (1 6 0 1 1 1 0 1 1 1, ad the to ( 0 1 4 1 1 5 0. Theorem 5: The floatig code i Code Costructio II has t ( 6 log (q 1 +. Proof: We preset the sketch of the proof here because of the space limitatio. Please see [7] for details. The mai idea is that every rewritig icreases the weight of the cell state vector oly by oe except i the followig two cases: (1 The rewritig makes x or x 4 become zero, i which case the weight of the cell state vector ca be icreased by at most 3; ( The rewritig causes the cells to stop usig the curret pair of states say a ad a + 1 ad start usig the ext pair of states a + 1 ad a +, i which case the weight of the cell state vector is icreased by at most 7. The first case ca be show to occur o more tha (q 1 log times, while the secod case happes at most q 1 times. That leads to the fial coclusio. For the detailed proof, please see [7]. V. BOUNDS FOR FLOATING CODES A geeral upper boud to t was show i Theorem. It was also show that whe k =, l =, the boud is exact. For large k or l, the followig theorem ca give a better boud. Theorem 6: Let w be the smallest positive iteger such that ( w+ l k. The, t (q 1 w k. Let w be the smallest positive iteger such that ( w + l k. The, whe k, t (q 1 k. w > Proof: First, cosider the geeral case k 1. Defie S as S = {(a 1, a,, a i=1 a i w, a 1, a,, a are oegative itegers}, ad let w be the smallest iteger such that S l k. Defie S as S = {(d 1, d,, d i=1 d i w+, d 1, d,, d are positive itegers}. By lettig d i = a i + 1 for i = 1,,,, we see that there is a oe-to-oe mappig betwee S ad S. So S = S. A elemet (d 1, d,, d belogs to S if ad oly if it is a solutio to the followig problem: partitio a path of w + vertices ito or more sub-paths such that for i = 1,,,, the i-th sub-path has d i > 0 vertices. Therefore, S = ( w+. So w is also the smallest positive iteger such that ( w+ l k. k cosecutive rewritig operatios ca make the variables chage to or go through ay of the l k possible values. If we see a i (for i = 1,,, as the icrease i c i the state of the i-th cell ad cosider the way S ad w are defied, we see that whatever the curret cell state vector is, there exist k cosecutive rewritig operatios that icreases the weight of the cell state vector i=1 c i by at least w. Now cosider the first batch of such k rewritig operatios, the secod batch, ad so o. Sice the maximum weight of the cell state vector is (q 1, we get t (q 1 w k. The proof for the slightly more restrictive case k is very similar. Please see [7] for its details. Whe k or l is sufficietly large, theorem 6 gives a upper boud to t that is roughly (q 1k. Now we preset a (! 1 l k elemetary lower boud as well as a exact evaluatio for t. Due to the space limitatio, we skip their proofs. Please refer to [7] for the detailed proofs. Theorem 7: There exist floatig codes where t k q l 1. Theorem 8: Whe k, l, q are fixed ad, there exist floatig codes where t = (q 1 + o(. Theorem 8 shows that whe, floatig codes ca itegrate the WAM s rewritig capabilities for differet variables early perfectly. Such a early perfect itegratio also occurs to all the codes preseted i this paper. ACKNOWLEDGMENT This work was supported i part by the Lee Ceter for Advaced Networkig at the Califoria Istitute of Techology. REFERENCES [1] P. Cappelletti, C. Golla, P. Olivo ad E. Zaoi (Ed., Flash memories, Kluwer Academic Publishers, 1st Editio, 1999. [] G. D. Cohe, P. Godlewski ad F. Merkx, Liear biary code for writeoce memories, IEEE Tras. Iform. Theory, vol. IT-3, pp. 697-700, Sept. 1986. [3] A. Fiat ad A. Shamir, Geeralized write-oce memories, IEEE Tras. Iform. Theory, vol. IT-30, pp. 470-480, May 1984. [4] F. Fu ad A. J. Ha Vick, O the capacity of geeralized write-oce memory with state trasitios described by a arbitrary directed acyclic graph, IEEE Tras. Iform. Theory, vol. 45, o. 1, pp. 308-313, 1999. [5] S. Gregori, A. Cabrii, O. Khouri ad G. Torelli, O-chip error correctig techiques for ew-geeratio flash memories, Proceedigs of The IEEE, vol. 91, o. 4, April 003. [6] C. Heegard, O the capacity of permaet memory, IEEE Tras. Iform. Theory, vol. IT-31, pp. 34-4, Ja. 1985. [7] A. Jiag, V. Bohossia ad J. Bruck, Floatig codes for joit iformatio storage i write asymmetric memories, electroic techical report, http://faculty.cs.tamu.edu/ajiag/floatigcodes.pdf, 007. [8] A. V. Kuzetsov ad A. J. H. Vick, O the geeral defective chael with iformed ecoder ad capacities of some costraied memories, IEEE Tras. Iform. Theory, vol. 40, o. 6, pp. 1866-1871, Nov. 1994. [9] F. Merkx, WOMcodes costructed with projective geometries, Traitemet du Sigal, vol. 1, o. -, pp. 7-31, 1984. [10] R. L. Rivest ad A. Shamir, How to reuse a write-oce memory, Iformatio ad Cotrol, vol. 55, pp. 1-19, 198. [11] J. K. Wolf, A. D. Wyer, J. Ziv ad J. Korer, Codig for a write-oce memory, AT&T Bell Labs. Tech. J., vol. 63, o. 6, pp. 1089-111, 1984.