Data Movement in Flash Memories

Size: px
Start display at page:

Download "Data Movement in Flash Memories"

Transcription

1 Data Moveet i Flash Meories Axiao (Adrew) Jiag Coputer Sciece Departet Texas A&M Uiversity College Statio, TX ajiag@cse.tau.edu Michael Lagberg Coputer Sciece Divisio Ope Uiversity of Israel Raaaa 43107, Israel ikel@opeu.ac.il Abstract Robert Mateescu Electrical Egieerig Dept. Caltech Pasadea, CA ateescu@paradise.caltech.edu Jehoshua Bruck EE & CNS Dept. Caltech Pasadea, CA bruck@caltech.edu NAND flash eories are the ost widely used o-volatile eories, ad data oveet is coo i flash storage systes. We study data oveet solutios that iiize the uber of block erasures, which are very iportat for the efficiecy ad logevity of flash eories. To ove data aog blocks with the help of auxiliary blocks, where every block cotais pages, we preset algoriths that use Θ( i{, log }) erasures without the tool of codig. We prove this is alost the best possible for o-codig solutios by presetig a early atchig lower boud. Optial data oveet ca be achieved usig codig, where oly Θ() erasures are eeded. We preset a codig-based algorith, which has very low codig coplexity, for optial data oveet. We further show the NP hardess of both codig-based ad o-codig schees whe the objective is to optiize data oveet o a per istace basis. I. INTRODUCTION NAND flash eories are the ost widely used o-volatile eories due to their high data desity ad efficiecy. I a NAND flash eory, cells are orgaized as blocks. A block has about 10 5 cells, ad a cell ca store oe or ore bits. Every block is partitioed ito pages, where a page is the uit of a read or write operatio. A proiet property of flash eories is block erasure. It eas to chage ay stored data, the whole block ust be erased first before rewritig. Block erasures sigificatly decrease the logevity ad the speed of flash eories, so it is very iportat to reduce the [5]. Flash eories ofte store a large aout of data, ad data oveet is very useful for reasseblig files, wear levelig, ad i-place coputatio. We cosider the basic for where the data i differet pages eed to be switched. This proble was first studied i [10], where codig-based data oveet is show to iiize the uber of erasures. I this paper, we sigificatly exted the kow results by rigorously provig the gai of codig, presetig efficiet data oveet algoriths, ad showig the NP hardess of per-istace optiizatio. I the data oveet proble, there are blocks, where each block has pages of data. The pages of data eed to be oved ito each other s positios as required. epty auxiliary blocks ca be used to help data oveet. The objective is to iiize the uber of block erasures i the data oveet process. We preset efficiet algoriths that use Θ( i{, log }) erasures without the tool of codig. We prove it is early the best possible by provig a close lower boud. Sice codig-based solutios require Θ() erasures, this result rigorously proves the beefit of codig. We preset a strictly optial codig-based algorith for = 1 with at ost 2 1 erasures. It has very low codig coplexity. We further show that if the objective is to optiize data oveet o a per istace basis, the proble is NP hard for both codig ad o-codig schees. Nevertheless, the codig techique i the above algorith ca be readily utilized i ay per-istace-optial solutio. A uber of recet works have studied codig for rewritig [4], [6], [7], [9], [12] ad error correctio [8], [11] i flash eories at the cell level. There are also ay works studyig algoriths ad data structures for flash data-storage systes [5]. This paper focuses o codig for data oveet at the page level, ad the results ca be used to desig ore efficiet flash storage systes. The rest of the paper is orgaized as follows. Sectio II defies the data oveet proble. Sectio III presets data oveet algoriths without codig. Sectio IV derives a lower boud for data oveet without codig. Sectio V presets a efficiet codig schee for optial data oveet. Sectio VI studies the coplexity ad approxiatio of per-istace optiizatio. Sectio VII presets the coclusios. II. NOTATIONS AND CONCEPTS There are blocks cotaiig data, deoted by B 1,..., B. Every block cosists of pages. For i = 1,...,, the pages i B i are called p i,1,..., p i,. For 1 i ad 1 j, the data origially stored i p i,j is deoted by d i,j. There is a fuctio α: α : {1,..., } {1,..., } {1,..., } such that 1 i, {(a, b) 1 a, 1 b, α(a, b) = i} =. Our objective is to ove (i.e., write) the data d i,j ito a page i block B α(i,j), for 1 i ad 1 j. There are epty extra blocks, called auxiliary blocks, that we ca use to help ove data. (Every auxiliary block also has pages.) For reliability, it is required that durig the data-oveet process, the data i these + blocks ust always be sufficiet for recoverig all the origial data. I the ed, the auxiliary blocks should retur to the epty state. We easure the cost of data oveet by the total uber of block erasures. (Note

2 that chagig ay data i a block requires erasig the block first.) The solutio that iiizes the uber of erasures is called optial. There exist two types of solutios, aely, solutios with ad without codig. I a solutio without codig, data are siply copied fro page to page. I a codig-based solutio, the data writte ito a page ca be ay fuctio of the existig data. Exaple 1. We show a exaple without codig where = 3, = 4 ad = 2. Each page is idexed by its label (the destiatio block), ad its cotet (the card suit). For exaple the pages idexed by 1, 1 ad 1 should be oved to the first block. I the first step, the cotet of the first block is copied to the auxiliary eory, ad the first block is the erased. I the secod step, the pages labeled with 1 are copied ito the first block. I the third step, before erasig block 2, we copy oly 3 ad 4 to the auxiliary eory, because 1 already appears i block 1. After several steps, we realize the desired data oveet It is kow that codig-based solutios ca optiize data oveet [10], which use at ost 2 1 erasures. We ow rigorously prove the gai of codig, ad show efficiet data-oveet algoriths. III. DATA MOVEMENT WITHOUT CODING I this sectio, we preset two algoriths for data oveet without codig. They use log erasures, respectively. This shows that without codig, Θ( i{, log }) erasures are sufficiet for data oveet. Here we assue 2, because whe = 1 there are cases that caot be solved without usig codig [10]. A. Block-ergig Algorith ad 5 Give a positive iteger i, let [i] deote {1, 2,..., i}. Call the auxiliary blocks B +1,..., B +. For + 1 i +, deote the pages i B i by p i,1,..., p i,. I the data oveet process, data are copied fro page to page. At ay give oet, if a page p i1,j 1 stores the data d i2,j 2, the we use φ i1,j 1 to deote α(i 2, j 2 ). That is, the data i page p i1,j 1 eed to be oved ito block B φi1 i the ed.,j 1 Defiitio 2. Let S [ + ]. The blocks {B i i S} are called sei-sorted if there exists a bijectio fuctio π : S S (that is, a perutatio of the eleets i S) such that i 1 = i 2 S ad j 1, j 2 [], if π(i 1 ) < π(i 2 ), the φ i1,j 1 φ i2,j 2. Let s use the help of sei-sorted blocks to ove data. For siplicity, i the followig we assue is a power of, aely, = z for soe iteger z. We will exted the results for geeral later. As the begiig step, we partitio [] ito / subsets S 1,, S /, where S i = for 1 i /. We create / sets of sei-sorted blocks as follows. We first copy the data i {B i i S 1 } ito the auxiliary blocks {B i + 1 i + } such that the blocks {B i + 1 i + } becoe sei-sorted blocks. The for i = 2,..., /, we erase the blocks {B j j S i 1 }, ad copy the data i {B j j S i } ito {B j j S i 1 } such that the blocks {B j j S i 1 } becoe sei-sorted. Fially we erase the blocks {B i i S / }. This way, we have created / sets of sei-sorted blocks usig erasures. Clearly, our fial objective is to ake {B 1,, B } oe big set of sei-sorted blocks. How ca we cobie the / saller sets of sei-sorted blocks we already have to achieve this objective? Let s use T 1,..., T / to deote our / sets of sei-sorted blocks, ad use T 0 to deote the set of epty blocks. We first show how to cobie T 1,, T ito oe bigger set of sei-sorted blocks. We copy data fro T 1,..., T ito the epty blocks (oe epty block at a tie) with the followig rule: for two pages p i1,j 1 ad p i2,j 2 of T 1,..., T, if φ i1,j 1 < φ i2,j 2, the the data i page p i1,j 1 is copied before the data i p i2,j 2. (Note that for every T i (1 i ), the data i it are already sorted, so they just eed to be copied sequetially block after block.) For a block i T i (1 i ), oce its data are all copied, we erase it so that it becoes epty ad ca have data oved ito it later. Ca we keep ovig data this way so that i the ed, the data i T 1,, T are oved ito 2 blocks, which are sei-sorted? The aswer is yes, because i the above procedure there is always place to ove data ito: Every tie we have copletely filled a uber of epty blocks, if we look at the blocks i T 1,..., T whose data have bee partially copied, their u-copied data together ca fill at ost 1 epty blocks. Sice we have epty blocks to begi with, there is always a epty block to copy data ito. Usig the sae ethod, we ca cobie the / sets of sei-sorted blocks ito / 2 bigger sets of sei-sorted blocks. By repeatedly usig this approach log ties, we ca get blocks that are sei-sorted. All left to do is to ove the data ito their fial positios, which takes at ost 3/2 erasures. I total, this algorith uses at ost log erasures. For geeral values of, this algorith uses at ost log erasures.

