Constructions of Snake-in-the-Box Codes for Rank Modulation
11 Constructions of Snake-in-the-Box Codesfor Rank Modulation
Michal Horovitz and Tuvi Etzion, Fellow, IEEE
Abstract —Snake-in-the-box code is a Gray code whichis capable of detecting a single error. Gray codes areimportant in the context of the rank modulation schemewhich was suggested recently for representing informationin flash memories. For a Gray code in this scheme thecodewords are permutations, two consecutive codewords areobtained by using the ”push-to-the-top” operation, and thedistance measure is defined on permutations. In this paperthe Kendall’s τ -metric is used as the distance measure. Wepresent a general method for constructing such Gray codes.We apply the method recursively to obtain a snake of length M n +1 = ((2 n +1)(2 n ) − M n − for permutations of S n +1 ,from a snake of length M n − for permutations of S n − .Thus, we have lim n →∞ M n +1 S n +1 ≈ . , improving on theprevious known ratio of lim n →∞ √ πn . By using the generalmethod we also present a direct construction. This directconstruction is based on necklaces and it might yield snakesof length (2 n +1)!2 − n + 1 for permutations of S n +1 . Thedirect construction was applied successfully for S and S ,and hence lim n →∞ M n +1 S n +1 ≈ . . Index Terms —Flash memory, Gray code, necklaces, push-to-the-top, rank modulation scheme, snake-in-the-box code,spanning tree, 3-uniform hypergraph.
I. I
NTRODUCTION
Flash memory is a non-volatile technology that is bothelectrically programmable and electrically erasable. It in-corporates a set of cells maintained at a set of levels ofcharge to encode information. While raising the chargelevel of a cell is an easy operation, reducing the chargelevel requires the erasure of the whole block to whichthe cell belongs. For this reason charge is injected intothe cell over several iterations. Such programming is slowand can cause errors since cells may be injected with extraunwanted charge. Other common errors in flash memorycells are due to charge leakage and reading disturbance thatmay cause charge to move from one cell to its adjacent
Michal Horovitz is with the Department of Computer Science, Tech-nion — Israel Institute of Technology, Haifa 32000, Israel. (email:[email protected]). This work is part of her Ph.D. thesisperformed at the Technion. Tuvi Etzion is with the Computer ScienceDepartment, Technion–Israel Institute of Technology, Haifa 32000, Israel(e-mail: [email protected]).This work was supported in part by the United States — IsraelBinational Science Foundation (BSF), Jerusalem, Israel, under Grant2012016. This paper was presented in part in the Information Theoryand Applications workshop, San Diego, February 2014. cells. In order to overcome these problems, the novelframework of rank modulation was introduced in [8].In this setup the information is carried by the relativeranking of the cells’ charge levels and not by the absolutevalues of the charge levels. This allows for more efficientprogramming of cells, and coding by the ranking of thecells’ levels is more robust to charge leakage than codingby their actual values. In this model codes are subsetsof S n , the set of all permutations on n elements, andthe codewords are members of S n , where each permu-tation corresponds to a ranking of n cells’ levels fromthe highest one to the lowest. For example, the chargelevels ( c , c , c , c ) = (5 , , , are represented by thecodeword [1 , , , since the first cell has the highestlevel, the forth cell has the next highest level and so on.To detect and/or correct errors caused by injection ofextra charge or due to charge leakage we will use an appro-priate distance measure. Several metrics on permutationsare used for this purpose. In this paper we will consideronly the Kendall’s τ -metric [9], [10]. The Kendall’s τ -distance between two permutation π and π in S n is theminimum adjacent transpositions required to obtained π from π , where adjacent transposition is an exchange oftwo distinct adjacent elements. For example, the Kendall’s τ -distance between π = [2 , , , and π = [2 , , , is as [2 , , , → [2 , , , → [2 , , , . Two per-mutations in this metric are at distance one if they differin exactly one pair of adjacent elements. Distance onebetween these two permutations represent an exchange oftwo cells, which are adjacent in the permutation, due toa small change in their charge level which change theirorder.Gray codes are very important in the context of rankmodulation as was explained in [8]. They are used in manyother applications, e.g. [3], [12]. An excellent survey onGray codes is given in [11]. The usage of Gray codes forrank modulation was also discussed in [5], [6], [8], [13].The permutations of S n in the rank modulation schemerepresent ”new” logical levels of the flash memory. Thecodewords in the Gray code provide the order of theselevels which should be implemented in various algorithmswith the rank modulation scheme. Usually, a Gray codeis just a simple cycle in a graph, in which the edgesare defined between vertices with distance one in a given a r X i v : . [ c s . I T ] S e p metric. Two adjacent vertices in the graph represent onone hand two elements whose distance is one by the givenmetric; and on the other hand a move from a vertex toa vertex implied by an operation defined by the metric.A snake-in-the-box code is a Gray code in which twoelements in the code are not adjacent in the graph, unlessthey are consecutive in the code. Such a Gray code candetect a single error in a codeword. Snake-in-the-box codeswere mainly discussed in the context of the Hammingscheme, e.g. [1].In the rank modulation scheme the Gray code is definedslightly different since the operation is not defined bya metric. The permutation is defined by the order ofthe charge levels, from the highest one to the lowestone. From a given ranking of the charge levels, whichdefines a permutation, the next ranking is obtained byraising the charge level of one of the cells to be thehighest level. This operation, called ”push-to-the-top”, isused in the rank modulation scheme. For example, thecharge levels ( c , c , c , c ) = (5 , , , are representedby the codeword [1 , , , , and by applying push-to-the-top operation on the second cell which has the lowestcharge level, we have, for example, the charge levels ( c , c , c , c ) = (5 , , , which are represented bythe codeword [2 , , , . Hence, the permutation π canfollow the permutation π if π is obtained from π byapplying a push-to-the-top operation on π . Therefore,the related graph is directed with an outgoing edge fromthe vertex which represents π into the vertex whichrepresents π . On the other hand, one possible metricfor the scheme is the Kendall’s τ -metric. A Gray code(and a snake-in-the-box code as a special case) relatedto the rank modulation scheme is a directed simple cyclein the graph. In a snake-in-the-box code, related to thisscheme, there is another requirement that the Kendall’s τ -distance between any two codewords is at least two,including consecutive codewords. For example, C =([1 , , , , [4 , , , , [2 , , , , [3 , , , , [4 , , , , [1 , , , , [3 , , , , [2 , , , is a snake-in-the-boxcode in S obtained by applying a push-to-the-top oper-ation on the lowest cell at each time. The Kendall’s τ -distance between any two permutations in C is at least .One of the most important problems in the research onsnake-in-the-box codes is to construct the largest possiblecode for the given graph. In a snake-in-the-box codefor the rank modulation scheme we would like to findsuch a code with the largest number of permutations.In a recent paper by Yehezkeally and Schwartz [13],the authors constructed a snake-in-the-box code of length M n +1 = (2 n + 1)(2 n − M n − for permutations of S n +1 , from a snake of length M n − for permutationsof S n − . We will improve on this result by constructing asnake of length M n +1 = ((2 n +1)2 n − M n − for per- mutations of S n +1 , from a snake of length M n − for per-mutations of S n − . Thus, we have lim n →∞ M n +1 S n +1 ≈ . ,improving on the previous known ratio of lim n →∞ √ πn [13]. For these constructions of snake-in-the-box codes weneed an initial snake-in-the-box code and the largest oneknown to start both constructions is a snake of length57 for permutations of S . We also propose a directconstruction to form a snake of length (2 n +1)!2 − n + 1 for permutations of S n +1 . The direct construction wasapplied successfully for S and S . This implies betterinitial condition for the recursive constructions, and theratio lim n →∞ M n +1 S n +1 ≈ . .The rest of this paper is organized as follows. InSection II we will define the basic concepts of Graycodes in the rank modulation scheme, the push-to-the-top operation, and the Kendall’s τ -metric required in thispaper. In Section III we present the main ideas and aframework for constructions of snake-in-the-box codes. InSection IV we present a recursive construction based onthe given framework. This construction is used to obtainsnake-in-the-box codes longer than the ones known before.In Section V, based on the framework, we present anidea for a direct construction based on necklaces. Theconstruction is used to obtain snake-in-the-box codes oflength (2 n +1)!2 − n + 1 in S n +1 , which we believe areoptimal. The construction was applied successfully on S and on S , and we conjecture that it can be applied on S n for any odd n > . Conclusions and problems for futureresearch are presented in Section VI.II. P RELIMINARIES
In this section we will repeat some notations definedand mentioned in [13], and we also present some otherdefinitions.Let [ n ] (cid:44) { , , . . . , n } and let π = [ a , a , . . . , a n ] bea permutation over [ n ] , i.e., a permutation in S n , such thatfor each i ∈ [ n ] we have that π ( i ) = a i .Given a set S and a subset of transformations T ⊆{ f | f : S → S} , a
Gray code over S of size M , usingtransitions from T , is a sequence C = ( c , c , . . . , c M − ) of M distinct elements from S , called codewords , such thatfor each j ∈ [ M − there exists a t ∈ T for which c j = t ( c j − ) . The Gray code is called complete if M = |S| ,and cyclic if there exists t ∈ T such that c = t ( c M − ) .Throughout this paper we will consider only cyclic Graycodes.In the context of rank modulation for flash memories, S = S n and the set of transformations T comprises ofpush-to-the-top operations. We denote by t i the push-to-the-top operation on index i , ≤ i ≤ n , defined by t i ([ a , . . . , a i − , a i , a i +1 , . . . , a n ]) =[ a i , a , . . . , a i − , a i +1 , . . . , a n ] . and a p-transition will be an abbreviated notation for apush-to-the-top operation.A sequence of p-transitions will be called a transi-tions sequence . A permutation π and a transitions se-quence t , t , . . . t (cid:96) define a sequence of permutations π , π , π , . . . , π (cid:96) − , π (cid:96) , where π i = t i ( π i − ) , for each i , ≤ i ≤ (cid:96) . This sequence is a cyclic Gray code, if π (cid:96) = π and for each ≤ i < j < (cid:96) , π i (cid:54) = π j . In the sequel theword cyclic will be omittedGiven a permutation π = [ a , a , . . . , a n ] ∈ S n , an adjacent transposition is an exchange of two distinctadjacent elements a i , a i +1 , in π , for some ≤ i ≤ n − .The result of such an adjacent transposition is the permu-tation [ a , . . . , a i − , a i +1 , a i , a i +2 , . . . , a n ] . The Kendall’s τ - distance [10] between two permutations π , π ∈ S n denoted by d K ( π , π ) is the minimum number of adjacenttranspositions required to obtain the permutation π fromthe permutation π . A snake-in-the-box code is a Graycode in which for each two permutations π and π in thecode we have d K ( π , π ) ≥ . Hence, a snake-in-the-boxcode is a Gray code capable of detecting one Kendall’s τ -error. We will call such a snake-in-the-box code a K -snake . We further denote by ( n, M, K ) -snake a K -snakeof size M with permutations from S n . A K -snake can berepresented in two different equivalent ways: • the sequence of codewords (permutations), • the transitions sequence along with the first permutation.Let T be a transitions sequence and let π be a per-mutation in S n . If a K -snake is obtained by applying T on π then a K -snake will be obtained by using anyother permutation from S n instead of π . This is a simpleobservation from the fact that t ( π ( π )) = π ( t ( π )) ,where t is a p-transition and π ( π ) refers to applyingthe permutation π ∈ S n on the permutation π ∈ S n . Inother words applying T on a different permutation justpermute the symbols, by a fixed given permutation, inall the resulting permutations when T is applied on π .Therefore, such a transitions sequence T will be called an S-skeleton .For a transitions sequence σ = t k , t k , . . . t k (cid:96) and apermutation π ∈ S n , we denote by σ ( π ) , the permutationobtained by applying the sequence of p-transitions in σ on π , i.e., t k is applied on π , t k is applied on t k ( π ) , andso on. In other words, σ ( π ) = ( t k ◦ t k ◦ . . . ◦ t k (cid:96) )( π ) = t k (cid:96) (cid:0) t k l − ( . . . t k ( t k ( π ))) (cid:1) . Let σ , σ be two transitionssequences. We say that σ and σ are matching sequences ,and denote it by σ (cid:33) σ , if for each π ∈ S n we have σ ( π ) = σ ( π ) .In [13] it was proved that a Gray code with permutationsfrom S n using only p-transitions on odd indices is a K -snake. By starting with an even permutation and usingonly p-transitions on odd indices we get a sequence ofeven permutations, i.e., a subset of the A n , the alternating group of order n . This observation saves us the need tocheck whether a Gray code is in fact a K -snake, at the costof restricting the permutations in the K -snake to the set ofeven permutations. However, the following assertions werealso proved in [13]. • If C is an ( n, M, K ) -snake then M ≤ | S n | . • If C is an ( n, M, K ) -snake which containsa p-transition on an even index then M ≤ | S n | − n − (cid:0) (cid:98) n/ (cid:99)− (cid:1) .This motivates not to use p-transitions on even indices.Since we will use only p-transitions on odd indices, wewill describe our constructions only for even permutationswith odd length.III. F RAMEWORK FOR C ONSTRUCTIONS OF K -S NAKES
In this section we present a framework for constructing K -snakes in S n +1 . Our snakes will contain only evenpermutations. We start by partitioning the set of evenpermutations of S n +1 into classes. Next, we describe howto merge K -snakes of different classes into one K -snake.We conclude this section by describing how to combinemost of these classes by using a hypergraph whose verticesrepresent the classes and whose edges represent the classesthat can be merge together in one step.We present two constructions for a (2 n + 1 , M n +1 , K ) -snake, C n +1 , one recursive and one direct. In this sectionwe present the framework for these constructions. First,the permutations of A n +1 , the set of even permutationsfrom S n +1 , are partitioned into classes, where each classinduces one K -snake which contains permutations onlyfrom the class. All these snakes have the same S-skeleton.Let L n +1 be the set of all the classes.The construction of C n +1 from the K -snakes of L n +1 proceeds by a sequence of joins, where at each stepwe have a main K -snake, and two K -snakes from theremaining K -snakes of L n +1 are joined to the currentmain K -snake. A join is performed by replacing onetransition in the main K -snake with a matching sequence.In order to join the K -snakes we need the followinglemmas, for which the first can be easily verified. Inthe sequel, let σ k (cid:44) σ ◦ σ ◦ . . . ◦ σ (cid:124) (cid:123)(cid:122) (cid:125) k times , i.e., performing thetransitions sequence σ , k times. Lemma 1. If α, β ∈ S n then β = t i ( α ) if and only if α = t i − i ( β ) . Lemma 2. If i ∈ [ n − then t i (cid:33) t i +2 ◦ ( t i − i ◦ t i +2 ) .Proof: Let α = [ a , a , . . . , a i , a i +1 , a i +2 , . . . , a n ] bea permutation over [n]. t i +2 ( α )= [ a i +2 , a , . . . , a i , a i +1 , a i +3 , . . . , a n ] , t i − i ( t i +2 ( α ))= [ a , a , . . . , a i − , a i +2 , a i , a i +1 , a i +3 , . . . , a n ] , t i +2 ( t i − i ( t i +2 ( α )))= [ a i +1 , a , a , . . . , a i − , a i +2 , a i , a i +3 , . . . , a n ] , t i − i ( t i +2 ( t i − i ( t i +2 ( α ))))= [ a , a , . . . , a i − , a i +1 , a i +2 , a i , a i +3 , . . . , a n ] ,and hence we have, t i +2 ( t i − i ( t i +2 ( t i − i ( t i +2 ( α )))))= [ a i , a , . . . , a i − , a i +1 , a i +2 , . . . , a n ]= t i ( α ) . Corollary 1. If π ∈ S n +1 then t n − ( π ) = t n +1 (cid:0) t n − n − (cid:0) t n +1 (cid:0) t n − n − ( t n +1 ( π )) (cid:1)(cid:1)(cid:1) . Lemma 2 can be generalized as follows (the followinglemma is given for completeness, but it will not be usedin the sequel, and hence its proof is omitted).
Lemma 3. If i, j ∈ [ n ] and | i − j | = k , then t i (cid:33) t j ◦ ( t i − i ◦ t j ) k . The partition of A n +1 into the set of classes L n +1 should satisfy the following properties:(P1) The last two ordered elements of two permutationsin same class are equal.(P2) Any two permutations which differ only by a cyclicshift of the first n − elements, belong to the sameclass. Corollary 2.
Let π be a permutation in A n +1 . • π and t n +1 ( π ) belong to different classes in L n +1 . • π and t n − ( π ) belong to the same class in L n +1 . We continue now with the description of the method tojoin the K -snakes of L n +1 into C n +1 . In the rest of thepaper, A n +1 is partitioned into classes according to thelast two ordered elements in the permutations. Let [ x, y ] denote the class of A n +1 in which the last ordered pair inthe permutations is ( x, y ) . Let T be the S-skeleton of the K -snakes in L n +1 . Let C π T be a K -snake for which T isits transitions sequence, and π is its first permutation. If π belongs to the class [ x, y ] , we say that C π T represents theclass [ x, y ] . Note that all the permutations in C π T belongto the same class.The transitions sequence T should satisfy the followingproperties (these properties are needed in order to makethe required joins of cycles):(P3) t n − is the last transition in T .(P4) Given a permutation π = [ a , . . . , a n , a n +1 ] , foreach x ∈ [2 n + 1] \ { a n , a n +1 } there exists a per-mutation π (cid:48) ∈ C π T whose last ordered three elementsare ( x, a n , a n +1 ) . Corollary 3.
For each class [ x, y ] , a permutation π ∈ [ x, y ] , and z ∈ [2 n + 1] \ { x, y } , there exists a permutation π (cid:48) ∈ C π T whose last ordered three elements are ( z, x, y ) ,followed by the permutation t n − ( π (cid:48) ) . Lemma 4.
Let C be a K -snake which doesn’t containany permutation from the classes [ y, z ] or [ z, x ] , let π =[ a , a , . . . , a n − , z, x , y ] be a permutation in C followedby t n − , and let σ be a transitions sequence such that T = σ ◦ t n − . Then replacing this t n − transition in C ,with t n +1 ◦ σ ◦ t n +1 ◦ σ ◦ t n +1 , joins two K -snakes representing the classes [ y, z ] and [ z, x ] into C (after π ).Proof: Observe that by Lemma 1 wehave σ (cid:33) t n − n − . Thus, we have π = [ a , a , . . . , a n − , z, x , y ] ↓ t n +1 [ y, a , a , . . . , a n − , z , x ] ↓ σ (cid:33) t n − n − [ a , a , . . . , a n − , y, z , x ] K − snakef or [ z, x ] ↓ t n +1 [ x, a , a , . . . , a n − , y , z ] ↓ σ (cid:33) t n − n − [ a , a , . . . , a n − , x, y , z ] K − snakef or [ y, z ] ↓ t n +1 return to the K − snake Ct n − ( π ) = [ z, a , a , . . . , a n − , x , y ] The next step is to present an order for merging all the K -snakes of L n +1 , except one, into C n +1 . This step willbe performed by translating the merging problem into a 3-graph problem. We start with a sequence of definitionstaken from [7]. Definition 5.
A 3-graph (also called a 3-uniform hyper-graph) H = ( V, E ) is a hypergraph where V is a set ofvertices and E ⊆ (cid:0) V (cid:1) . A hyperedge of H will be calledtriple.A path in H is an alternating sequence of (cid:96) + 1 distinctvertices and (cid:96) distinct triples: v , e , v , . . . , v (cid:96) − , e (cid:96) , v (cid:96) ,with the property that ∀ i ∈ [ (cid:96) ] : v i − , v i ∈ e i .A cycle is a closed path, i.e. v = v (cid:96) .A sub-3-graph contains a subset E (cid:48) ⊆ E and the subset V (cid:48) ⊆ V which contains all the vertices in E (cid:48) .A tree T in H is a connected sub-3-graph of H with nocycles. Let H n +1 = ( V n +1 , E n +1 ) be a 3-graph defined asfollows: V n +1 = { [ x, y ] : x, y ∈ [2 n + 1] , x (cid:54) = y } ,E n +1 = {{ [ x, y ] , [ y, z ] , [ z, x ] } : x, y, z ∈ [2 n + 1] , x (cid:54) = y, x (cid:54) = z, y (cid:54) = z } . We denote a hyperedge { [ x, y ] , [ y, z ] , [ z, x ] } , where x < y and x < z , by the triple (cid:104) x, y, z (cid:105) .The vertices in H n +1 correspond to the classes inthe set L n +1 . Each e ∈ E n +1 contains three vertices,which correspond to three classes. These three classes canbe represented by three K -snakes, generated from the S-skeleton, which can be merged together by Corollary 3and Lemma 4. Note that for any two edges e , e in H n +1 either e ∩ e = ∅ or | e ∩ e | = 1 . Let T n +1 = ( V T n +1 , E T n +1 ) be a tree in H n +1 . We join | V T n +1 | K -snakes which represent | V T n +1 | classes of L n +1 to form the K -snake C n +1 , by Corollary 3 andLemma 4. The hyperedges which represent the joins whichare performed are determined by T n +1 , but these joinsare not unique, and hence they can yield different final K -snakes. The order in which the hyperedges are selectedfor these joins is also not unique, but this order doesn’taffect the final K -snakes. The size of the K -snake C n +1 depends on the number of vertices in the tree T n +1 . A treein a 3-graph contains an odd number of vertices [7]. Sincein H n +1 there are (2 n + 1)(2 n ) vertices it follows thatthere is no tree in H n +1 which contains all the verticesof V n +1 . This motivates the following definition. Definition 6.
A nearly spanning tree in a 3-graph H =( V, E ) is a tree in H which contains all the vertices of V except one. Now, let T n +1 be a nearly spanning tree in H n +1 . Example 1.
One choice for T is given below.The edges in the tree T are: (cid:104) , , (cid:105) , (cid:104) , , (cid:105) , (cid:104) , , (cid:105) , (cid:104) , , (cid:105) , (cid:104) , , (cid:105) , (cid:104) , , (cid:105) , (cid:104) , , (cid:105) , (cid:104) , , (cid:105) , (cid:104) , , (cid:105) . The order of merging K -snakes from these classes obtainedby this choice of T can be chosen as follows.(1) vertex [1 , ;(2) vertices [3 , , [2 , , (through the edge (cid:104) , , (cid:105) );(3) vertices [4 , , [2 , , (through the edge (cid:104) , , (cid:105) );(4) vertices [5 , , [2 , , (through the edge (cid:104) , , (cid:105) );(5) vertices [5 , , [1 , , (through the edge (cid:104) , , (cid:105) );(6) vertices [5 , , [3 , , (through the edge (cid:104) , , (cid:105) );(7) vertices [3 , , [1 , , (through the edge (cid:104) , , (cid:105) );(8) vertices [3 , , [4 , , (through the edge (cid:104) , , (cid:105) );(9) vertices [4 , , [1 , , (through the edge (cid:104) , , (cid:105) );(10) vertices [4 , , [5 , , (through the edge (cid:104) , , (cid:105) ).Using the S-skeleton T = t , t , t of the (3 , , K ) -snake, the snake-in-the-box code which is obtained by T is a (5 , , K ) -snake presented in Figure . There is no (5 , M, K ) -snake for which M > [13]. The S-skeletonof this code is σ , where σ = t , t , t , t , t , t , t , t , t ,t , t , t , t , t , t , t , t , t , t Theorem 7. If n ≥ , then there exists a nearly spanningtree T n +1 in H n +1 which doesn’t include the vertex [2 , .Proof: We present a recursive construction for sucha nearly spanning tree. We start with the nearly spanningtree given in Example 1. Note that T doesn’t include thevertex [2 , . Assume that there exists a nearly spanningtree, T n − , in H n − , which doesn’t include the vertex [2 , . Note that H n − is a sub-graph of H n +1 andtherefore T n − is a tree in H n +1 . The vertices of H n +1 which are not spanned by T n − are • [ x, n ] , [2 n, x ] , [ x, n + 1] , [2 n + 1 , x ] for each x ∈ [2 n − , • [2 n, n + 1] , [2 n + 1 , n ] , • [2 , .The nearly spanning tree T n +1 is constructed from T n − as follows. For each x , ≤ x ≤ n − , the edges (cid:104) x, x + 1 , n (cid:105) and (cid:104) x, x + 1 , n + 1 (cid:105) are joined to T n +1 ;also the edges (cid:104) , , n (cid:105) , (cid:104) , n, n − (cid:105) , (cid:104) , n +1 , n − (cid:105) , (cid:104) , n, n +1 (cid:105) , and (cid:104) , n +1 , n (cid:105) are joined to T n +1 . It iseasy to verify that all the vertices of H n +1 which are notspanned by T n − (except for [2 , ) are contained in thelist of the edges which are joined to T n − . When an edgeis joined to the tree it has one vertex which is already inthe tree and two vertices which are not on the tree. Hence,connectivity is preserved and no cycle is formed. Hence,it is easy to verify that by joining these edges to T n − we form a nearly spanning tree in H n +1 . Example 2.
By using Theorem and the nearly spanningtree T of Example we obtain the spanning tree T depicted in Figure . The dashed boxes edges and thedouble lines nodes are added to T in order to form T . IV. A R
ECURSIVE C ONSTRUCTION
In this section we present the recursive construction fora (2 n + 1 , M n +1 , K ) -snake from a (2 n − , M n − , K ) -snake. The construction is based on the nearly spanningtree T n +1 presented in the previous section. Each of itsvertices represent a class in which a K -snake based on the (2 n − , M n − , K ) -snake is generated. Those K -snakesare merged together into one (2 n + 1 , M n +1 , K ) -snakeusing the framework presented in the previous section.We conclude this section with an analysing the lengthof the generated K -snake compared the total number ofpermutations in S n +1 . Fig. 1. A (5 , , K ) -snake obtained by T Fig. 2. The nearly spanning tree T constructed from T We generate a (2 n +1 , M n +1 , K ) -snake, C n +1 , whosetransitions sequence is t k , t k , . . . , t k M n +1 . C n +1 hasthe following properties:(Q1) k j is odd for all j ∈ [ M n +1 ] .(Q2) k M n +1 = 2 n + 1 .(Q3) For each z ∈ [2 n + 1] there exists a permutation π ∈ C n +1 such that π (2 n + 1) = z .The starting point of the recursive construction is n +1 = 3 . The transitions sequence for n + 1 = 3 is t , t , t , and the complete (3 , , K ) -snake is C (cid:44) { [1 , , , [3 , , , [2 , , } . Clearly (Q1), (Q2), and (Q3)hold for this transitions sequence and C .Now, assume that there exists a (2 n − , M n − , K ) -snake, C n − , which satisfies properties (Q1), (Q2), (Q3),and let T n − = t k , t k , . . . , t k M n − be its S-skeleton,i.e., T n − is the transitions sequence of C n − . Note that(Q1), (Q2), and (Q3) depend on the transitions sequence T n − and are independent of the first permutation of C n − . We construct a (2 n + 1 , M n +1 , K ) -snake, C n +1 ,where M n +1 = ((2 n + 1)(2 n ) − M n − , which alsosatisfies (Q1), (Q2), and (Q3).First, all the permutations of A n +1 are partitioned into (2 n + 1)(2 n ) classes according to the last ordered twoelements in the permutations. This implies that (P1) and(P2) are satisfied. In addition, (P3) and (P4) for T n − are immediately implied by (Q2) and (Q3) for C n − ,respectively. Hence T n − can be used as the S-skeletonfor the K -snakes in L n +1 . Now, we merge the K -snakesof the classes in L n +1 (except [2 , ), by using Lemma 4and the nearly spanning tree T n +1 of Theorem 7. We haveto show that (Q1), (Q2), and (Q3) are satisfied for C n +1 .(Q1) is readily verified. Clearly, t n +1 was used to obtain C n +1 (see Lemma 4), and therefore we can always define T n +1 in such a way that its last transition is t n +1 , andhence (Q2) is satisfied. For each z ∈ [2 n + 1] there existsa class [ x, z ] whose K -snake is joined into C n +1 , andtherefore (Q3) is satisfied. Thus, we have Theorem 8.
Given a (2 n − , M n − , K ) -snake whichsatisfies (Q1), (Q2), and (Q3), we can obtain a (2 n +1 , M n +1 , K ) -snake, where M n +1 = ((2 n + 1)(2 n ) − M n − , which also satisfies (Q1), (Q2), and (Q3). Following [13], we define D n +1 = M n +1 (2 n +1)! asthe ratio between the number of permutations in thegiven (2 n + 1 , M n +1 , K ) -snake and the size of S n +1 .Recall that if C is an (2 n + 1 , M, K ) -snake then M ≤ | S n +1 | , and we conjecture that optimal size is M = (2 n + 1)! − n + 1 . Thus, it is desirable to obtaina value D n +1 close to half as much as possible. In ourrecursive construction M n +1 = ((2 n +1)(2 n ) − M n − . Thus, we have D = 12 , ∞ (cid:89) n =2 D n +1 D n − = 12 √ π √ (5 − √ (1 + √ , which implies that lim n →∞ D n +1 = 12 · √ π √ (5 − √ (1 + √ ≈ . . This computation can be done by any mathematical tool,e.g., WolframAlpha. This improves on the constructiondescribed in [13], which yields M n +1 = (2 n + 1)(2 n − M n − and lim n →∞ D n +1 = lim n →∞ √ πn .V. A D IRECT C ONSTRUCTION BASED ON N ECKLACES
In this section we describe a direct construction toform a (2 n + 1 , M n +1 , K ) -snake. First, we describe amethod to partition the classes which were used beforeinto subclasses that are similar to necklaces. Next, weshow how subclasses from different classes are mergedinto disjoint chains. Finally, we present a hypergraph anda graph in which we have to search for certain trees toform our desired K -snake which we believe is of maximumlength. Such K -snakes were found in S and S .We present a direct construction for a (2 n + 1 , M n +1 , K ) -snake, C n +1 . The goal isto obtain M n +1 = (2 n +1)!2 − (2 n − , andhence D n +1 D n − ≥ − n )! . We believe that thereis always a (2 n + 1 , M n +1 , K ) -snake with M n +1 = (2 n +1)!2 − (2 n − and there is no such K -snake with more codewords. We are making a slightchange in the framework discussed in Section III.First, all the permutations of A n +1 are partitionedinto (2 n + 1)(2 n ) classes according to the last orderedtwo elements. We denote by [ x, y ] the class of alleven permutations in which the last ordered pair in thepermutation is ( x, y ) . Each class is further partitioned intosubclasses according to the cyclic order of the first n − elements in the permutations, i.e., in each class [ x, y ] , the (2 n − permutations are partitioned into (2 n − disjointsubclasses. This implies that (P1) and (P2) are satisfiedfor both classes and subclasses. Let’s denote each oneof the subclasses by [ α ] − [ x, y ] where α is the cyclicorder of the first n − elements in the permutationsof the subclass. Let α , α be two permutations over [2 n + 1] \ { x, y } . If α and α have the same cyclicorder, we denote it by α (cid:39) α , otherwise α (cid:54)(cid:39) α . Notethat if α (cid:39) α then [ α ] − [ x, y ] = [ α ] − [ x, y ] . Forexample [1 , , − [4 , represents the subclass with thepermutations [1 , , , , , [3 , , , , , and [2 , , , , . Let L n +1 be the set of all classes, and let T = t n − n − be the S-skeleton of the K -snakes in L n +1 . Note that a K -snake generated by T spans exactly all the permutations inone subclass. Hence (P3) and (P4) are immediately impliedfor both classes and subclasses. Such a K -snake will becalled a necklace . The slight change in the framework isthat instead of one K -snake, each class contains (2 n − K -snakes, all of them have the same S-skeleton.The necklaces (subclasses) [ α ] − [ x, y ] are similar tonecklaces on n − elements. Joining the necklaces intoone large K -snake might be similar to the join of cyclesfrom the pure cycling register of order n − , PCR n − ,into one cycle, which is also known as a de Bruijnsequence [2], [4]. There are two main differences betweenthe two types of necklaces. The first one is that in de Bruijnsequences the necklaces do not represent permutations, butwords of a given length over some finite alphabet. Thesecond is that there is rather a simple mechanism to joinall the necklaces into a de Bruijn sequence. We wouldlike to have such a mechanism to join as many as possiblenecklaces from all the classes into one K -snake.Let T n +1 be the nearly spanning tree constructed byTheorem 7. By repeated application of Lemma 4 accordingto the hyperedges of T n +1 starting from a necklace in theclass [1 , we obtain a K -snake which contains exactlyone necklace from each class [ x, y ] (cid:54) = [2 , . Such a K -snake will be called a chain . If the chain contains thenecklace [ α ] − [1 , , we will denote it by c [ α ] . For twopermutations α and α over [2 n + 1] \ { , } such that α (cid:39) α we have c [ α ] = c [ α ] . Note that there is a uniqueway to merge the three necklaces which correspond to ahyperedge of T n +1 , and hence there is no ambiguity in c [ α ] (even so the order of the joins is not unique), Notealso that the transitions sequence of two distinct chains isusually different. The number of permutations in a chainis ((2 n + 1)(2 n ) − n − . The following lemma is animmediate consequence of Lemma 4. Lemma 9.
Let [ x, y ] , [ y, z ] , and [ z, x ] be three classes,and let α be a permutation of [2 n + 1] \ { x, y, z } . Thenecklaces [ α, z ] − [ x, y ] , [ α, y ] − [ z, x ] , and [ α, x ] − [ y, z ] can be merged together, where α, z is the sequence formedby concatenation of α and z . Lemma 10.
Let [ x, y ] , [ y, z ] , and [ z, x ] be three classes.All the subclasses in these classes can be partitioned intodisjoint sets, where each set contains exactly one necklacefrom each of the above three classes. The necklaces of eachset can be merged together into one K -snake.Proof: For each permutation α over [2 n +1] \{ x, y, z } ,the necklaces [ α, z ] − [ x, y ] , [ α, y ] − [ z, x ] , and [ α, x ] − [ y, z ] can be merged by Lemma 9. Thus, all the subclasses inthese classes can be partitioned into disjoint sets. Corollary 4.
The permutations of all the classes exceptfor [2 , can be partitioned into disjoint chains. By Corollary 4 we construct (2 n − disjoint chainswhich span A n +1 , except for all the even permutationsof the class [2 , . Recall that we have the same number, (2 n − , of [2 , -necklaces, which span all the permuta-tions of the class [2 , . Now, we need a method to mergeall these chains and necklaces, except for one necklacefrom the class [2 , , into one K -snake C n +1 . Note thatfor n + 1 = 5 we have only one chain. Thus, this chainis the final K -snake C . This K -snake is exactly the same K -snake as the one generated by the recursive constructionin Section IV. Lemma 11.
Let x be an integer such that ≤ x ≤ n +1 ,let α be a permutation of [2 n + 1] \ { x, , } , and as-sume that the permutations [ α, , x, and [ α, , , x ] arecontained in two distinct chains. We can merge these twochains via the necklace [ α, x ] − [2 , .Proof: Let c be the chain which contains the permu-tation π = [ α, , x, , c be the chain which contains thepermutation π = [ α, , , x ] , and η be the necklace whichcontains the permutation π = [ α, x, , . Note that allthe chains contains only the p-transitions t n +1 and t n − .The permutation t n +1 ( π ) appears in c , the permutation t n +1 ( π ) appears in η , and the permutation t n +1 ( π ) appears in c . Therefore, π , π , and π are followed by t n − in c , c , and η , respectively. Let σ i , i ∈ { , } , bea transitions sequence such that σ i , t n − is the transitionssequence of c i , and therefore t n − ( σ i ( π i )) = π i . ByLemma 1 we have σ (cid:33) t n − n − (cid:33) σ . Similarly toLemma 4, by replacing the transition t n − which follows π in η , with t n +1 ◦ σ ◦ t n +1 ◦ σ ◦ t n +1 , we merge c , c and η into a K -snake. Thus, we have π =[ a , a , . . . , a n − , x, , ↓ t n +1 [1 , a , a , . . . , a n − , x, ↓ σ (cid:33) t n − n − the chain c π =[ a , a , . . . , a n − , , x, ↓ t n +1 [2 , a , a , . . . , a n − , , x ] ↓ σ (cid:33) t n − n − the chain c π =[ a , a , . . . , a n − , , , x ] ↓ t n +1 return to the necklace ηt n − ( π ) =[ x, a , a , . . . , a n − , , For each x , ≤ x ≤ n + 1 , and for each permutation α of [2 n + 1] \ { x, , } , the merging of two distinct chainswhich contain the permutations [ α, , x, and [ α, , , x ] via the necklace [ α, x ] − [2 , as described in Lemma 11,will be denoted by M [ x ] -connection. Note that if x ∈{ , , } then the permutations [ α, , x, and [ α, , , x ] are contained in the same chain. Thus, there are no M [3] -connections, M [4] -connections, or M [5] -connections.Lemma 11 suggests a method to join all the chainsand all the [2 , -necklaces except one into a K -snake oflength (2 n +1)!2 − (2 n − . This should be implementedby (2 n − − iterations of the merging suggested byLemma 11. The current merging problem is also trans-lated into a − graph problem (see Definition 5). Let ˆ H n +1 = ( ˆ V n +1 , ˆ E n +1 ) be a 3-graph defined as follows. ˆ V n +1 = { c [ α ] : α is a permutation of [2 n + 1] \ { , }}∪ { [ β ] − [2 ,
1] : β is a permutation of [2 n + 1] \ { , }} ˆ E n +1 = {{ c [ α ] , c [ α ] , [ β ] − [2 , } : c [ α ] and c [ α ] can be merged togethervia [ β ] − [2 , by Lemma 11 } . The vertices in ˆ V n +1 are of two types, chains and [2 , -necklaces. Each e ∈ ˆ E n +1 contains three vertices, twochains and one necklace, which can be merged together byLemma 11. Therefore, the edge will be signed by M [ x ] asdescribed before. Note that ˆ E n +1 might contains paralleledges with different signs.Let ˆ T n +1 = ( V ˆ T n +1 , E ˆ T n +1 ) be a nearly spanningtree in ˆ H n +1 . Note that such a nearly spanning tree mustcontain all the vertices in ˆ V n +1 except for one [2 , -necklace. If such a nearly spanning tree exists then byLemma 11, we can merge all the chains via [2 , -necklacesto form the K -snake C n +1 . This K -snake contains all thepermutations of A n +1 except for n − permutationswhich form one [2 , -necklace.The joins which are performed are determined by theedges of ˆ T n +1 . Note that there is a unique way to mergethe three vertices which correspond to a hyperedge of ˆ T n +1 signed by M [ x ] . Hence, by using the given spanningtrees T n +1 and ˆ T n +1 , there is no ambiguity in C n +1 (even so the orders of the joins are not unique). However,different nearly spanning trees can yield different final K -snakes. Note that the K -snake C n +1 generated by thisconstruction has only t n +1 and t n − p-transitions, whereusually t n − is used. The p-transition t n − is the onlytransition in the K -snake of the subclasses. On average out of n − sequential p-transitions of C n +1 are thep-transition t n +1 . A similar property exists when a deBruijn sequence is generated from the necklaces of purecycling register of order n [2], [4].Finding a nearly spanning tree ˆ T n +1 is an open ques-tion. But, we found such trees for n = 3 and n = 4 . Webelieve that a similar construction to the one which followsin the sequel for n = 3 and n = 4 , exists for all n > . Conjecture 1.
For each n ≥ , there exists a (2 n +1 , M n +1 , K ) -snake, where M n +1 = (2 n +1)!2 − (2 n − in which there are only t n − and t n +1 p-transitions. Example 3.
For n = 3 , a (7 , , K ) -snake isconstructed by using the tree T of Example , andthe tree ˆ T defined below. ˆ T contains chains,where each chain contains necklaces. It alsocontains
11 [2 , -necklaces and hyperedges.Denote an edge in ˆ H by ( { c i , c j , η k } , x ) where M [ x ] is the sign of the edge. ˆ T is defined as follows.The chains in ˆ T : c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , , c = [3 , , , , − [1 , .The necklaces in ˆ T : η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , , η = [3 , , , , − [2 , .The edges in ˆ T : e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , . ˆ H contains another [2 , -necklace, η =[3 , , , , − [2 , , and the following additionaledges: e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , , e = ( { c , c , η } , .An additional different illustration of ˆ H is presented inthe sequel (see Example ). For each n ≥ , let G n +1 = ( V n +1 , E n +1 ) be amulti-graph (with parallel edges) with labels and signs onthe edges. The vertices of V n +1 represent the (2 n − chains and hence |V n +1 | = (2 n − . There is an edgesigned with M [ x ] , where ≤ x ≤ n + 1 , between thevertex (chain) c and vertex (chain) c , if c contains apermutation [ α, , , x ] and c contains the permutation [ α, , x, , where c (cid:54) = c . The label on this edge is the necklace [ α, x ] − [2 , . Note that the label on the edgeis a necklace which can merge together the chains of itscorresponding endpoints by M [ x ] -connection. Note alsothat the pair α, x might not be unique and hence the graphmight have parallel edges. A tree in G n +1 which doesn’thave two edges with the same label, will be called a chaintree . The following Lemma can be easily verified. Lemma 12.
There exists a nearly spanning tree in ˆ H n +1 if and only if there exists a chain tree in G n +1 . Henceforth, T n +1 will be the nearly spanning treeconstructed in Theorem 7, and the chains are constructedvia T n +1 . Definition 13.
Let G = ( V , E ) and G = ( V , E ) betwo multi-graphs with labels and signs on the edges, wherethe set of the labels of G i denoted by L i , i ∈ { , } . Wesay that G is isomorphic to G if there exist two bijectivefunctions f : V → V and g : L → L , with thefollowing property: ( u, v ) ∈ E with the label η and sign M [ x ] , if and only if ( f ( u ) , f ( u )) ∈ E with the label g ( η ) and sign M [ x ] . Definition 14.
For each n ≥ , a sub-graph of G n +1 which is isomorphic to G n − is called a component of G n +1 , and denoted by A = ( V A , L A ) where V A consistsof the vertices (chains) of the component, L A consists ofthe labels ( [2 , -necklaces) on the edges in the component.Note that |V A | = |L A | , i.e., the numbers of the distinctlabels is equal to the number of the vertices. Definition 15.
Two components, A = ( V A , L A ) and B =( V B , L B ) , in G n +1 are called disjoint if V A ∩V B = ∅ and L A ∩ L B = ∅ , i.e., there is no a common vertex (chain)or a common label ( [2 , -necklace) in A and B . Lemma 16.
For each n ≥ , G n +1 consists of (2 n − n − disjoint copies of isomorphic graphs to G n − ,called components. The edges between the vertices oftwo distinct components are signed only with M [2 n ] and M [2 n + 1] .Proof: The M [ x ] -connections are deduced by the tree T n +1 , which was used for the construction of the chains.In particular, the path between the vertices [1 , x ] and [ x, in T n +1 determines the M [ x ] -connections in G n +1 . ByTheorem 7, T n − is a sub-graph of T n +1 . Therefore, foreach x , x ≥ , the path between the vertices [1 , x ] and [ x, in T n +1 is equal to the path between the vertices [1 , x ] and [ x, in T k +1 for each x ≤ k + 1 ≤ n + 1 .The number of the vertices (chains) in G n +1 is equal to (2 n − , and each component contains (2 n − vertices.Thus, G n +1 consists of (2 n − n − disjoint copiesof isomorphic graphs to G n − connected by edges signedonly with M [2 n ] and M [2 n + 1] .For each n ≥ , let ˆ G n +1 = ( ˆ V n +1 , ˆ E n +1 ) be the component graph of G n +1 . The vertices of ˆ V n +1 represent the components of G n +1 , There is an edgesigned with M [ x ] , x ∈ { n, n + 1 } , between the vertices(components) A and B , if the chain that contains thepermutation [ α, , , x ] is contained in A , and the chainthat contains the permutation [ α, , x, is contained in B . The label on this edge is the necklace [ α, x ] − [2 , .We define ˆ G to be G , i.e., each component of ˆ G consistsof exactly one chain (and also one distinct [2 , -necklacein order to follow the properties of ˆ G n +1 ). Definition 17.
A components spanning tree, ˆ T n +1 is aspanning tree in ˆ G n +1 , where in the set of the labels ofthe tree’s edges, there are no two labels from the samecomponent, i.e., each label in the set of the labels of thetree’s edges belongs to a different component. Example 4. ˆ G is depicted in Figure , where the verticesnumbers and the edges labels corresponds to the chainsand the necklaces in Example , respectively. The verticaledges are signed with M [6] , while the horizontal edgesare signed with M [7] . The double lines edges correspondto the edges of ˆ T .
92 114 3 7 105
Fig. 3. The graph ˆ G and its component spanning tree ˆ T Conjecture 2.
For each component A in ˆ G n +1 , n ≥ ,and for each label η of A , there exists a componentsspanning tree, where there is no edge in the tree with thelabel η . Conjecture 2 implies Conjecture 1, i.e.,
Theorem 18.
If Conjecture is true then for each n ≥ ,there exists a (2 n + 1 , M n +1 , K ) -snake, where M n +1 = (2 n +1)!2 − (2 n − in which there are only t n − and t n +1 p-transitions. Conjecture 2 was verified by computer search for n = 3 and n = 4 . By using Conjecture 2 recursively, for each n ≥ , and for each necklace η in class [2 , , we canconstruct a chain tree T in G n +1 , which doesn’t include η as a label on an edge in T . Corollary 5.
There exist a (7 , , K ) -snake and a (9 , , K ) -snake, and hence lim n →∞ M n +1 S n +1 ≈ . . Note that the ratio lim n →∞ M n +1 S n +1 would be improved, ifthere exists a (2 m + 1 , (2 m +1)!2 − (2 m − , K ) -snake forsome m > . Conjecture 3.
The (2 n − n − components in ˆ G n +1 can be arranged in a (2 n − × (2 n − grid. The edgeswhich are sign by M [2 n ] define n − cycles of length n − . Each cycle contains the vertices of exactly one column,and is called an M [2 n ] -cycle. The edges which are signwith M [2 n + 1] are between two components in differentcolumns, and they also define n − cycles of length n − .Such a cycle will be called an M [2 n +1] -cycle. Each multi-edge between two components has (2 n − parallel edges(the number of chains in the component). Parallel edgeshave the same sign x , x ∈ { n, n +1 } , but different labels(i.e., M [ x ] -connection, but with different [2 , -necklaces). Example 5.
An illustration for the structure of ˆ G n +1 for n = 3 is presented in Example , and for n = 4 is depictedin Figure . In ˆ G there are components, where eachcomponent is isomorphic to ˆ G (thus, it contains chainsand
12 [2 , -necklaces). Fig. 4. The graph ˆ G VI. C
ONCLUSIONS AND F UTURE R ESEARCH
Gray codes for permutations using the operation push-to-the-top and the Kendall’s τ -metric were discussed. Wehave presented a framework for constructing snake-in-the-box codes for S n . The framework for the constructionyield a recursive construction with large snakes. A directconstruction to obtain snakes which might be optimal inlength was also presented. Several questions arise from ourdiscussion and they are considered for current and futureresearch.1) Complete the direct construction for snakes of length (2 n +1)!2 − n + 1 in S n +1 .2) Can a snake in S n +1 have size larger than (2 n +1)!2 − n + 1 ?3) Prove or disprove that the length of the longest snakein S n is not longer than the length of the longestsnake in S n − .
4) Examine the questions in this paper for the (cid:96) ∞ metric. Acknowledgment
The authors would like to thank the anonymous reviewersfor their careful reading of the paper. Especially, one ofthe reviewers pointed out on the good ratio lim n →∞ M n +1 S n +1 ≈ . compared to one in [13].R EFERENCES[1] H. L. Abbott and M. Katchalski, “On the snake in the box problem,”
Journal of Combinatorial Theory, Series A , vol. 45, pp. 13–24,1988.[2] T. Etzion and A. Lempel, “Algorithms for the generation of full-length shift-register sequences,”
IEEE Transactions on InformationTheory , vol. 30, pp. 480–484, May 1984.[3] T. Etzion and K. G. Paterson, “Near Optimal Single-Track GrayCodes,”
IEEE Transactions on Information Theory , vol. 42, pp.779–789, May 1996.[4] H. Fredricksen, “A survey of full length nonlinear shift registercycle algorithms,”
SIAM Rev. , vol. 24, pp. 195–221, Apr. 1982.[5] E. En Gad, M. Langberg, M. Schwartz, and J. Bruck, “Constant-weight Gray codes for local rank modulation,”
IEEE Transactionson Information Theory , vol. 57, pp. 7431-7442, November 2011.[6] E. En Gad, M. Langberg, M. Schwartz, and J. Bruck, “GeneralizedGray codes for local rank modulation,”
IEEE Transactions onInformation Theory , vol. 59, pp. 6664-6673, October 2013.[7] A. Goodall and A. de Mier, “Spanning trees of 3-uniform hyper-graphs,”
Advances in Applied Mathematics , vol. 47, Pages 840–868,2011.[8] A. Jiang, R. Mateescu, M. Schwartz, and J. Bruck, “Rank modula-tion for flash memories,”
IEEE Transactions on Information Theory ,vol. 55, pp. 2659–2673, 2009.[9] A. Jiang, M. Schwartz, and J. Bruck, “Correcting charge-constrained errors in the rank-modulation scheme,”
IEEE Trans-actions on Information Theory , vol. 56, pp. 2112–2120, May 2010.[10] M. Kendall and J. D. Gibbons,
Rank Correlation Methods , NewYork: Oxford Univ. Press, 1990.[11] C. Savage, “A survey of combinatorial Gray codes,”
SIAM Rev. ,vol. 39, pp. 605–629, 1997.[12] C. D. Savage and P. Winkler, “Monotone Gray codes and the Middlelevels problem,”
Journal of Combinatorial Theory, Series A , vol. 70,pp. 230–248, 1995.[13] Y. Yehezkeally and M. Schwartz, “Snake-in-the-box codes for rankmodulation,”
IEEE Transactions on Information Theory , vol. 58,pp. 5471–5483, August 2012.
Michal Horovitz was born in Israel in 1987. Shereceived the B.Sc. degree from the Open University ofIsrael, Ra’anana, Israel, in 2009, from the departmentof Mathematics and from the department of ComputerScience. She is currently a Ph.D. student in the ComputerScience Department at the Technion - Israel Institute ofTechnology, Haifa, Israel. Her research interests includecoding theory with applications to non-volatile memoriesand combinatorics.