3 B. Algorith based o Block-perutatio Sets We ow preset a algorith that uses O() erasures. Defiitio 3. A set of pages p 1,j1, p 2,j2,..., p,j is a block-perutatio set if {α(1, j 1 ), α(2, j 2 ),..., α(, j )} = []. It is kow that the pages i B 1,..., B ca be partitioed ito exactly block-perutatio sets [10]. Without loss of geerality (w.l.o.g.), let s assue that for i = 1,...,, the pages p 1,i, p 2,i,..., p,i for a block-perutatio set. (Sice a block cotributes exactly oe page to every block-perutatio set, this is just a atter of labellig.) By defiitio, the data of the pages i a block-perutatio set eed to be peruted i the blocks B 1,..., B. I the followig, we use this property to ove data, usig oly two auxiliary blocks (which we will call B +1 ad B +2 ). Cosider a block-perutatio set p 1,j, p 2,j..., p,j. Sice a perutatio cosists of perutatio cycles, let s cosider such a cycle of legth z : p i0,j, p i1,j,..., p iz 1,j. That is, for k = 0, 1,..., z 1, α(i k, j) = i (k+1) od z. With the two auxiliary blocks, we ca ove the data iside the cycle to their right places without ovig ay data outside the cycle. The basic idea is that with oe auxiliary block, we ca cyclically shift the data iside the cycle. With the other auxiliary block, we ca use it to teporarily hold the data outside the cycle whe the correspodig block is erased. Specifically, we ca ove the data of the cycle to their right places this way: 1) Copy the data d iz 1,j fro p iz 1,j to p +1,j. For j [] \ {j}, copy the data d iz 1,j fro p i z 1,j to p +2,j. Erase B iz 1. 2) For k = z 2, z 3,..., 0, do: a) Copy the data d ik,j fro p ik,j to p ik+1,j. b) For j [] \ {j}, copy the data d ik+1,j fro p +2,j to p i k+1,j. c) Erase B +2. d) For j [] \ {j}, copy the data d ik,j fro p ik,j to p +2,j. e) Erase B ik ; 3) Copy the data d iz 1,j fro p +1,j to d i0,j. For j [] \ {j}, copy the data d i0,j fro p +2,j to p i 0,j. Erase B +1 ad B +2. With the outlied procedure, we ca ove z pages of data i a cycle usig 2z + 1 erasures. I the sae way, we ca ove the pages of data i a block-perutatio set usig at ost 5/2 erasures. Furtherore, we ca ove all the pages usig 5/2 erasures. We have desiged aother efficiet data-oveet algorith, called the bit-fixig algorith, that allows straightforward ipleetatio i flash eories. We preset it i the appedix. All i all, we coclude: Theore 4. Let 2. Whe codig is ot used, the data oveet proble ca be solved usig at ost erasures. i{ log + 3 2, 5 2 } = Θ( i{, log }) IV. A LOWER BOUND I this sectio, we prove that without codig, a data-oveet algorith eeds Ω( i{, (log )/(log )}) erasures. 1 Sice log is practically a very sall uber, this lower boud is very close to the upper boud show i Theore 4. A. Model I this sectio, to siplify our otatio, we use a equivalet odel defied as follows: Our data is odeled as a ( + ) atrix A = (a i,j ) (+). Iitially, the data i the sub atrix cosistig of the first colus cotais all the eleets i the set []; ad the reaiig (auxiliary) etries are epty. Naely, each of the etries i the first colus have distict values, ad all x [] appear i these colus. The value x of a i,j idicates that the data i page p i,j eeds to be oved to locatio i, j where x = (i 1) + (j 1) (aely, i 1 = (x od ) ad j 1 = x/ ). I other words, after the data oveet, the fial atrix A will iclude the eleets of [] i the first colus i icreasig order; the reaiig colus will be epty. We use B i to deote the set of values that appear i the i-th colu of A (B i []). We assue throughout that (otherwise the probles studied throughout this work becoe trivial). I geeral, our objective is to perfor operatios to the iitial atrix A, such that the data i each page is oved to its correspodig locatio. We allow two types of operatios: (a) Copyig data fro a curret page to a epty page. This correspods to writig the value of a etry a ij ito a locatio that was previously epty. Copyig data is thought of as a 1 Here log is the iterated logrith of, which is defied as the uber of ties the logrith fuctio ust be iteratively applied before the result is less tha or equal to 1. Naely, log = 1 + log (log ) for >. Notice that log grows very slowly with.

4 costless operatio. (b) Erasig a colu of data. This correspods to erasig the value of all etries i a give colu. After the operatio, all etries i the give colu will be epty. Erasig data is thought of as a costly operatio. Give a iitial atrix, usig the two operatios above, our objective is to reach the fial atrix A specified above. I this sectio, we preset lower bouds o the uber of erasures eeded to reach this goal. B. Proof outlie To prove our lower bouds, we cosider the directed cofiguratio graph G = (S, E) of our process. The vertex set S of our graph will iclude all possible atrices A that ca be reached by perforig operatios (a) ad (b) above o the iitial atrix A. To be precise, to allow a clea aalysis, we will restrict ourselves to the set of atrices A, reachable fro A, that have exactly epty etries; ad that the reaiig etries iclude the set [] (oe etry per eleet). It is ot hard to verify that this is without loss of geerality. O oe had for every x [] our iterediate atrix A ust iclude a etry of value x, otherwise we will ot be able to reach the fial atrix A. O the other, we ay assue that there are exactly epty etries as ay value x [] that appears i two positios is redudat. We defie a slightly differet operatio o our atrix that preserves the above restrictios ad cobies operatios (a) ad (b) above. (ab) Erase ad copy: Erase a colu of data, ad copy its cotet oto the epty locatios i the atrix (these epty locatios ay iclude the curretly erased colu). Our objective is, startig fro our iitial atrix A, to perfor a iiu uber of (ab) operatios to reach A. We have yet to defie the edge set E of our graph G. A pair (A, A ) is a directed edge i E if usig a sigle (ab) operatio oe ca trasfor A ito A. The distace betwee a atrix A ad A is the shortest path i G betwee A ad A, ad correspods to the iiu uber of (ab) operatios eeded to trasfor A ito the desired atrix A. We will show the existece of a iitial atrix A for which this distace is at least a certai lower boud lb. Our proof has two steps. First, we show that the diaeter of G is at least lb (aely there exist two atrices A ad A which are far apart. Theore 5. The diaeter of G is at least lb = Θ( i(, log / log )). We the show that this suffices to prove our assertio. Corollary 6. There exists a atrix A such that the distace betwee A ad A is at least Θ( i(, log / log )). The proof of Corollary 6 is fairly siple ad is give i full detail below. The proof of Theore 5 is ore ivolved ad a outlie followed by a detailed proof will be give after the proof of Corollary 6. 1) Proof of Corollary 6: Proof: Let A ad A be the atrices ad lb be the boud fro Theore 5. Let d(a, A ) deote the distace betwee two atrices A ad A i G. It holds (by our distace defiitio) that d(a, A ) + d(a, A ) d(a, A ) lb. Thus either d(a, A ) lb/2 ad we are doe (set A = A ); or d(a, A ) lb/2. Notice that i the latter case our proof is ot doe as we wish to fid a atrix A such that d(a, A ) is large, while we are i the case that d(a, A) is large (here we stress that the distace d is ot syetric). To overcoe this difficulty we will defie two atrices A 1 ad A 2 as follows. We start by oticig that there exists a atrix, which we deote by A 1, close to A for which the epty etries of A 1 are all located i the last colus. More specifically, d(a, A 1 ) ad d(a 1, A ). The atrix A 1 is obtaied fro A by ovig all the o-epty etries i the last colus to epty locatios i the first colus. Now it holds that d(a, A 1 ) lb/2 (otherwise d(a, A ) d(a, A 1 ) + d(a 1, A ) < lb/2 which cotradicts our assuptio). Fially, we defie a atrix A 2 correspodig to A 1 for which d(a 2, A ) = d(a, A 1 ) lb/2. Settig A to be equal to A 2 we coclude our proof. The atrix A 2 is obtaied fro the atrix A by a perutatio o the values of []; the perutatio is defied by the atrix A 1. Specifically, let π be the perutatio o [] such that π(a 1 ) = A (here for a atrix A = (a ij ) we defie the (i, j) th etry of π(a) as π(a i,j )). Now settig A 2 = π(a ) ad oticig that for ay perutatio π there is a edge i G betwee two atrices X ad Y iff there is a edge i G betwee π(x) ad π(y), it holds that d(a, A 1 ) = d(π(a ), π(a 1 )) = d(a 2, A ) lb/2. We ote that it is ot hard to show the existece of a (differet) atrix A such that the distace betwee A ad A is at least (take ay atrix A for which i each colu soe etry eeds to be oved to obtai A ). Thus, for the corollary, we obtai a boud of ax(lb/2, ) = Θ( i(, log / log )). 2) Outlie for proof of Theore 5: To prove Theore 5 (our lower boud o the diaeter of G) we use a variatio of the followig aive idea. For a atrix A, let d A be the out-degree of A i G. Assue oe could prove that d A is bouded by D for all atrices A S. This iplies that a walk of legth l i G startig fro A ca reach at ost D l differet atrices of S. Oe ca ow deduce that the diaeter of G is at least the sallest l such that D l S ; or i other words lb log D S. Applyig this proof techique as is o our graph G will ot yield a lower boud greater tha. We thus cosider two odificatios. First of all, we cosider a slightly differet graph G = (S, E ), which is a hooorphic iage of G. Naely, for a give atrix A S let B i be the set values that appear i the i th colu of A. We will idetify A with the tuple B A = (B 1,..., B + ); ad S = {B A A S} will cosist of the set of such tuples. Two tuples B = (B 1,..., B + ) ad B = (B 1,..., B + ) are coected by a directed edge i E iff there exists atrices A ad A with correspodig tuples B

5 ad B that are coected i G. It is ot hard to verify that the diaeter of G is o less tha the diaeter of G. (I fact, we ca also show that the diaeter of G is o ore tha the diaeter of G plus +. So the two diaeters are the sae up to a additive factor of +.) We coclude that a lower boud of Θ( i(, log / log )) for the diaeter of G will iply the sae lower boud for G. Up to this poit we have discussed the first variatio of the aive idea preseted above: replacig the graph G by G. However, boudig the degree D of G will ot suffice to obtai a lower boud of log D S larger tha. The ai reaso is that the axiu degree D of G is too large. But we have oticed that oly rarely ay oe visit vertices of G with large degree approachig this boud. Typically the degree of the vertices at had will be fairly sall. To utilize this observatio, we cosider the axiu uber of vertices i S reachable fro a give vertex B by α > 1 steps istead of a sigle step (for a sigle step, this value is exactly the vertex out-degree). This correspods to the study of the α trasitive closure of G soeties deoted as (G ) α. Naely, (G ) α cosists of the vertex set S, where two vertices are coected by a edge iff there is a path of legth at ost α betwee the i G. Clearly, if (G ) α has diaeter dia, the G has diaeter at least dia α. Studyig (G ) α istead of G allows us to average out the differeces betwee the degree of vertices i G ad to obtai the desired boud. I what follows we aalyze the size ( of S ad the ) value Deg α of the axiu out-degree i (G ) α. We the deduce a boud o the diaeter of G of lb Θ α log Degα S which i tur iplies the assertio of Theore 5. I what follows, for two fuctios f ad g, the otatio f g will represet the fact that log f = Θ(log g). We also assue that < (otherwise there is a trivial lower ad upper boud of ). C. The state space S We start by boudig (fro below) the total uber of cofiguratios i the state space S at had. ( ) + ()! S (!) We explai our boud: We first choose the locatio for the epty etries of our data atrix. This deteries the size of the sets B 1,..., B +, say 1,..., + where each i is at ost. We the decide o the cotet of each set B i. If the sets were ordered, the uber of cofiguratios would be exactly ()!. As they are ot ordered this uber should be divided by Π + i=1 ( i)!. It is ot hard to verify that Π + i=1 ( i)! (!) as + i=1 i = ad each i is at ost. D. Deg α : uber of vertices reachable i α steps We ow boud (fro above) the uber of vertices Deg α that ca be reached usig α steps fro ay give iitial vertex i S. We take > α >. We defie D(α) to be the uber of differet cofiguratios a certai set of α colus ca take i α steps. ( )( ) + α Deg α ( + ) D(α) α+ D(α) α We explai our boud: We first pick α colus out of the + colus. There are ow two types of chages that ay have bee ade i the data atrix, chages iside the α colus we picked (referred to as iteral colus) ad chages outside these colus (referred to as exteral colus). We start with exteral chages. The exteral epty spaces ay have bee filled with eleets fro the iteral colus. This ca be bouded by ( α) to choose the iteral eleets, ad ( + ) to distribute the aog the exteral epty spaces (otice that there are at ost such epty spaces). Now we are left to cosider the uber of iteral cofiguratios oe ay obtai. We deote this value by D(α). Naely, D(α) equals the uber of possible cofiguratios obtaiable i a give set of α colus whe erasig these colus oe after the other. It is clear that D(α) α α, Ideed, for a rough boud otice that iteral etries ust appear i oe of the α colus. Pluggig i this value of D(α) will already yield ice results. However, to tighte the results we copute D(α) recursively. Naely, for α > β > it holds that [( )( ) ] α α β D(α) α β [ ] D(β) α β+ α β D(β) β Agai, we explai our boud. We would like to express the uber of iteral cofiguratio obtaiable i α steps D(α) by the uber of iteral cofiguratios obtaiable i β steps D(β) for β saller tha α. The aalysis is siilar to the previous oe for Deg α. We first copute how ay cofiguratios ca be obtaied i β steps, ad the raise this uber by α/β. We start by pickig β colus out of the α at had. For the upcoig discussio, we refer to the α colus as exteral colus ad to the β colus as iteral colus. Agai, there ay be two types of chages i the cofiguratio, exteral ad iteral. For exteral chages, we ay fill soe of the epty etries of the exteral colus with iteral etries. This is couted for by ( α)( β β ) α. As before, the iteral chages are attributed to D(β).

6 We ow copute our lower boud. We have the freedo to fix the values of α ad β. For the first level of recursio, we fix α = log ad β = log log = log (2). It holds that > α > β. Thus, Deg α α+ D(α) is approxiately [ ] log log + ( log ) log(2) + D( log (2) ) log (2) For < log it holds that Thus we have that Deg α log (2) log log + log(2) log 2 D( log (2) log ) log (2) For the secod step of our recursio, we eed to copute D(α ) = D( log (2) ). We do this by fixig α = log (2) ad β = log (3). For < log(2) it holds that Thus we have that Deg α 3 i=1 ( log(i) log (3) log log (2) +) D( log (3) log ) log (3) I geeral, we ca cotiue the recursio as log as < log (i), while for the base we take D() =. So all i all we get Fially, we evaluate our lower boud Which iplies a lower boud of Deg α log lb α log S log Deg α i=1 ( log (i) +) log Alost atchig our upper boud of Θ( i(, log )). log log + log = lb = Θ( i(, log / log )) log log V. EFFICIENT CODING-BASED DATA MOVEMENT log / log + 1/ (1) We ow focus our attetio o data oveet usig codig, where = 1. It is kow that with codig, 2 1 erasures are sufficiet ad ecessary i the worst case. What about iiizig the uber of erasures for each give istace, istead of just the worst case? (Certaily, for soe istaces, fewer tha 2 1 erasures are eeded.) Our codig-based solutio will use the cocept of caoical labellig. Defiitio 7. [10] Let y [ 2]. Whe we relabel the blocks B 1,..., B as B 1,..., B, it is called a caoical labellig with paraeter y if for ay y + 1 i 2 ad i + 2 j, o data i B j eed to be oved ito B i. The followig observatio has bee ade i [10]: Give a istace of the data-oveet proble with = 1, there exists a codig-based solutio usig + y + 1 erasures if ad oly if there exists a caoical labellig with paraeters y. It is NP hard to fid a caoical labellig with y iiized [10]. However, we should otice that whe y = 2, ay labellig is a caoical labellig, ad that would give us the + y + 1 = 2 1 erasures, which is worst-case optial. We preset a very efficiet codig-based algorith that uses + y + 1 erasures oce a caoical labellig with paraeter y is give. I the algorith, a very sall Galois field is used for coputatio (GF(q) with q 3), ad it geerates parity-check sybols with a sall uber of additios o average. Before this work, it was ukow how to fid such strictly-optial ad efficiet solutios over sall Galois fields [10]. Our algorith achieves low codig coplexity while iiizig the uber of erasures.

7 (a) (b) Figure 1. Exaple of the data-oveet proble with = 14. We let y = 8. (a) The data-oveet graph G d. If the data d i eeds to be oved to page p j, there is a edge fro vertex i to vertex j. (b) The sybol graph G s. The solid edges are the black edges, ad the dashed edges are the red edges. A. Codig-based Algorith The algorith takes a caoical labellig with paraeter y as iput. For siplicity, let us say that the origial labellig B 1, B 2,..., B is the caoical labellig. (It is just a atter of aig.) It has bee show i Sectio III that the pages of B 1,..., B ca be partitioed ito block-perutatio sets. Our algorith will work the sae way for the block-perutatio sets. So for siplicity, i the followig, we will cosider oly oe block-perutatio set, ad call its pages p 1, p 2,..., p. For i [], p i is the page i block B i ad origially holds the data d i. For i [], the fuctio α(i) = j eas that the data d i eed to be oved ito the page p j. (Here j [].) By the defiitio of block-perutatio set, we kow that {α(1),..., α()} = {1,..., }. If α(i) = j, we say α 1 (j) = i. By the defiitio of caoical labellig with paraeter y, we kow that for i {y + 1, y + 2,..., 2}, α 1 (i) i + 1. We will use oly oe auxiliary block. We call it B 0, ad call its page p 0. I our algorith, B 1,..., B y will be erased twice, while B 0 ad B y+1,..., B will be erased oly oce. We defie a fuctio β(i) for i {y + 2, y + 3,..., }: If α 1 (i 1) y + 1 ad α 1 (i 1) = α(i), the β(i) = α 1 (i 1). If y + 2 α 1 (i 1) i 1, the β(i) = β(α 1 (i 1)). If α 1 (i 1) = i, or if α 1 (i 1) y + 1 ad α 1 (i 1) = α(i), the β(i) = NULL. We defie the set γ i, for i [y + 1], as follows: γ i = {j β(j) = i, y + 2 j }. Exaple 8. A exaple is show i Fig. 1 (a). Here = 14 ad y = 8. For i [], if α(i) = j (that is, the data d i eed to be oved ito page p j ), we draw a edge fro vertex i to vertex j. We call the graph the data-oveet graph G d. Here we have α(1) = 9, α(2) = 4,..., α(14) = 8, ad α 1 (1) = 12, α 1 (2) = 13,..., α 1 (14) = 4. We also have β(10) = 1, β(11) = 8, β(12) = 8, β(13) = 1, β(14) = 6. Correspodigly, γ 1 = {10, 13}, γ 6 = {14}, γ 8 = {11, 12}. Whe i [y + 1] ad i = 1, 6, 8, γ i =. It is well kow that a perutatio cosists of cycles. Defiitio 9. A set of pages p i0, p i1,..., p ix 1 is called a perutatio cycle if for j = 0, 1,..., x 1, α(i j ) = i j+1 od x. Here i j [] for all j. Aog the x pages, p ax{ij 0 j x 1} is called the tail of the perutatio cycle. Exaple 10. The data-oveet proble show i Fig. 1 (a) has three perutatio cycles: (1) p 1, p 9, p 6, p 13, p 2, p 4, p 14, p 8, p 10, p 12 ; (2) p 3, p 5, p 7 ; (3) p 11. Their tails are p 14, p 7 ad p 11, respectively. Let us build a directed graph G s, called the sybol graph, as follows. G s has vertices labelled by 1,...,, which correspod to the pages p 1,..., p. The edges of G s have two colors: black ad red. There is a black edge fro vertex i to vertex j if α(i) = j, j [y + 1] ad p j is ot the tail of its perutatio cycle. There is a red edge fro vertex i to vertex j if y + 2 i, j [y + 1] ad i γ j. Exaple 11. A exaple of the sybol graph G s is show i Fig. 1 (b). It correspods to the data oveet proble i Fig. 1 (a). The black edges of G s always for disjoit paths. I this exaple, the paths are: (1) 7 3 5; (2) ; (3) 10; (4) ; (5) 14 8; (6) 11. We call the black paths. The sources of the above six black paths are vertices 7, 13, 10, 12, 14, 11, respectively, ad their siks are vertices 5, 4, 10, 6, 8, 11, respectively. It is easy to see that a black path ca have at ost oe vertex fro {y + 2, y + 3,..., }; ad if it does, that vertex ust be its source. For a red edge, its begiig poit ust be the source of a black path. The ed poit of a red edge is either the ed of a black path or the vertex α 1 (y + 1). We show that the sybol graph G s has a siple structure. Let G s be the udirected versio of G s. That is, if we covert all the edges of G s to be udirected edges, we get G s.

8 Lea 12. Every coected copoet of G s has at ost oe cycle. Proof: Let us reove all the vertices of G s that are ot i ay cycle, ad call the reaiig graph G 0. Every cycle i G 0 ust have both black ad red edges. Note that the black edges belog to the disjoit black paths, ad the red edges have the properties described i Exaple 11. Let x deote the uber of red edges i G 0. The begiig poit of the x red edges (if we view the as directed edges) belog to x differet black paths. Sice every vertex i G 0 is i a cycle, ad every begiig poit of a red edge (if we view it as a directed edge) of G 0 is icidet to exactly oe red edge ad oe black edge, each of those x black paths ust also cotai exactly oe ed poit of a red edge (if we view it as a directed edge). So every vertex i G 0 has degree two. So G 0 cosists of vertex-disjoit cycles. So all the cycles i G s are vertex-disjoit. If a path i G s coects two cycles, the path would start with a red edge; but that red edge would have to share the startig poit of aother red edge the latter edge is i a cycle which would be ipossible. So every coected copoet of G s has at ost oe cycle. We defie a fuctio w(j) for j {y + 2, y + 3,..., }. Give a cycle C i G s, let us call its vertices i 1, i 2,..., i x. The for j {i 1, i 2,..., i x } {y + 2, y + 3,..., }, let w(j) = 1 if j = ax{{i 1, i 2,..., i x } {y + 2, y + 3,..., }}, ad w(j) = 1 otherwise. For a vertex j {y + 2, y + 3,..., } ot i ay cycle of G s, let w(j) = 1. We ow preset the codig-based algorith. It uses + y + 1 erasures to ove data. For siplicity, we choose the coputatio to be over GF(3), whose eleets are {0, 1, 1}. It is also feasible to use GF(q) with q > 3. Algorith 13 CODING-BASED DATA MOVEMENT Step 1: For i = 1, 2,..., y + 1, do: If p i is ot the tail of its perutatio cycle, write the data d i d α 1 (i) j γ(i) w(j)d j ito the page p i 1 ; otherwise, write the data d i j γ(i) w(j)d j ito the page p i 1. Erase the block B i. Step 2: For i = y + 1, y + 2,..., 1, write the data d α 1 (i) ito the page p i, the erase the block B i+1. Step 3: Write the data d α 1 () ito the page p, the erase the block B y. Step 4: For i = y, y 1,..., 1, write the data d α 1 (i) ito the page p i, the erase the block B i 1. Exaple 14. Let the data oveet proble be as show i Fig. 1 (a), ad we use Algorith 13 to ove data. The data stored i the pages p 0,..., p 14 durig the data oveet process are show i Fig. 2. Note that p 1,..., p y are erased twice each, while p y+1,..., p ad p 0 are erased oce each. The total uber of erasures is + y + 1. pages p 0 p 1 p 2 p 3 p 4 p 5 p 6 p 7 p 8 p 9 p 10 p 11 p 12 p 13 p 14 data d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 9 d 10 d 11 d 12 d 13 d 14 d 1 d 12 d 2 d 13 d 3 d 7 d 4 d 2 d 5 d 3 d 6 d 9 d 7 d 8 d 14 d 9 d 1 d 1 d 8 d 11 d 10 d 6 d 4 d 10 d 13 +d 14 d 12 d 11 d 12 d 13 d 7 d 2 d 3 d 9 d 5 d 14 Figure 2. Exaple of the codig-based data oveet algorith. B. Aalysis To prove that the algorith is correct, the key is to prove that at ay oet of the data-oveet process, all the data ca be recovered by decodig the data curretly stored i the pages. For that, it is helpful to observe the oe-to-oe correspodece betwee the data writte ito the pages ad the vertices/edges of the sybol graph G s : Every vertex i [] of G s correspods to the data d i, ad the edges eterig a vertex i correspod to the data writte ito p i 1 before p i is erased. (That is why G s is called the sybol graph.) For exaple, let us look at vertex 1 i Fig. 1 (b). It has three icoig edges, respectively fro vertex 12, 10 ad 13. Those icoig edges correspod to the sybol d 1 d 12 d 10 d 13. Fro Fig. 2, we see that was the sybol writte ito p 0 (before p 1 is erased by the algorith for the first tie). The vertex 1 itself correspods to the sybol d 1, which was iitially stored i p 1 ad later writte ito p 9 (which are also show i Fig. 2). Algorith 13 always sequetially writes ad erases sybol pairs sharig a coo variable (i.e., d i for soe i), which correspod to a vertex ad its adjacet edge(s) i G s. This akes the stored sybols always liearly idepedet. Theore 15 Whe Algorith 13 is used to ove data, at ay oet, all the data d 1, d 2,..., d ca be recovered by decodig the data curretly stored i the pages p 0, p 1,..., p. Proof: We aalyze the four steps of the algorith, ad use the sybol graph G s for explaatio. Note the oe-to-oe correspodece betwee the data writte ito the pages ad the vertices/edges of G s, which is show above. I step 1, every tie a data sybol d i is erased (with 1 i y + 1), the sybol correspodig to the edges eterig vertex i of G s has bee stored. So for ay sybol d j with 1 j y + 1, there is a set of stored sybols d i0, d i1 d i0 f 0, d i2 d i1 f 1,..., d ix d ix 1 f x 1, such that d ik = α(d ik 1 ) for 1 k x, d ix = d j, ad f 0,..., f x 1 are liear fuctios of d y+2, d y+3,..., d. The sybols d y+2, d y+3,..., d are all stored. So d j ca be decoded.

9 I step 2, cosider a vertex i of G s (with 1 i y + 1) ad the vertices i γ i = {i 1, i 2,..., i x }. Let i 0 = i, ad let i 1 < i 2 < < i x. Note that (i 1, i 0 ), (i 2, i 0 ),..., (i x, i 0 ) are the red edges that share the sae ed poit i 0 i G s. For j = 1, 2,..., x, right before the sybol d ij is erased (fro page p ij ), the sybol d ij 1 has bee stored (i page p ij 1). By the way we set the liear fuctios of the stored sybols ad the fact that every coected copoet of G s has at ost oe cycle, o subset of stored sybols ca be liearly depedet. So all data ca be recovered. I steps 3 ad 4, for ay sybol d j, either there is a set of stored sybols d i0, d i0 d i1 f 0, d i1 d i2 f 1,..., d ix 1 d ix f x 1 with d ik = α(d ik+1 ) for all k, or there is a set of stored sybols d i0, d i1 d i0 f 0, d i2 d i1 f 1,..., d ix d ix 1 f x 1, with d ik = α(d ik 1 ) for all k, such that d ix = d j ad f 0,..., f x 1 are liear fuctios of d y+2, d y+3,..., d. By the way the liear fuctios of the sybols are set ad the fact that every coected copoet of G s has at ost oe cycle, we see that d j ca be decoded. Therefore, Algorith 13 ca successfully ove data usig + y erasures. VI. HARDNESS OF OPTIMIZING DATA MOVEMENT FOR EACH INSTANCE I the last sectio, we have preseted a codig-based algorith that oves data usig + y erasures, oce a caoical labellig of B 1,..., B with paraeter y 2 is give. O the other had, there exists a data-oveet solutio usig + y + 1 erasures if ad oly if there exists a caoical labellig with paraeter y. So the preseted algorith is strictly optial. However, it is NP hard to fid a optial codig-based solutio if the the caoical labellig with iiized paraeter y is ot give first [10]. A atural questio is: What is the coplexity of fidig the best solutio without codig for each specific istace of the data-oveet proble? (Agai, this optiizatio is per-istace istead of for the worst case.) We study this topic i this sectio. We will prove the NP hardess of o-codig solutios for a slightly geeralized versio of the data-oveet proble. Let s allow soe origial data to be just erased, istead of oved. More specifically, we chage the fuctio α to α : {1,..., } {1,..., } {1,..., } { }, where α(i, j) = eas that the data d i,j just eed to be erased, istead of oved. This is a very practical geeralizatio, because i flash eories, there are usually pages whose data are o loger useful, ad such pages are labelled as ivalid i flash eories to be erased later [5]. Let us call this versio the geeralized data-oveet proble. For i, j [], let d(i j) deote the uber of pages of data that eed to ove fro block B i to block B j. That is, d(i j) = {k k [], α(i, k) = j}. We ow defie a cocept called the oveet graph G. Defiitio 16. (MOVEMENT GRAPH) Correspodig to a geeralized data-oveet proble, we build a directed graph G = (V, E) as follows. We let V = {v 1, v 2,, v }, where v i represets the block B i for i []. For ay i, j [] ad i = j, there are d(i j) directed edges fro vertex v i to v j. This graph G = (V, E) is called the oveet graph. Defiitio 17. (PERMUTED LABELLING, ASCENDING EDGES, AND DESCENDING EDGES) Let π be a perutatio of {1, 2,, }. That is, π(i) [] for ay i [], ad π(i) = π(j) for ay i = j []. Let Π deote the set of all the! such perutatios. Let π 1 be the iverse fuctio of π. Give a perutatio π, i the oveet graph G = (V, E), we call a edge fro v i to v j a ascedig edge if π 1 (i) < π 1 (j); we call it a descedig edge if π 1 (i) > π 1 (j). Let A π deote the set of ascedig edges ad D π deote the set of descedig edges, give the perutatio π. Note that E = A π D π. The perutatio π is also called a peruted labellig of the graph G. We first preset a (tight) lower boud for the uber of erasures. The cocept of caoical data-oveet solutio used i the followig proof will also be used later for provig NP hardess ad approxiatio results. Theore 18. For data-oveet solutios without codig, the uber of erasures eeded for ovig data is at least + i π Π A π + i [] d(i i). Ad whe i π Π A π + i [] d(i i), this boud is tight. Proof: Let k deote a o-egative iteger, ad let π deote a perutatio of {1, 2,, }. We call a data-oveet solutio caoical if for soe k ad π it cosists of the followig three steps: Step 1: For i = + 1, + 2,, + k, write data ito the auxiliary block B i. Step 2: For i = π(1), π(2),, π(), erase B i ad the write data ito B i. Step 3: For i = + 1, + 2,, + k, erase the auxiliary block B i. Let P deote the geeralized data oveet proble. Let P deote the sae data oveet proble except that we chage the uber of auxiliary blocks fro to. Clearly, the uber of erasures eeded for proble P is o less tha that for proble P. The idea of the proof is as follows: First, we show that for ay solutio to proble P that uses x erasures, there is a correspodig caoical solutio to proble P that also uses x erasures;

10 Next, we show that every caoical solutio to proble P uses at least + i π Π A π + i [] d(i i) erasures. Let us ow prove the first step. Let s deote a solutio to proble P that uses x erasures. For i = 1, 2,, +, let y i deote the uber of ties that block B i is erased i solutio s. (Clearly, x = + i=1 y i.) We costruct a caoical solutio to proble P that uses x erasures i the followig way: Let z =. For i = + 1, + 2,, + ad j = 1, 2,, y i, do: Icrease z by oe, the write ito the auxiliary block B z the data that were writte ito B i i the solutio s betwee its (j 1)-th erasure ad its j-th erasure. For i = 1, 2,, ad j = 1, 2,, y i 1, do: Icrease z by oe, the write ito the auxiliary block B z the data that were writte ito B i i the solutio s betwee its i-th erasure ad its (i + 1)-th erasure. Let π be such a perutatio of {1, 2,, }: i the solutio s, 1 i < j, the block B π(i) was erased for the last tie (i.e., for its y π(i) -th tie) before the block B π(j) was erased for the last tie (i.e., for its y π(j) -th tie). For i = π(1), π(2),, π(), erase block B i, the write ito B i the data that were writte ito B i i the solutio s after its y i -th erasure. For i = + 1, + 2,, z, erase the auxiliary B i. The above solutio is ideed a feasible solutio to proble P because of its correspodece to the solutio s. What differs the ew solutio fro the solutio s is that istead of erasig data fro a block, the ew solutio keeps the data i soe auxiliary block. (Ad that akes the ew solutio feasible sice o less data is preserved durig the data oveet process.) The ew solutio is a caoical solutio, where the iteger paraeter k = + i=+1 y i + i=1 (y i 1) = x ad the perutatio paraeter π is as specified above. The ew solutio uses k + = x erasures. So the first step i our proof is show to be correct. Let us ow prove the secod step. A caoical solutio to proble P first writes data ito auxiliary blocks, the erases the blocks B π(1), B π(2),, B π() sequetially based o soe perutatio π (ad writes data ito the after the erasures), ad fially erases all the auxiliary blocks. Let π 1 deote the iverse fuctio of π. What kid of data eeds to be writte ito the auxiliary blocks? For the data origially i the page p i,j (where i [] ad j []), aely d i,j, we have If π 1 (α(i, j)) > π 1 (i), the d i,j eeds to be writte ito the auxiliary blocks, because otherwise, whe B i is erased, the data d i,j would be lost. (Note that d i,j eeds to be oved ito B α(i,j), ad i the solutio, B i is erased before B α(i,j).) If π 1 (α(i, j)) = π 1 (i) (i.e., α(i, j) = i), the d i,j eeds to be writte ito the auxiliary blocks, because otherwise, whe B i is erased, the data would be lost. If π 1 (α(i, j)) < π 1 (i), the d i,j does ot eed to be writte ito the auxiliary blocks, because whe B i is erased, it has already bee oved ito B α(i,j). If π 1 (α(i, j)) = φ, the d i,j does ot eed to be writte ito the auxiliary blocks, because the data just eed to be erased. I the above four cases, there are A π pages of data i the first case because every such page of data correspods to a ascedig edge i the oveet graph whose peruted labellig is π. There are i [] d(i i) pages of data i the secod case. So the caoical solutio eeds at least i π Π A π + i [] d(i i) auxiliary blocks to store the data i the first ad secod cases. So the solutio eeds at least + i π Π A π + i [] d(i i) erasures. So the secod step of the proof is also show to be correct. O the other side, whe i π Π A π + i [] d(i i), the solutio described above is also feasible, so the lower boud becoes tight. Theore 19. For the geeralized data-oveet proble, it is NP hard to fid per-istace optial solutios without codig. Proof: It is sufficiet to prove that the proble is NP hard whe. Whe, a optial solutio ca be trasfored ito a caoical optial solutio i polyoial tie. Also, if a caoical optial solutio is kow, a peruted labellig (i.e., perutatio) π for the oveet graph that iiizes the value A π + i [] d(i i) ca be foud i polyoial tie, ad vice versa. (Both are show i the proof of Theore 18.) Let F = (( i [] d(i i)) od ). We see that 0 F 1 ad F is fixed give the istace of the proble. The above observatios show that it is sufficiet to prove that it is NP hard to fid a perutatio π that iiizes A π +F. Let π 0 be a perutatio such that A π0 = i π Π A π. Let π be a perutatio such that A π = i π Π A π +F. (So A π A π0, but A π +F = A π 0 +F.) We will prove two clais: CLAIM ONE: It is APX-hard to fid π 0. CLAIM TWO: It is NP hard to fid π. First, we prove CLAIM ONE usig a reductio fro the APX-hard iiu feedback arc set proble. Give a perutatio π, we ca easily fid the ascedig edges A π. Sice every cycle i the oveet graph G = (V, E) ust cotai a ascedig edge, A π is also a feedback arc set of G. (A feedback arc set of a direct graph is a subset of edges such that every

11 cycle cotais at least oe edge fro the subset.) O the other side, give a feedback arc set S E of G, we ca easily fid a topological orderig of the vertices of the directed acyclic graph G S = (V, E S) such that all the edges of G S are descedig edges. (Note that a topological orderig is also a perutatio of the vertices.) So if we use π S to deote this topological orderig, the A πs S. So it is ot difficult to see that a iiu feedback arc set is also a iiu set of ascedig edges, ad vice versa. (Also ote that every directed graph ca be the oveet graph of a data oveet proble.) So fidig π 0 is equivalet to the iiu feedback arc set proble, which is APX hard. So CLAIM ONE is true. We ow prove CLAIM TWO by cotradictio. Suppose that there is a polyoial-tie algorith to fid π. We have show that fidig π 0 is APX-hard, which eas that there exists a costat c > 1 such that o polyoial-tie algorith ca guaratee to fid a perutatio π with the property A π < c A π0, assuig P = NP. Let G z = (V z, E z ) be a graph that cosists of z copies of the data oveet graph G = (V, E), where z = c 1. Clearly, G z is also the data oveet graph of a data oveet proble, ad its optial data oveet solutio uses z + z( A π 0 + i [] d(i i)) erasures. (W.l.o.g., we ca assue that A π0 1.) We ca use the polyoial-tie algorith to fid a optial solutio for G z that applies the sae perutatio π to the z subgraphs of G z, which uses z + z( A π + i [] d(i i)) erasures. So z + z( A π 0 + i [] d(i i)) = z + z( A π + i [] d(i i)). So z( A π 0 +F) = z( A π +F). So z( A π + F) z( A π0 + F) + ( 1). So A π A π0 + 1 z = A π0 + 1 /(c 1) < A π 0 + (c 1) A π0 (1 + c 1 A π0 ) A π 0 (1 + c 1) = c A π0. That cotradicts the fact that o polyoial-tie algorith ca guaratee to fid a perutatio π with the property A π < c A π0, assuig P = NP. So it is NP hard to fid π. So CLAIM TWO is true, ad the theore is proved. Let us ow study approxiatio algoriths for the data oveet proble, for the case where. I this case, caoical solutios exist; ad to iiize the uber of erasures, we just eed to fid a peruted labellig π that iiizes the uber of ascedig edges. As show i the proof of Theore 19, this is the sae as fidig the iiu feedback arc set. There are kow approxiatio algoriths for the latter proble [3]. We ow preset the correspodig approxiatio algorith for the data oveet proble. Algorith 20. (Caoical data-oveet algorith without codig) Let G = (V, E) be the oveet graph. Let F be a kow approxiatio algorith for the iiu feedback arc set proble. 1) Use the algorith F to fid a feedback arc set S of the oveet graph G. 2) Fid a topological orderig π of the acyclic directed graph G S = (V, E S), such that all the edges of G S are descedig edges. (Note that a topological orderig is also a perutatio of the vertices.) 3) Let π be the peruted orderig for G. Let S S be the set of ascedig edges i S. 2 Let z = S + i [] d(i i). 4) Write ito the auxiliary blocks B +1, B +2,, B +z the data that either correspod to the ascedig edges or are required by this proble to stay i their origial blocks. 5) For i = π(1), π(2),, π(), erase block B i, the write ito it the data that are required to be oved ito it by this proble. 6) Erase the auxiliary blocks B +1, B +2,, B +z. The followig result aalyzes the approxiatio ratio of Algorith 24. Theore 21. Let c deote the approxiatio ratio of the kow algorith F for the size of the feedback arc set. The the approxiatio ratio of Algorith 24 for the uber of erasures is at ost 3c 2c c 2c + 1 < i{ 3 2, c}. Proof: Let S be the iiu feedback arc set of the oveet graph G. The the algorith F fids a feedback arc set S of size S c S. The optial solutio without codig to the data oveet proble uses + S + i [] d(i i) erasures. Algorith 24 uses + S + i [] d(i i) erasures. We have S i [] d(i i) 2 because it is trivial to obtai a 2 I fact, sice S S is also a feedback arc set, a carefully desiged algorith F will have S = S.

12 feedback arc set i G that cosists of half of its edges. So the approxiatio ratio of Algorith 24 is < = + S + i [] d(i i) + S + i [] d(i i) + S + i [] d(i i) +1 + S + i [] d(i i) + S + i [] d(i i) + S + i [] d(i i) /2 + + /2c c + 1 = 3c 2c VII. CONCLUSIONS I this paper, we preset both codig ad o-codig based algoriths for efficiet data oveet i flash eories. By provig a lower boud for the uber of erasures used by algoriths without codig, we rigorously show the advatage of codig. The hardess ad the approxiatio of per-istace optiizatio are also studied. APPENDIX We describe here a algorith for the o-codig data oveet proble that is efficiet ad has a straightforward ipleetatio. The odel we use is slightly differet fro the oe i previous sectios, but oly for the sake of a clear descriptio. More specifically, we odel the data by a atrix. Each etry is labeled with a uber fro 0 to 1, specifyig the destiatio block. For each label i, there are exactly etries labeled with i. I the costructio below we use = = 2 p ad = 2. It is ot hard to verify that the costructio exteds to geearal ad arbitrary (by chagig the uderlyig alphabet used i the costructio fro 2 to sybols). A. Decopositio by Hall s Theore We ca apply the well kow Hall s theore fro cobiatorics to decopose the atrix ito sets S 0,..., S 1, such that each set cotais all the ubers fro 0 to 1 exactly oce, ad also each set cotais exactly oe uber fro each colu. For copleteess, we iclude Hall s theore below [2]: Theore 22.[Hall] There exists a syste of distict represetatives for a faily of sets iff the uio of ay k of these sets cotais at least k eleets for all k fro 1 to. I our case a set is a colu, ad the faily of sets is the etire atrix. It is easy to verify that the uio of ay k colus, for all k fro 1 to cotais at least k differet ubers. Therefore the theore applies, ad the decopositio ca be foud i O( 3 log ), or O( 2 log ) i geeral [1], while this does ot ivolve ay erasure. B. Data Moveet by Twice Traspose The data oveet proble ca be solved by two applicatios of a algorith that realizes the traspose of the atrix. First, we decopose the atrix by Hall s theore, to obtai the sets S 0,..., S 1 as described before. With erasures, by chagig the positio of pages withi each colu, each set S i ca be oved to occupy the i-th row of the atrix. After the first traspose, each set S i will ocuppy the i-th colu. With ore erasures, agai rearrageets withi each colu, every set S i ca be ordered fro 0 to 1. Fially, the secod traspose gives the desired cofiguratio. We show a exaple for a 4 4 atrix. Exaple 23. The Hall decopositio is show by usig card suits, idexed by the origial uber of the etry. Notice that each suit has all the idexes fro 0 to 3. The we rearrage each colu such that at the ed every suit appears i oe lie. After the first traspose, every suit appears i oe colu. After aother vertical rearrageet of each colu followed by a traspose, we reach the fial state where all idexes i belog to colu i, for i {0,..., 1} Hall decopositio First traspose Secod traspose { }} { { }} {{ }} {

Chapter 2. Asymptotic Notation

Chapter 2. Asymptotic Notation Asyptotic Notatio 3 Chapter Asyptotic Notatio Goal : To siplify the aalysis of ruig tie by gettig rid of details which ay be affected by specific ipleetatio ad hardware. [1] The Big Oh (O-Notatio) : It

More information

distinct distinct n k n k n! n n k k n 1 if k n, identical identical p j (k) p 0 if k > n n (k)

distinct distinct n k n k n! n n k k n 1 if k n, identical identical p j (k) p 0 if k > n n (k) THE TWELVEFOLD WAY FOLLOWING GIAN-CARLO ROTA How ay ways ca we distribute objects to recipiets? Equivaletly, we wat to euerate equivalece classes of fuctios f : X Y where X = ad Y = The fuctios are subject

More information

Binomial transform of products

Binomial transform of products Jauary 02 207 Bioial trasfor of products Khristo N Boyadzhiev Departet of Matheatics ad Statistics Ohio Norther Uiversity Ada OH 4580 USA -boyadzhiev@ouedu Abstract Give the bioial trasfors { b } ad {

More information

19.1 The dictionary problem

19.1 The dictionary problem CS125 Lecture 19 Fall 2016 19.1 The dictioary proble Cosider the followig data structural proble, usually called the dictioary proble. We have a set of ites. Each ite is a (key, value pair. Keys are i

More information

Probabilistic Analysis of Rectilinear Steiner Trees

Probabilistic Analysis of Rectilinear Steiner Trees Probabilistic Aalysis of Rectiliear Steier Trees Chuhog Che Departet of Electrical ad Coputer Egieerig Uiversity of Widsor, Otario, Caada, N9B 3P4 E-ail: cche@uwidsor.ca Abstract Steier tree is a fudaetal

More information

42 Dependence and Bases

42 Dependence and Bases 42 Depedece ad Bases The spa s(a) of a subset A i vector space V is a subspace of V. This spa ay be the whole vector space V (we say the A spas V). I this paragraph we study subsets A of V which spa V

More information

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS DEMETRES CHRISTOFIDES Abstract. Cosider a ivertible matrix over some field. The Gauss-Jorda elimiatio reduces this matrix to the idetity

More information

Math 4707 Spring 2018 (Darij Grinberg): midterm 2 page 1. Math 4707 Spring 2018 (Darij Grinberg): midterm 2 with solutions [preliminary version]

Math 4707 Spring 2018 (Darij Grinberg): midterm 2 page 1. Math 4707 Spring 2018 (Darij Grinberg): midterm 2 with solutions [preliminary version] Math 4707 Sprig 08 Darij Griberg: idter page Math 4707 Sprig 08 Darij Griberg: idter with solutios [preliiary versio] Cotets 0.. Coutig first-eve tuples......................... 3 0.. Coutig legal paths

More information

AVERAGE MARKS SCALING

AVERAGE MARKS SCALING TERTIARY INSTITUTIONS SERVICE CENTRE Level 1, 100 Royal Street East Perth, Wester Australia 6004 Telephoe (08) 9318 8000 Facsiile (08) 95 7050 http://wwwtisceduau/ 1 Itroductio AVERAGE MARKS SCALING I

More information

Integrals of Functions of Several Variables

Integrals of Functions of Several Variables Itegrals of Fuctios of Several Variables We ofte resort to itegratios i order to deterie the exact value I of soe quatity which we are uable to evaluate by perforig a fiite uber of additio or ultiplicatio

More information

COMP 2804 Solutions Assignment 1

COMP 2804 Solutions Assignment 1 COMP 2804 Solutios Assiget 1 Questio 1: O the first page of your assiget, write your ae ad studet uber Solutio: Nae: Jaes Bod Studet uber: 007 Questio 2: I Tic-Tac-Toe, we are give a 3 3 grid, cosistig

More information

Name Period ALGEBRA II Chapter 1B and 2A Notes Solving Inequalities and Absolute Value / Numbers and Functions

Name Period ALGEBRA II Chapter 1B and 2A Notes Solving Inequalities and Absolute Value / Numbers and Functions Nae Period ALGEBRA II Chapter B ad A Notes Solvig Iequalities ad Absolute Value / Nubers ad Fuctios SECTION.6 Itroductio to Solvig Equatios Objectives: Write ad solve a liear equatio i oe variable. Solve

More information

) is a square matrix with the property that for any m n matrix A, the product AI equals A. The identity matrix has a ii

) is a square matrix with the property that for any m n matrix A, the product AI equals A. The identity matrix has a ii square atrix is oe that has the sae uber of rows as colus; that is, a atrix. he idetity atrix (deoted by I, I, or [] I ) is a square atrix with the property that for ay atrix, the product I equals. he

More information

Note that the argument inside the second square root is always positive since R L > Z 0. The series reactance can be found as

Note that the argument inside the second square root is always positive since R L > Z 0. The series reactance can be found as Ipedace Matchig Ipedace Matchig Itroductio Ipedace atchig is the process to atch the load to a trasissio lie by a atchig etwork, as depicted i Fig Recall that the reflectios are eliiated uder the atched

More information

Discrete Mathematics: Lectures 8 and 9 Principle of Inclusion and Exclusion Instructor: Arijit Bishnu Date: August 11 and 13, 2009

Discrete Mathematics: Lectures 8 and 9 Principle of Inclusion and Exclusion Instructor: Arijit Bishnu Date: August 11 and 13, 2009 Discrete Matheatics: Lectures 8 ad 9 Priciple of Iclusio ad Exclusio Istructor: Arijit Bishu Date: August ad 3, 009 As you ca observe by ow, we ca cout i various ways. Oe such ethod is the age-old priciple

More information

Statistics and Data Analysis in MATLAB Kendrick Kay, February 28, Lecture 4: Model fitting

Statistics and Data Analysis in MATLAB Kendrick Kay, February 28, Lecture 4: Model fitting Statistics ad Data Aalysis i MATLAB Kedrick Kay, kedrick.kay@wustl.edu February 28, 2014 Lecture 4: Model fittig 1. The basics - Suppose that we have a set of data ad suppose that we have selected the

More information

4.3 Growth Rates of Solutions to Recurrences

4.3 Growth Rates of Solutions to Recurrences 4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.

More information

Infinite Sequences and Series

Infinite Sequences and Series Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet

More information

ECE 901 Lecture 4: Estimation of Lipschitz smooth functions

ECE 901 Lecture 4: Estimation of Lipschitz smooth functions ECE 9 Lecture 4: Estiatio of Lipschitz sooth fuctios R. Nowak 5/7/29 Cosider the followig settig. Let Y f (X) + W, where X is a rado variable (r.v.) o X [, ], W is a r.v. o Y R, idepedet of X ad satisfyig

More information

Rank Modulation with Multiplicity

Rank Modulation with Multiplicity Rak Modulatio with Multiplicity Axiao (Adrew) Jiag Computer Sciece ad Eg. Dept. Texas A&M Uiversity College Statio, TX 778 ajiag@cse.tamu.edu Abstract Rak modulatio is a scheme that uses the relative order

More information

Lecture 19. Curve fitting I. 1 Introduction. 2 Fitting a constant to measured data

Lecture 19. Curve fitting I. 1 Introduction. 2 Fitting a constant to measured data Lecture 9 Curve fittig I Itroductio Suppose we are preseted with eight poits of easured data (x i, y j ). As show i Fig. o the left, we could represet the uderlyig fuctio of which these data are saples

More information

Contents Two Sample t Tests Two Sample t Tests

Contents Two Sample t Tests Two Sample t Tests Cotets 3.5.3 Two Saple t Tests................................... 3.5.3 Two Saple t Tests Setup: Two Saples We ow focus o a sceario where we have two idepedet saples fro possibly differet populatios. Our

More information

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ. 2 5. Weighted umber of late jobs 5.1. Release dates ad due dates: maximimizig the weight of o-time jobs Oce we add release dates, miimizig the umber of late jobs becomes a sigificatly harder problem. For

More information

(s)h(s) = K( s + 8 ) = 5 and one finite zero is located at z 1

(s)h(s) = K( s + 8 ) = 5 and one finite zero is located at z 1 ROOT LOCUS TECHNIQUE 93 should be desiged differetly to eet differet specificatios depedig o its area of applicatio. We have observed i Sectio 6.4 of Chapter 6, how the variatio of a sigle paraeter like

More information

5.6 Binomial Multi-section Matching Transformer

5.6 Binomial Multi-section Matching Transformer 4/14/21 5_6 Bioial Multisectio Matchig Trasforers 1/1 5.6 Bioial Multi-sectio Matchig Trasforer Readig Assiget: pp. 246-25 Oe way to axiize badwidth is to costruct a ultisectio Γ f that is axially flat.

More information

Lecture Outline. 2 Separating Hyperplanes. 3 Banach Mazur Distance An Algorithmist s Toolkit October 22, 2009

Lecture Outline. 2 Separating Hyperplanes. 3 Banach Mazur Distance An Algorithmist s Toolkit October 22, 2009 18.409 A Algorithist s Toolkit October, 009 Lecture 1 Lecturer: Joatha Keler Scribes: Alex Levi (009) 1 Outlie Today we ll go over soe of the details fro last class ad ake precise ay details that were

More information

Recurrence Relations

Recurrence Relations Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The

More information

Perturbation Theory, Zeeman Effect, Stark Effect

Perturbation Theory, Zeeman Effect, Stark Effect Chapter 8 Perturbatio Theory, Zeea Effect, Stark Effect Ufortuately, apart fro a few siple exaples, the Schrödiger equatio is geerally ot exactly solvable ad we therefore have to rely upo approxiative

More information

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects

More information

The Binomial Multi-Section Transformer

The Binomial Multi-Section Transformer 4/15/2010 The Bioial Multisectio Matchig Trasforer preset.doc 1/24 The Bioial Multi-Sectio Trasforer Recall that a ulti-sectio atchig etwork ca be described usig the theory of sall reflectios as: where:

More information

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution EEL5: Discrete-Time Sigals ad Systems. Itroductio I this set of otes, we begi our mathematical treatmet of discrete-time s. As show i Figure, a discrete-time operates or trasforms some iput sequece x [

More information

Problem Set 2 Solutions

Problem Set 2 Solutions CS271 Radomess & Computatio, Sprig 2018 Problem Set 2 Solutios Poit totals are i the margi; the maximum total umber of poits was 52. 1. Probabilistic method for domiatig sets 6pts Pick a radom subset S

More information

Lecture 1: Basic problems of coding theory

Lecture 1: Basic problems of coding theory Lecture 1: Basic problems of codig theory Error-Correctig Codes (Sprig 016) Rutgers Uiversity Swastik Kopparty Scribes: Abhishek Bhrushudi & Aditya Potukuchi Admiistrivia was discussed at the begiig of

More information

5.6 Binomial Multi-section Matching Transformer

5.6 Binomial Multi-section Matching Transformer 4/14/2010 5_6 Bioial Multisectio Matchig Trasforers 1/1 5.6 Bioial Multi-sectio Matchig Trasforer Readig Assiget: pp. 246-250 Oe way to axiize badwidth is to costruct a ultisectio Γ f that is axially flat.

More information

Automated Proofs for Some Stirling Number Identities

Automated Proofs for Some Stirling Number Identities Autoated Proofs for Soe Stirlig Nuber Idetities Mauel Kauers ad Carste Scheider Research Istitute for Sybolic Coputatio Johaes Kepler Uiversity Altebergerstraße 69 A4040 Liz, Austria Subitted: Sep 1, 2007;

More information

On an Algorithm for Isomorphism-Free Generations of Combinatorial Objects

On an Algorithm for Isomorphism-Free Generations of Combinatorial Objects O a Algorith for Isoorphis-Free Geeratios of Cobiatorial Objects Krasiir Yordzhev Faculty of Matheatics ad Natural Scieces South-West Uiversity, Blagoevgrad, Bulgaria yordzhev@swubg Abstract: I the wor

More information

The Hypergeometric Coupon Collection Problem and its Dual

The Hypergeometric Coupon Collection Problem and its Dual Joural of Idustrial ad Systes Egieerig Vol., o., pp -7 Sprig 7 The Hypergeoetric Coupo Collectio Proble ad its Dual Sheldo M. Ross Epstei Departet of Idustrial ad Systes Egieerig, Uiversity of Souther

More information

Double Derangement Permutations

Double Derangement Permutations Ope Joural of iscrete Matheatics, 206, 6, 99-04 Published Olie April 206 i SciRes http://wwwscirporg/joural/ojd http://dxdoiorg/04236/ojd2066200 ouble erageet Perutatios Pooya aeshad, Kayar Mirzavaziri

More information

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero? 2 Lebesgue Measure I Chapter 1 we defied the cocept of a set of measure zero, ad we have observed that every coutable set is of measure zero. Here are some atural questios: If a subset E of R cotais a

More information

1 (12 points) Red-Black trees and Red-Purple trees

1 (12 points) Red-Black trees and Red-Purple trees CS6 Hoework 3 Due: 29 April 206, 2 oo Subit o Gradescope Haded out: 22 April 206 Istructios: Please aswer the followig questios to the best of your ability. If you are asked to desig a algorith, please

More information

A string of not-so-obvious statements about correlation in the data. (This refers to the mechanical calculation of correlation in the data.

A string of not-so-obvious statements about correlation in the data. (This refers to the mechanical calculation of correlation in the data. STAT-UB.003 NOTES for Wedesday 0.MAY.0 We will use the file JulieApartet.tw. We ll give the regressio of Price o SqFt, show residual versus fitted plot, save residuals ad fitted. Give plot of (Resid, Price,

More information

A PROBABILITY PROBLEM

A PROBABILITY PROBLEM A PROBABILITY PROBLEM A big superarket chai has the followig policy: For every Euros you sped per buy, you ear oe poit (suppose, e.g., that = 3; i this case, if you sped 8.45 Euros, you get two poits,

More information

The Binomial Multi- Section Transformer

The Binomial Multi- Section Transformer 4/4/26 The Bioial Multisectio Matchig Trasforer /2 The Bioial Multi- Sectio Trasforer Recall that a ulti-sectio atchig etwork ca be described usig the theory of sall reflectios as: where: ( ω ) = + e +

More information

Bertrand s postulate Chapter 2

Bertrand s postulate Chapter 2 Bertrad s postulate Chapter We have see that the sequece of prie ubers, 3, 5, 7,... is ifiite. To see that the size of its gaps is ot bouded, let N := 3 5 p deote the product of all prie ubers that are

More information

The Random Walk For Dummies

The Random Walk For Dummies The Radom Walk For Dummies Richard A Mote Abstract We look at the priciples goverig the oe-dimesioal discrete radom walk First we review five basic cocepts of probability theory The we cosider the Beroulli

More information

Bernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes

Bernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes Beroulli Polyoials Tals give at LSBU, October ad Noveber 5 Toy Forbes Beroulli Polyoials The Beroulli polyoials B (x) are defied by B (x), Thus B (x) B (x) ad B (x) x, B (x) x x + 6, B (x) dx,. () B 3

More information

Lecture 10: Bounded Linear Operators and Orthogonality in Hilbert Spaces

Lecture 10: Bounded Linear Operators and Orthogonality in Hilbert Spaces Lecture : Bouded Liear Operators ad Orthogoality i Hilbert Spaces 34 Bouded Liear Operator Let ( X, ), ( Y, ) i i be ored liear vector spaces ad { } X Y The, T is said to be bouded if a real uber c such

More information

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece,, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet as

More information

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary Recursive Algorithm for Geeratig Partitios of a Iteger Sug-Hyuk Cha Computer Sciece Departmet, Pace Uiversity 1 Pace Plaza, New York, NY 10038 USA scha@pace.edu Abstract. This article first reviews the

More information

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row: Math 5-4 Tue Feb 4 Cotiue with sectio 36 Determiats The effective way to compute determiats for larger-sized matrices without lots of zeroes is to ot use the defiitio, but rather to use the followig facts,

More information

Teacher s Marking. Guide/Answers

Teacher s Marking. Guide/Answers WOLLONGONG COLLEGE AUSRALIA eacher s Markig A College of the Uiversity of Wollogog Guide/Aswers Diploa i Iforatio echology Fial Exaiatio Autu 008 WUC Discrete Matheatics his exa represets 60% of the total

More information

Optimal Estimator for a Sample Set with Response Error. Ed Stanek

Optimal Estimator for a Sample Set with Response Error. Ed Stanek Optial Estiator for a Saple Set wit Respose Error Ed Staek Itroductio We develop a optial estiator siilar to te FP estiator wit respose error tat was cosidered i c08ed63doc Te first 6 pages of tis docuet

More information

Summer MA Lesson 13 Section 1.6, Section 1.7 (part 1)

Summer MA Lesson 13 Section 1.6, Section 1.7 (part 1) Suer MA 1500 Lesso 1 Sectio 1.6, Sectio 1.7 (part 1) I Solvig Polyoial Equatios Liear equatio ad quadratic equatios of 1 variable are specific types of polyoial equatios. Soe polyoial equatios of a higher

More information

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES Read Sectio 1.5 (pages 5 9) Overview I Sectio 1.5 we lear to work with summatio otatio ad formulas. We will also itroduce a brief overview of sequeces,

More information

X. Perturbation Theory

X. Perturbation Theory X. Perturbatio Theory I perturbatio theory, oe deals with a ailtoia that is coposed Ĥ that is typically exactly solvable of two pieces: a referece part ad a perturbatio ( Ĥ ) that is assued to be sall.

More information

Chapter Vectors

Chapter Vectors Chapter 4. Vectors fter readig this chapter you should be able to:. defie a vector. add ad subtract vectors. fid liear combiatios of vectors ad their relatioship to a set of equatios 4. explai what it

More information

The multiplicative structure of finite field and a construction of LRC

The multiplicative structure of finite field and a construction of LRC IERG6120 Codig for Distributed Storage Systems Lecture 8-06/10/2016 The multiplicative structure of fiite field ad a costructio of LRC Lecturer: Keeth Shum Scribe: Zhouyi Hu Notatios: We use the otatio

More information

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018) Radomized Algorithms I, Sprig 08, Departmet of Computer Sciece, Uiversity of Helsiki Homework : Solutios Discussed Jauary 5, 08). Exercise.: Cosider the followig balls-ad-bi game. We start with oe black

More information

Ma/CS 6a Class 22: Power Series

Ma/CS 6a Class 22: Power Series Ma/CS 6a Class 22: Power Series By Ada Sheffer Power Series Mooial: ax i. Polyoial: a 0 + a 1 x + a 2 x 2 + + a x. Power series: A x = a 0 + a 1 x + a 2 x 2 + Also called foral power series, because we

More information

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece 1, 1, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet

More information

The Growth of Functions. Theoretical Supplement

The Growth of Functions. Theoretical Supplement The Growth of Fuctios Theoretical Supplemet The Triagle Iequality The triagle iequality is a algebraic tool that is ofte useful i maipulatig absolute values of fuctios. The triagle iequality says that

More information

Introduction to Optimization, DIKU Monday 19 November David Pisinger. Duality, motivation

Introduction to Optimization, DIKU Monday 19 November David Pisinger. Duality, motivation Itroductio to Optiizatio, DIKU 007-08 Moday 9 Noveber David Pisiger Lecture, Duality ad sesitivity aalysis Duality, shadow prices, sesitivity aalysis, post-optial aalysis, copleetary slackess, KKT optiality

More information

Supplementary Material

Supplementary Material Suppleetary Material Wezhuo Ya a0096049@us.edu.s Departet of Mechaical Eieeri, Natioal Uiversity of Siapore, Siapore 117576 Hua Xu pexuh@us.edu.s Departet of Mechaical Eieeri, Natioal Uiversity of Siapore,

More information

Optimally Sparse SVMs

Optimally Sparse SVMs A. Proof of Lemma 3. We here prove a lower boud o the umber of support vectors to achieve geeralizatio bouds of the form which we cosider. Importatly, this result holds ot oly for liear classifiers, but

More information

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations Differece Equatios to Differetial Equatios Sectio. Calculus: Areas Ad Tagets The study of calculus begis with questios about chage. What happes to the velocity of a swigig pedulum as its positio chages?

More information

Define a Markov chain on {1,..., 6} with transition probability matrix P =

Define a Markov chain on {1,..., 6} with transition probability matrix P = Pla Group Work 0. The title says it all Next Tie: MCMC ad Geeral-state Markov Chais Midter Exa: Tuesday 8 March i class Hoework 4 due Thursday Uless otherwise oted, let X be a irreducible, aperiodic Markov

More information

1 The Primal and Dual of an Optimization Problem

1 The Primal and Dual of an Optimization Problem CS 189 Itroductio to Machie Learig Fall 2017 Note 18 Previously, i our ivestigatio of SVMs, we forulated a costraied optiizatio proble that we ca solve to fid the optial paraeters for our hyperplae decisio

More information

MATH10040 Chapter 4: Sets, Functions and Counting

MATH10040 Chapter 4: Sets, Functions and Counting MATH10040 Chapter 4: Sets, Fuctios ad Coutig 1. The laguage of sets Iforally, a set is ay collectio of objects. The objects ay be atheatical objects such as ubers, fuctios ad eve sets, or letters or sybols

More information

Axioms of Measure Theory

Axioms of Measure Theory MATH 532 Axioms of Measure Theory Dr. Neal, WKU I. The Space Throughout the course, we shall let X deote a geeric o-empty set. I geeral, we shall ot assume that ay algebraic structure exists o X so that

More information

We have also learned that, thanks to the Central Limit Theorem and the Law of Large Numbers,

We have also learned that, thanks to the Central Limit Theorem and the Law of Large Numbers, Cofidece Itervals III What we kow so far: We have see how to set cofidece itervals for the ea, or expected value, of a oral probability distributio, both whe the variace is kow (usig the stadard oral,

More information

End-of-Year Contest. ERHS Math Club. May 5, 2009

End-of-Year Contest. ERHS Math Club. May 5, 2009 Ed-of-Year Cotest ERHS Math Club May 5, 009 Problem 1: There are 9 cois. Oe is fake ad weighs a little less tha the others. Fid the fake coi by weighigs. Solutio: Separate the 9 cois ito 3 groups (A, B,

More information

Geometry Unit 3 Notes Parallel and Perpendicular Lines

Geometry Unit 3 Notes Parallel and Perpendicular Lines Review Cocepts: Equatios of Lies Geoetry Uit Notes Parallel ad Perpedicular Lies Syllabus Objective:. - The studet will differetiate aog parallel, perpedicular, ad skew lies. Lies that DO NOT itersect:

More information

MA131 - Analysis 1. Workbook 2 Sequences I

MA131 - Analysis 1. Workbook 2 Sequences I MA3 - Aalysis Workbook 2 Sequeces I Autum 203 Cotets 2 Sequeces I 2. Itroductio.............................. 2.2 Icreasig ad Decreasig Sequeces................ 2 2.3 Bouded Sequeces..........................

More information

Lecture Notes for Analysis Class

Lecture Notes for Analysis Class Lecture Notes for Aalysis Class Topological Spaces A topology for a set X is a collectio T of subsets of X such that: (a) X ad the empty set are i T (b) Uios of elemets of T are i T (c) Fiite itersectios

More information

Product measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014.

Product measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014. Product measures, Toelli s ad Fubii s theorems For use i MAT3400/4400, autum 2014 Nadia S. Larse Versio of 13 October 2014. 1. Costructio of the product measure The purpose of these otes is to preset the

More information

MA131 - Analysis 1. Workbook 3 Sequences II

MA131 - Analysis 1. Workbook 3 Sequences II MA3 - Aalysis Workbook 3 Sequeces II Autum 2004 Cotets 2.8 Coverget Sequeces........................ 2.9 Algebra of Limits......................... 2 2.0 Further Useful Results........................

More information

f(1), and so, if f is continuous, f(x) = f(1)x.

f(1), and so, if f is continuous, f(x) = f(1)x. 2.2.35: Let f be a additive fuctio. i Clearly fx = fx ad therefore f x = fx for all Z+ ad x R. Hece, for ay, Z +, f = f, ad so, if f is cotiuous, fx = fx. ii Suppose that f is bouded o soe o-epty ope set.

More information

Stream Ciphers (contd.) Debdeep Mukhopadhyay

Stream Ciphers (contd.) Debdeep Mukhopadhyay Strea Ciphers (cotd.) Debdeep Mukhopadhyay Assistat Professor Departet of Coputer Sciece ad Egieerig Idia Istitute of Techology Kharagpur IDIA -7232 Objectives iear Coplexity Berlekap Massey Algorith ow

More information

Analysis of Algorithms. Introduction. Contents

Analysis of Algorithms. Introduction. Contents Itroductio The focus of this module is mathematical aspects of algorithms. Our mai focus is aalysis of algorithms, which meas evaluatig efficiecy of algorithms by aalytical ad mathematical methods. We

More information

OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES

OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES Peter M. Maurer Why Hashig is θ(). As i biary search, hashig assumes that keys are stored i a array which is idexed by a iteger. However, hashig attempts to bypass

More information

Lecture 2: April 3, 2013

Lecture 2: April 3, 2013 TTIC/CMSC 350 Mathematical Toolkit Sprig 203 Madhur Tulsiai Lecture 2: April 3, 203 Scribe: Shubhedu Trivedi Coi tosses cotiued We retur to the coi tossig example from the last lecture agai: Example. Give,

More information

Zeros of Polynomials

Zeros of Polynomials Math 160 www.timetodare.com 4.5 4.6 Zeros of Polyomials I these sectios we will study polyomials algebraically. Most of our work will be cocered with fidig the solutios of polyomial equatios of ay degree

More information

Answer Key, Problem Set 1, Written

Answer Key, Problem Set 1, Written Cheistry 1 Mies, Sprig, 018 Aswer Key, Proble Set 1, Writte 1. 14.3;. 14.34 (add part (e): Estiate / calculate the iitial rate of the reactio); 3. NT1; 4. NT; 5. 14.37; 6. 14.39; 7. 14.41; 8. NT3; 9. 14.46;

More information

Fortgeschrittene Datenstrukturen Vorlesung 11

Fortgeschrittene Datenstrukturen Vorlesung 11 Fortgeschrittee Datestruture Vorlesug 11 Schriftführer: Marti Weider 19.01.2012 1 Succict Data Structures (ctd.) 1.1 Select-Queries A slightly differet approach, compared to ra, is used for select. B represets

More information

Feedback in Iterative Algorithms

Feedback in Iterative Algorithms Feedback i Iterative Algorithms Charles Byre (Charles Byre@uml.edu), Departmet of Mathematical Scieces, Uiversity of Massachusetts Lowell, Lowell, MA 01854 October 17, 2005 Abstract Whe the oegative system

More information

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3 MATH 337 Sequeces Dr. Neal, WKU Let X be a metric space with distace fuctio d. We shall defie the geeral cocept of sequece ad limit i a metric space, the apply the results i particular to some special

More information

A Tabu Search Method for Finding Minimal Multi-Homogeneous Bézout Number

A Tabu Search Method for Finding Minimal Multi-Homogeneous Bézout Number Joural of Matheatics ad Statistics 6 (): 105-109, 010 ISSN 1549-3644 010 Sciece Publicatios A Tabu Search Method for Fidig Miial Multi-Hoogeeous Bézout Nuber Hassa M.S. Bawazir ad Ali Abd Raha Departet

More information

Inverse Matrix. A meaning that matrix B is an inverse of matrix A.

Inverse Matrix. A meaning that matrix B is an inverse of matrix A. Iverse Matrix Two square matrices A ad B of dimesios are called iverses to oe aother if the followig holds, AB BA I (11) The otio is dual but we ofte write 1 B A meaig that matrix B is a iverse of matrix

More information

Lecture 2. The Lovász Local Lemma

Lecture 2. The Lovász Local Lemma Staford Uiversity Sprig 208 Math 233A: No-costructive methods i combiatorics Istructor: Ja Vodrák Lecture date: Jauary 0, 208 Origial scribe: Apoorva Khare Lecture 2. The Lovász Local Lemma 2. Itroductio

More information

6.4 Binomial Coefficients

6.4 Binomial Coefficients 64 Bioial Coefficiets Pascal s Forula Pascal s forula, aed after the seveteeth-cetury Frech atheaticia ad philosopher Blaise Pascal, is oe of the ost faous ad useful i cobiatorics (which is the foral ter

More information

7. Modern Techniques. Data Encryption Standard (DES)

7. Modern Techniques. Data Encryption Standard (DES) 7. Moder Techiques. Data Ecryptio Stadard (DES) The objective of this chapter is to illustrate the priciples of moder covetioal ecryptio. For this purpose, we focus o the most widely used covetioal ecryptio

More information

Disjoint set (Union-Find)

Disjoint set (Union-Find) CS124 Lecture 7 Fall 2018 Disjoit set (Uio-Fid) For Kruskal s algorithm for the miimum spaig tree problem, we foud that we eeded a data structure for maitaiig a collectio of disjoit sets. That is, we eed

More information

CS / MCS 401 Homework 3 grader solutions

CS / MCS 401 Homework 3 grader solutions CS / MCS 401 Homework 3 grader solutios assigmet due July 6, 016 writte by Jāis Lazovskis maximum poits: 33 Some questios from CLRS. Questios marked with a asterisk were ot graded. 1 Use the defiitio of

More information

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016 subcaptiofot+=small,labelformat=pares,labelsep=space,skip=6pt,list=0,hypcap=0 subcaptio ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, /6/06. Self-cojugate Partitios Recall that, give a partitio λ, we may

More information

1. By using truth tables prove that, for all statements P and Q, the statement

1. By using truth tables prove that, for all statements P and Q, the statement Author: Satiago Salazar Problems I: Mathematical Statemets ad Proofs. By usig truth tables prove that, for all statemets P ad Q, the statemet P Q ad its cotrapositive ot Q (ot P) are equivalet. I example.2.3

More information

Matrix Algebra 2.2 THE INVERSE OF A MATRIX Pearson Education, Inc.

Matrix Algebra 2.2 THE INVERSE OF A MATRIX Pearson Education, Inc. 2 Matrix Algebra 2.2 THE INVERSE OF A MATRIX MATRIX OPERATIONS A matrix A is said to be ivertible if there is a matrix C such that CA = I ad AC = I where, the idetity matrix. I = I I this case, C is a

More information

Exercise 8 CRITICAL SPEEDS OF THE ROTATING SHAFT

Exercise 8 CRITICAL SPEEDS OF THE ROTATING SHAFT Exercise 8 CRITICA SEEDS OF TE ROTATING SAFT. Ai of the exercise Observatio ad easureet of three cosecutive critical speeds ad correspodig odes of the actual rotatig shaft. Copariso of aalytically coputed

More information

On Modeling On Minimum Description Length Modeling. M-closed

On Modeling On Minimum Description Length Modeling. M-closed O Modelig O Miiu Descriptio Legth Modelig M M-closed M-ope Do you believe that the data geeratig echais really is i your odel class M? 7 73 Miiu Descriptio Legth Priciple o-m-closed predictive iferece

More information

Lecture 2 Clustering Part II

Lecture 2 Clustering Part II COMS 4995: Usupervised Learig (Summer 8) May 24, 208 Lecture 2 Clusterig Part II Istructor: Nakul Verma Scribes: Jie Li, Yadi Rozov Today, we will be talkig about the hardess results for k-meas. More specifically,

More information

CS 70 Second Midterm 7 April NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

CS 70 Second Midterm 7 April NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt): CS 70 Secod Midter 7 April 2011 NAME (1 pt): SID (1 pt): TA (1 pt): Nae of Neighbor to your left (1 pt): Nae of Neighbor to your right (1 pt): Istructios: This is a closed book, closed calculator, closed

More information