A 2-Approximation Algorithm for Sorting by Prefix Reversals

Size: px
Start display at page:

Download "A 2-Approximation Algorithm for Sorting by Prefix Reversals"

Transcription

1 A 2-Approximation Algorithm for Sorting by Prefix Reversals c Springer-Verlag Johannes Fischer and Simon W. Ginzinger LFE Bioinformatik und Praktische Informatik Ludwig-Maximilians-Universität München Amalienstr. 17 D München {Johannes.Fischer Simon.Ginzinger}@bio.ifi.lmu.de Abstract. Sorting by Prefix Reversals, also known as Pancake Flipping, is the problem of transforming a given permutation into the identity permutation, where the only allowed operations are reversals of a prefix of the permutation. The problem complexity is still unknown, and no algorithm with an approximation ratio better than 3 is known. We present the first polynomial-time 2-approximation algorithm to solve this problem. Empirical tests suggest that the average performance is in fact better than 2. 1 Introduction The problem of sorting a permutation by prefix reversals, also known as pancake flipping, was first considered in a computational context by Gates and Papadimitriou [7]. The problem may informally be described as follows: given a permutation of the first n integers, transform it into the sorted sequence 1,..., n by using as few prefix reversals as possible, an operation that flips the first x elements. In [7], and likewise in a subsequent article by Heydari and Sudborough [11], bounds were given that only depend on the size n of the permutation, disregarding special properties of the given permutation. This reflects the concept of the diameter f(n) of the pancake network of size n, i.e. the maximal number of prefix reversals that is needed to sort an (arbitrary) permutation of 1,..., n. In summary, we now know [7, 11] that (15/14)n f(n) (5n + 5)/3. In this article, we tackle the problem of finding a minimal sequence of prefix reversals that sorts a given permutation π (MIN-SBPR). It should be clear that for n fixed, some permutations of length n are easier to sort than others. This intuition can be formalized by the concept of breakpoints and breakpoint graphs, first introduced by Bafna and Pevzner [1]. They considered a different version of the problem, the task of sorting a permutation by (arbitrary) reversals (MIN-SBR). The problem was shown to be NP-complete by Caprara [4], but Hannenhalli and Pevzner [9] gave a polynomial time algorithm for the slightly restricted case of signed permutations which is highly relevant in computational biology. Despite the NP-completeness of MIN-SBR, substantial progress has been made in finding approximation algorithms, starting with Kececioglu and Sankoff s algorithm [14] which has a performance guarantee of 2. The currently best known algorithm is a approximation due to Berman et al. [3]. A related problem is the one of sorting by transpositions (MIN-SBT), where one seeks to find the minimum number of transpositions needed to sort a permutation. In contrast to MIN-SBR, it is still unknown whether MIN-SBT is in P or NP-hard. However, several 1.5-approximation algorithms have been devised (e.g. [2], the most recent being [10]). Similar to the case of reversals, the problem of prefix transpositions has been considered. Here, the currently best result is a 2-approximation by Dias and Meidanis [6]. However, in the case of prefix reversals, little progress has been made. Although Heydari [12] has proven the NP-completeness of a modified version of MIN-SBPR, it remains unknown

2 Fig. 1. The breakpoint graph of the permutation (8 2, 1 9 5, 6 3, 4 7 ). whether or not the original problem is in P. Similarly, although it is easy to come up with a 3-approximation for MIN-SBPR 1, no approximation algorithms with a performance guarantee less than 3 have been found. We give the first 2-approximation algorithm for MIN-SBPR. The remainder of this article is organized as follows. Sect. 2 gives a formal definition of the problem and introduces the notion of breakpoint graphs and related concepts. It also states the lower bound on which our algorithm is based. Sect. 3 develops the 2-approximation algorithm. Sect. 4 shows by empirical tests that the actual performance of our approximation is much better than 2. Finally, Sect. 5 concludes and gives an outlook to future work. 2 Preliminaries For a permutation π = (π 1,..., π n ) of {1,..., n}, a prefix reversal φ(r) is defined as the operation that flips the first r elements of π for 2 r n, i.e. π φ(r) = (π r,..., π 1, π r+1,..., π n ). The prefix reversal distance d(π) is the minimal number of prefix reversals that is needed to transform nto the identity permutation ι := (1,..., n). Determining d for a given permutation is known as the problem of Sorting by Prefix Reversals (MIN-SBPR) and is the issue of this article. We now extend π by setting π 0 := 0 and π n+1 := n + 1, yielding π = (0, π 1,..., π n, n + 1). For convenience, we will also write π for the extended permutation π. We say that there is a breakpoint between and +1 if +1 1 for 1 i n. 2 That is, there is a breakpoint between 2 elements that are adjacent in π, but not adjacent in the identity permutation ι := (1,..., n + 1). As an example, the breakpoints in the following permutation are marked with a horizontal bar: (8 2, 1 9 5, 6 3, 4 7 ). We define b(π) to be the number of breakpoints in π. An immediate consequence is Lemma 1. For a permutation π = (π 1,..., π n ) of {1,..., n} with b(π) breakpoints, we have d(π) b(π). Proof. Let φ(r 1 ),..., φ(r d(π) ) be an optimal sequence of prefix reversals that sorts π, i.e. π φ(r 1 ) φ(r d(π) ) = ι. Note that a reversal φ(r) can eliminate at most one breakpoint, namely the one between π r and π r+1 (if any). Since ι is the only permutation having 0 breakpoints, the claim follows. We note that this bound is not sharp for all cases. For example, the permutation (3, 4 1, 2 ) has two breakpoints, but needs at least three prefix reversals to be transformed into the identity permutation. (The prefix reversals are φ(2), φ(4) and φ(2).) The breakpoint graph G π = (V, E) of a permutation s defined as follows: the set of vertices in G s V := {π 0,..., π n+1 }, and the set of (directed) edges E is the union of so-called red edges R and blue edges B to be defined next. An edge e is in R if and only if e = (, +1 ) 1 The obvious 3-approximation flips the strip with the highest unsorted element to the beginning, brings it in the correct direction and then flips it to its proper place at the end where it remains untouched. See Sec. 2 for the definition of strips. 2 Because of the inherent asymmetry of prefix reversals, we never say that there is a breakpoint between π 0 and π 1. However, in the breakpoint graph (to be defined after Lemma 1) we do have a red edge between π 0 and π 1 if π 0 π 1 1.

3 (a) Type 1 (b) Type 2 (c) Type 3 (d) Type 4 Fig. 2. Different types of blue edges. and there is a breakpoint between and +1, or e = (π 0, π 1 ) and π 0 π 1 1. Further, an edge e is in B if and only if e = (, π j ) for some 0 i < j n + 1, π j = ± 1 and e for some red edge e. Note that the number of blue edges equals the number of red edges. See Fig. 1 for an example of a breakpoint graph, where the blue edges are drawn as dashed lines to distinguish them from the red edges. We stick to the convention that the breakpoint graph is drawn from left to right, and that red edges are drawn as straight lines, whereas blue edges are drawn as arcs. Whenever we talk of the first or leftmost blue edge we mean the blue edge argmin (πi,π j ) Bi. Likewise, the last or rightmost blue edge is defined as argmax (πi,π j ) Bj. For example, in Fig. 1 the first blue edge connects 0 and 1 and the last blue edge connects 9 and 10. We say that,..., π j form a strip for 1 i j n if π k = π k+1 ± 1 for all i k < j, 1 ± 1 and π j π j+1 ± 1. A strip is called a singleton if it consists of only one element, with the exception that π 1 = 1 and π n = n are never considered as singletons. A strip of length 2 is called ascending if π k = π k+1 1 for all i k < j and descending otherwise. Now consider a blue edge between 2 elements and π j := ± 1. Because of the definition of blue edges there is at least one adjacent red edge on each side of the blue edge; we can thus classify such a blue arc into one of the four different types shown in Fig. 2, depending on the directions of the adjacent red edges. Note that if s or π j s strip is a singleton, the blue arc may be classified into at least 2 different types. As an example, consider the blue arc (6, 7) in Fig. 1 which is of type 2 and 3. Note that we will not use the breakpoint graph for theoretical considerations such as relating the maximal number of alternating cycles in it to the reversal distance as in [9]; it will rather be used for expository purposes. In the rest of this paper we will only consider permutations where there is a breakpoint between π n and π n+1. This is simply because if there are x ordered elements at the end of π, say π = (π 1,..., π n x, n x + 1,..., n 1, n), we can reduce the problem of sorting π to sorting the permutation π := (π 1,..., π n x ). We will further restrict ourselves to prefix reversals that act on a breakpoint, which means that φ(r) is applied to π only if there is a breakpoint between π r and π r+1. We will see later that this restriction is sufficient for a 2-approximation. 3 3 The 2-Approximation Algorithm We are now ready to present the details of our 2-approximation. The next lemma gives a nice property of the breakpoint graph that allows us to eliminate a breakpoint by using at most two prefix reversals. 3 In analogy to Hannenhalli and Pevzner s Theorem 3.1 in [8] we can in fact show that there is an optimal sorting of prefix reversals that does not cut a strip of length 3. However, for strips of length 2 this is not the case.

4 (a) The blue edge from π 1 = 8 to π 9 = 7 satisfies condition 1 of Lemma 2. We apply the prefix reversal φ(8); see the next picture for the result (b) Now the blue edge from π 2 = 3 to π 7 = 2 satisfies condition 2. We thus apply the reversals φ(7) (c)... and φ(5) to create an adjacency between 2 and (d) Here, the highlighted blue edge is of type 3. The reversals φ(3) (e)... and φ(7) (f)... create the desired adjacency. Fig. 3. An example. We want to sort π = (8 2, 1 9 5, 6 3, 4 7 ) (the six breakpoints are marked with a bar). The adjacencies that will be created next are highlighted. The example will be continued in figure 7, when the necessary tools have been introduced. Lemma 2. Let π be a permutation of {1,..., n} and G π be its associated breakpoint graph. Then there exists a sequence of at most two prefix reversals φ(r) and φ(s) that eliminates a breakpoint if at least one of the three conditions holds: 1. G π contains a blue arc (, π j ) of type 1 with i = G π contains a blue arc (, π j ) of type 2, where i G π contains a blue arc (, π j ) of type 3. Proof. Because (, π j ) is blue we must have π j = ±1. We show that in all cases we can create an adjacency between and π j without introducing any new breakpoints, thereby eliminating a breakpoint. The reader is encouraged to follow the examples shown in Fig. 3. In case 1, the single prefix reversal φ(j 1) creates the desired adjacency between π 1 and π j without introducing a new breakpoint. See Fig. 3 (a) for an example. In case 2, φ(j) and φ(j i) suffice: we have (π 1,..., π n ) φ(j) = (π j,...,,..., π 1, π j+1,..., π n ) =: π ; so G π contains a blue arc (π 1, π j i+1 ) of type 1, and we are thus in the situation of case 1. The condition i 0 is necessary because with i = 0 we have π 0 = 0, so π j = 1 and we cannot create an adjacency by our definition of breakpoints. Note also that an arc of type 2 cannot be the last blue edge in G π ; this implies in particular j n + 1, so φ(j) is a valid reversal. See Fig. 3 (b) (c) for an example. In case 3, the adjacency is created by the prefix reversals φ(i) and φ(j 1): again, with (π 1,..., π n ) φ(i) = (,..., π 1, +1, π j,..., π n ) =: π we see that G π contains a blue arc (π 1, π j ) of type 1. See Fig. 3 (d) (f) for an example. For the rest of this section, we will say that a blue edge of type 1,2 or 3 is a good edge if it satisfies one of the respective conditions given in Lemma 2. The next two lemmas are the key to

5 1 + (a) If there is a blue edge going from to the right, then it is either type (b)... or type 2, depending on the direction of the incident red edge in ± p p (c) The blue edge between and +1 must point to the left, as well as the red edge incident to +1. (d) The highlighted edges correspond to exactly the same situation which we have already considered. Fig. 4. Illustrations to the proof of Lemma 3. our 2-approximation. They characterize those permutations that do not contain a good edge. In fact, we will show that these permutations all resemble a certain prototype permutation (given in Eq. ( ) on p. 6) which can then be solved by the generic sorting sequence given in Lemma 6. Lemma 3. Let π be a permutation of {1,..., n} that does not contain a good blue edge and let G π be its associated breakpoint graph. Then π does not contain any singletons. Proof. Assume π contains a singleton, say at position 1 i n. Then there are two blue edges beginning or ending at. Further, there is a red edge ending at and a red edge beginning at. If one of the two blue edges had as its left endpoint, then this edge would be of type 2 or 3 (or both), so at least one of the conditions 2 or 3 in Lemma 2 would hold, a contradiction (see Fig. 4 (a) (b)). So both blue edges have as their right endpoint, in particular the edge starting at + 1. There cannot be a red edge on the right side of + 1, because otherwise the blue edge ( + 1, ) would be of type 3 and thus be good. So the only red edge incident to + 1 ends there (Fig. 4 (c)). This means that there is an ascending strip from + 1 to + p for some p 2. Now we either have + p = n, in which case there must be a blue edge from + p = n to π n+1 = n + 1, which would then be of type 3, a contradiction. If, on the other hand, + p n, by the same reasoning as above we know that the blue edge incident to + p must point to the left, and again the red edge incident to + p + 1 must also point to the left (Fig. 4 (d)). We are thus in the same situation as before and must eventually reach n which gives us a blue edge of type 3, a contradiction. This proves that there are no singletons in π. Lemma 4. Let π ι be a permutation of {1,..., n} that does not contain a good blue edge and let G π be its associated breakpoint graph. Then all of G π s blue edges have a unique type, the first is of type 2, the last is of type 1, and all other blue edges are of type 4. Proof. The fact that all blue edges have a unique type follows immediately from Lemma 3. Since condition 3 of Lemma 2 is not satisfied, the first blue edge cannot be of type 3 and must thus be of type 2. (The first blue edge can never be of type 1 or 4.) We now prove that all other blue edges apart from the last are of type 4. In fact, all we need to show is that they are not of type 1, for if there were an arc of type 2 or 3, one of the conditions 2 or 3 in Lemma 2 would hold. Note further that because π contains no singletons, there are either 0 or 2 edges incident to each vertex of G π. So G π forms a unique cycle. Following this cycle from the end of the leftmost

6 f e f e π + i 1 + e (a) Assume edge e is the first of type 1 (all shown edges between the first and the last are of type 4). (b) The next blue edge e must point to the left, as well as the red edge e incident to ± 1. Fig. 5. Illustrations to the proof of Lemma 4. blue edge f, look at the first blue edge e of type 1, see Fig. 5 (a). (We will actually show that this edge must be the last.) Define as the element to the left of the right endpoint of e. By the same reasoning as in Lemma 3, the blue edge e incident to cannot point to the right, and likewise the next red edge e must point to the left (Fig. 5 (b)), because otherwise e would be of type 2. Now either e = f (in which case we are done), or the argument can be continued inductively until we eventually reach edge f. The proof is finished by noting that there must be at least one blue edge of type 1, for otherwise G π would not form a cycle. For the proof of the following lemma we need another definition for blue edges [9]: two blue edges (, π j ) and (π k, π l ) are said to be interleaving if the intervals [i, j] and [k, l] overlap but neither of them contains the other. Lemma 5. Let π ι be a permutation of {1,..., n} that does not contain a good blue edge. Then s of the form π = (p 1,..., 1, p }{{} 2,..., p 1 + 1,......, n,..., p }{{} b(π) 1 + 1), ( ) }{{} l 1 l 2 l b(π) i.e. π consists of b(π) 2 descending strips of length l i 2 for all 1 i b(π). Proof. By Lemma 4, G π consists of one blue edge of type 2 at the beginning, one blue edge of type 1 at the end, and all blue edges in between are of type 4. Because G π forms a unique cycle and blue edges of type 4 must interleave with at least two other blue edges, the only possible arrangement of these edges looks as shown in Fig. 6, with (, π j ) being its first blue edge. π π j n+1 Fig. 6. The only possible breakpoint graph when we cannot apply two reversals that eliminate a breakpoint. First note that i = 0, for otherwise the blue edge (, π j ) would be good. Following the first blue arc from = 0, we see that π j = 1. Therefore the first strip must be p 1,..., 1 with l 1 = p 1 2, for if p 1 = 1, the strip would be a singleton. Continuing this line of arguments we get that π must of the form ( ). To see that b(π) 2, assume that there is only one breakpoint in π. Then there would be no edge of type 4 in G π, so the blue edge of type 1 would start at π 1 and would thus be good. The previous lemma has characterized permutations that do not contain a good blue edge. We now show how to cope with these hard instances.

7 (a) Here we are in the situation of Lemma 4. The permutation is sorted by first applying the prefix reversal φ(9) (b)... then φ(5) (c)... again φ(9) (d)... then φ(7) (e)... again φ(9) (f)... and finally φ(6) (g) The sorted permutation. Fig. 7. Continuing the running example: This figure shows the effect of the generic sorting sequence. Lemma 6. Assume s of the form ( ), and let l 1,..., l b(π) be defined as in Lemma 5. Then the sequence of 2b(π) prefix reversals φ(n) φ(n l 1 ) φ(n) φ(n l 2 ) φ(n) φ(n l b(π) ) applied to π yields the identity permutation. Proof. Applying the first two reversals to π yields π := (p 2,..., p 1 + 1, p 3,..., p 2 + 1,......, n,..., p b(π) 1 + 1, 1,..., p 1 ). We now prove by induction on the number of breakpoints in π (equal to b(π)) that applying the next 2b(π) 2 prefix reversals yields the identity. The base is when b(π ) = 2. So π = (n,..., p 1 + 1, 1,..., p 1 ), and π φ(n) φ(n l 2 ) is clearly equal to ι. For the induction step, let π = (p 2,..., p 1 + 1, p 3,..., p 2 + 1,......, n,..., p b(π) 1 + 1, 1,..., p 1 ). Now π φ(n) φ(n l 2 ) = (p 3,..., p 2 + 1,......, n,..., p b(π) 1 + 1, 1,..., p 1, p 1 + 1,..., p 2 ), which is of the same form as π but has one breakpoint less. The claim follows. See Fig. 7 for an example of the generic sorting sequence. We note that in the above lemma, the first two prefix reversals (φ(n) and φ(n l 1 )) do not eliminate a breakpoint, whereas the last two prefix reversals (φ(n) and φ(n l b(π) )) both create an adjacency, and all other pairs of reversals create exactly one adjacency. That is, the last two prefix reversals compensate for the first two that could not create any adjacency. We now come to our main result:

8 Corollary 1. MIN-SBPR is 2-approximable. Proof. While the breakpoint graph of π contains a good blue edge, choose on of these edges and apply at most 2 prefix reversals to eliminate a breakpoint. If this is impossible, by Lemma 5 π must be of the form ( ), which can be transformed into the identity permutation ι by the generic sequence of prefix reversals given in Lemma 6. The number of prefix reversals used is at most 2b(π). The claim follows with the lower bound given in Lemma 1. 4 Empirical Results We implemented the algorithm that drops out from the proof of Cor. 1. The obvious strategy used was that good arcs of type 1 were preferred over good arcs of type 2 or 3 because the former just need one prefix reversal to create an adjacency instead of two. This algorithm was compared to a branch-and-bound method to compute the optimal number of prefix reversals to sort a given permutation. Due to the enormous size of the group of permutations (and the even more numerous number of possible sorting sequences to be inspected by the branch-and-bound algorithm), we chose to select at random 10,000 permutations of length up to 71 and computed the actual approximation ratios of our 2-approximation. The results can be seen in Fig approximation ratio size of permutation Fig. 8. The actual approximation ratios of our 2-approximation algorithm. The size of the permutations is plotted against the number of operations performed by our algorithm, divided by the minimum number of prefix reversals needed to sort these permutations. All numbers are averaged over 10,000 random permutations of the shown size. It is interesting to see that the actual approximation ratio is much better than 2. This suggests that with a deeper analysis of the algorithm the theoretical approximation ratio could even be lowered. For example, we were able to prove that certain blue arcs of type 4 (similar to the ones in Fig. 6) contribute to d(π) by an extra prefix reversal. Nevertheless this is not sufficient to lower the theoretical approximation ratio of the algorithm: To do so, one would

9 have to make sure that, among other things, such situations are not created unless they are inevitable. Another point to note on Fig. 8 is that the actual approximation ratio seems to level off at 1.2. One possible explanation for this could be that the number of hard permutations for our method converges against a constant fraction of the size of the group. However, because we could only sample a constant number of permutations for every n (namely 10,000), it could also be that the really hard instances were not covered by our randomly chosen permutations and the true approximation ratio is worse than the graph shows. 5 Conclusions and Outlook We have seen an algorithm to solve MIN-SBPR with an approximation ratio of 2. We note that Cohen and Blum [5] give a similar 2-approximation for the signed version of MIN-SBPR, parts of which could also have been used for our problem. While our result is rather of theoretical interest, empirical tests have shown that on average, our algorithm is within 1.2 of the optimal for permutations of length up to 71. This suggests that there is a hidden parameter in the prefixreversal-distance d(π), in a similar way as hurdles and fortresses account for the reversal-distance in MIN-SBR. Future work will be directed towards raising the lower bound by identifying the parameters influencing the prefix-reversal distance. From a theoretical standpoint, another interesting topic of research is to prove the theoretical computational complexity of both the signed and the unsigned version of the problem. Acknowledgments We wish to thank Volker Heun for fruitful discussions and helpful suggestions on this subject. Further thanks go to an anonymous reviewer who pointed out the connection to the signed version of MIN-SBPR [5]. References 1. V. Bafna, P. A. Pevzner: Genome Rearrangements and Sorting by Reversals. SIAM J. on Computing, 25(2): , V. Bafna, P. A. Pevzner: Sorting by Transpositions SIAM J. on Discrete Mathematics 11(2), , P. Berman, S. Hannenhalli, M. Karpinski: Approximation Algorithm for Sorting by Reversals. Proc. ESA 02, Lecture Notes in Computer Science 2461: , A. Caprara: Sorting Permutations by Reversals and Eulerian Cycle Decompositions. SIAM J. on Discrete Mathematics 12(1): , D. S. Cohen, M. Blum: On the Problem of Sorting Burnt Pancakes. Discrete Applied Mathematics 61: , Z. Dias, J. Meidanis: Sorting by Prefix Transpositions. Proc. SPIRE 02, Lecture Notes in Computer Science 2476: 65 76, W. H. Gates, C. H. Papadimitriou: Bounds for Sorting by Prefix Reversals. Discrete Mathematics 27: 47 57, S. Hannehalli, P. Pevzner: TO CUT... OR NOT TO CUT (Applications of Comparative Physical Maps in Molecular Evolution). Proceedings of the 7th ACM Symposium on Discrete Algorithms (SODA 96), , S. Hannenhalli, P. A. Pevzner. Transforming Cabbage into Turnip: Polynomial Algorithm for Sorting Signed Permutations by Reversals. J. of the ACM 46(1): 1 27, T. Hartman, R. Shamir: A Simpler 1.5-Approximation Algorithms for Sorting by Transpositions, Proc. CPM 03, Lecture Notes in Computer Science 2676, , M. H. Heydari, I. H. Sudborough: On the Diameter of the Pancake Network. J. of Algorithms 25: 67 94, M. H. Heydari. The Pancake Problem. PhD-thesis, University of Wisconsin at Whitewater, 1993.

10 13. J. Kececioglu, D. Sankoff. Efficient Bounds for Oriented Chromosome Inversion Distance. Proc. CPM 94, Lecture Notes in Computer Science 807: , J. Kececioglu, D. Sankoff. Exact and Approximation Algorithms for Sorting by Reversals, with Application to Genome Rearrangements. Algorithmica 13: , 1995.

Bounds for Cut-and-Paste Sorting of Permutations

Bounds for Cut-and-Paste Sorting of Permutations Bounds for Cut-and-Paste Sorting of Permutations Daniel Cranston Hal Sudborough Douglas B. West March 3, 2005 Abstract We consider the problem of determining the maximum number of moves required to sort

More information

A Genetic Approach with a Simple Fitness Function for Sorting Unsigned Permutations by Reversals

A Genetic Approach with a Simple Fitness Function for Sorting Unsigned Permutations by Reversals A Genetic Approach with a Simple Fitness Function for Sorting Unsigned Permutations by Reversals José Luis Soncco Álvarez Department of Computer Science University of Brasilia Brasilia, D.F., Brazil Email:

More information

A Simpler and Faster 1.5-Approximation Algorithm for Sorting by Transpositions

A Simpler and Faster 1.5-Approximation Algorithm for Sorting by Transpositions A Simpler and Faster 1.5-Approximation Algorithm for Sorting by Transpositions Tzvika Hartman Ron Shamir January 15, 2004 Abstract An important problem in genome rearrangements is sorting permutations

More information

A Approximation Algorithm for Sorting by Transpositions

A Approximation Algorithm for Sorting by Transpositions A 1.375-Approximation Algorithm for Sorting by Transpositions Isaac Elias 1 and Tzvika Hartman 2 1 Dept. of Numerical Analysis and Computer Science, Royal Institute of Technology, Stockholm, Sweden. isaac@nada.kth.se.

More information

Algorithms for Bioinformatics

Algorithms for Bioinformatics Adapted from slides by Alexandru Tomescu, Leena Salmela, Veli Mäkinen, Esa Pitkänen 582670 Algorithms for Bioinformatics Lecture 3: Greedy Algorithms and Genomic Rearrangements 11.9.2014 Background We

More information

Greedy Algorithms and Genome Rearrangements

Greedy Algorithms and Genome Rearrangements Greedy Algorithms and Genome Rearrangements 1. Transforming Cabbage into Turnip 2. Genome Rearrangements 3. Sorting By Reversals 4. Pancake Flipping Problem 5. Greedy Algorithm for Sorting by Reversals

More information

Transforming Cabbage into Turnip Genome Rearrangements Sorting By Reversals Greedy Algorithm for Sorting by Reversals Pancake Flipping Problem

Transforming Cabbage into Turnip Genome Rearrangements Sorting By Reversals Greedy Algorithm for Sorting by Reversals Pancake Flipping Problem Transforming Cabbage into Turnip Genome Rearrangements Sorting By Reversals Greedy Algorithm for Sorting by Reversals Pancake Flipping Problem Approximation Algorithms Breakpoints: a Different Face of

More information

Exploiting the disjoint cycle decomposition in genome rearrangements

Exploiting the disjoint cycle decomposition in genome rearrangements Exploiting the disjoint cycle decomposition in genome rearrangements Jean-Paul Doignon Anthony Labarre 1 doignon@ulb.ac.be alabarre@ulb.ac.be Université Libre de Bruxelles June 7th, 2007 Ordinal and Symbolic

More information

Greedy Algorithms and Genome Rearrangements

Greedy Algorithms and Genome Rearrangements Greedy Algorithms and Genome Rearrangements Outline 1. Transforming Cabbage into Turnip 2. Genome Rearrangements 3. Sorting By Reversals 4. Pancake Flipping Problem 5. Greedy Algorithm for Sorting by Reversals

More information

GENOMIC REARRANGEMENT ALGORITHMS

GENOMIC REARRANGEMENT ALGORITHMS GENOMIC REARRANGEMENT ALGORITHMS KAREN LOSTRITTO Abstract. In this paper, I discuss genomic rearrangement. Specifically, I describe the formal representation of these genomic rearrangements as well as

More information

How good is simple reversal sort? Cycle decompositions. Cycle decompositions. Estimating reversal distance by cycle decomposition

How good is simple reversal sort? Cycle decompositions. Cycle decompositions. Estimating reversal distance by cycle decomposition How good is simple reversal sort? p Not so good actually p It has to do at most n-1 reversals with permutation of length n p The algorithm can return a distance that is as large as (n 1)/2 times the correct

More information

More Great Ideas in Theoretical Computer Science. Lecture 1: Sorting Pancakes

More Great Ideas in Theoretical Computer Science. Lecture 1: Sorting Pancakes 15-252 More Great Ideas in Theoretical Computer Science Lecture 1: Sorting Pancakes January 19th, 2018 Question If there are n pancakes in total (all in different sizes), what is the max number of flips

More information

Greedy Flipping of Pancakes and Burnt Pancakes

Greedy Flipping of Pancakes and Burnt Pancakes Greedy Flipping of Pancakes and Burnt Pancakes Joe Sawada a, Aaron Williams b a School of Computer Science, University of Guelph, Canada. Research supported by NSERC. b Department of Mathematics and Statistics,

More information

Permutation classes and infinite antichains

Permutation classes and infinite antichains Permutation classes and infinite antichains Robert Brignall Based on joint work with David Bevan and Nik Ruškuc Dartmouth College, 12th July 2018 Typical questions in PP For a permutation class C: What

More information

baobabluna: the solution space of sorting by reversals Documentation Marília D. V. Braga

baobabluna: the solution space of sorting by reversals Documentation Marília D. V. Braga baobabluna: the solution space of sorting by reversals Documentation Marília D. V. Braga March 15, 2009 II Acknowledgments This work was funded by the European Union Programme Alβan (scholarship no. E05D053131BR),

More information

A New Tight Upper Bound on the Transposition Distance

A New Tight Upper Bound on the Transposition Distance A New Tight Upper Bound on the Transposition Distance Anthony Labarre Université Libre de Bruxelles, Département de Mathématique, CP 16, Service de Géométrie, Combinatoire et Théorie des Groupes, Boulevard

More information

SORTING BY REVERSALS. based on chapter 7 of Setubal, Meidanis: Introduction to Computational molecular biology

SORTING BY REVERSALS. based on chapter 7 of Setubal, Meidanis: Introduction to Computational molecular biology SORTING BY REVERSALS based on chapter 7 of Setubal, Meidanis: Introduction to Computational molecular biology Motivation When comparing genomes across species insertions, deletions and substitutions of

More information

Edit Distances and Factorisations of Even Permutations

Edit Distances and Factorisations of Even Permutations Edit Distances and Factorisations of Even Permutations Anthony Labarre Université libre de Bruxelles (ULB), Département de Mathématique, CP 16 Service de Géométrie, Combinatoire et Théorie des Groupes

More information

((( ))) CS 19: Discrete Mathematics. Please feel free to ask questions! Getting into the mood. Pancakes With A Problem!

((( ))) CS 19: Discrete Mathematics. Please feel free to ask questions! Getting into the mood. Pancakes With A Problem! CS : Discrete Mathematics Professor Amit Chakrabarti Please feel free to ask questions! ((( ))) Teaching Assistants Chien-Chung Huang David Blinn http://www.cs cs.dartmouth.edu/~cs Getting into the mood

More information

Parallel Algorithm to Enumerate Sorting Reversals for Signed Permutation

Parallel Algorithm to Enumerate Sorting Reversals for Signed Permutation Parallel Algorithm to Enumerate Sorting Reversals for Signed Permutation Amit Kumar Das and Amritanjali Dept. Of Computer Science and Engineering Birla Institute of Technology Mesra, Ranchi-835215,India

More information

On Hultman Numbers. 1 Introduction

On Hultman Numbers. 1 Introduction 47 6 Journal of Integer Sequences, Vol 0 (007, Article 076 On Hultman Numbers Jean-Paul Doignon and Anthony Labarre Université Libre de Bruxelles Département de Mathématique, cp 6 Bd du Triomphe B-050

More information

Efficient bounds for oriented chromosome inversion distance

Efficient bounds for oriented chromosome inversion distance Efficient bounds for oriented chromosome inversion distance John Kececioglu* David Sanko~ Abstract We study the problem of comparing two circular chromosomes that have evolved by chromosome inversion,

More information

Enumeration of Two Particular Sets of Minimal Permutations

Enumeration of Two Particular Sets of Minimal Permutations 3 47 6 3 Journal of Integer Sequences, Vol. 8 (05), Article 5.0. Enumeration of Two Particular Sets of Minimal Permutations Stefano Bilotta, Elisabetta Grazzini, and Elisa Pergola Dipartimento di Matematica

More information

Permutation Groups. Definition and Notation

Permutation Groups. Definition and Notation 5 Permutation Groups Wigner s discovery about the electron permutation group was just the beginning. He and others found many similar applications and nowadays group theoretical methods especially those

More information

arxiv: v1 [cs.cc] 21 Jun 2017

arxiv: v1 [cs.cc] 21 Jun 2017 Solving the Rubik s Cube Optimally is NP-complete Erik D. Demaine Sarah Eisenstat Mikhail Rudoy arxiv:1706.06708v1 [cs.cc] 21 Jun 2017 Abstract In this paper, we prove that optimally solving an n n n Rubik

More information

Genome Rearrangements - Continued

Genome Rearrangements - Continued Genome Rearrangements - Continued 1 A Greedy Algorithm for Sorting by Reversals Π = 1, 2, 3, 6, 4, 5 When sorting the permutation,, one notices that the first three elements are already in order. So it

More information

THE ENUMERATION OF PERMUTATIONS SORTABLE BY POP STACKS IN PARALLEL

THE ENUMERATION OF PERMUTATIONS SORTABLE BY POP STACKS IN PARALLEL THE ENUMERATION OF PERMUTATIONS SORTABLE BY POP STACKS IN PARALLEL REBECCA SMITH Department of Mathematics SUNY Brockport Brockport, NY 14420 VINCENT VATTER Department of Mathematics Dartmouth College

More information

A NEW COMPUTATION OF THE CODIMENSION SEQUENCE OF THE GRASSMANN ALGEBRA

A NEW COMPUTATION OF THE CODIMENSION SEQUENCE OF THE GRASSMANN ALGEBRA A NEW COMPUTATION OF THE CODIMENSION SEQUENCE OF THE GRASSMANN ALGEBRA JOEL LOUWSMA, ADILSON EDUARDO PRESOTO, AND ALAN TARR Abstract. Krakowski and Regev found a basis of polynomial identities satisfied

More information

Pattern Avoidance in Unimodal and V-unimodal Permutations

Pattern Avoidance in Unimodal and V-unimodal Permutations Pattern Avoidance in Unimodal and V-unimodal Permutations Dido Salazar-Torres May 16, 2009 Abstract A characterization of unimodal, [321]-avoiding permutations and an enumeration shall be given.there is

More information

NON-OVERLAPPING PERMUTATION PATTERNS. To Doron Zeilberger, for his Sixtieth Birthday

NON-OVERLAPPING PERMUTATION PATTERNS. To Doron Zeilberger, for his Sixtieth Birthday NON-OVERLAPPING PERMUTATION PATTERNS MIKLÓS BÓNA Abstract. We show a way to compute, to a high level of precision, the probability that a randomly selected permutation of length n is nonoverlapping. As

More information

Stupid Columnsort Tricks Dartmouth College Department of Computer Science, Technical Report TR

Stupid Columnsort Tricks Dartmouth College Department of Computer Science, Technical Report TR Stupid Columnsort Tricks Dartmouth College Department of Computer Science, Technical Report TR2003-444 Geeta Chaudhry Thomas H. Cormen Dartmouth College Department of Computer Science {geetac, thc}@cs.dartmouth.edu

More information

18.204: CHIP FIRING GAMES

18.204: CHIP FIRING GAMES 18.204: CHIP FIRING GAMES ANNE KELLEY Abstract. Chip firing is a one-player game where piles start with an initial number of chips and any pile with at least two chips can send one chip to the piles on

More information

Fast Sorting and Pattern-Avoiding Permutations

Fast Sorting and Pattern-Avoiding Permutations Fast Sorting and Pattern-Avoiding Permutations David Arthur Stanford University darthur@cs.stanford.edu Abstract We say a permutation π avoids a pattern σ if no length σ subsequence of π is ordered in

More information

Dyck paths, standard Young tableaux, and pattern avoiding permutations

Dyck paths, standard Young tableaux, and pattern avoiding permutations PU. M. A. Vol. 21 (2010), No.2, pp. 265 284 Dyck paths, standard Young tableaux, and pattern avoiding permutations Hilmar Haukur Gudmundsson The Mathematics Institute Reykjavik University Iceland e-mail:

More information

Tile Number and Space-Efficient Knot Mosaics

Tile Number and Space-Efficient Knot Mosaics Tile Number and Space-Efficient Knot Mosaics Aaron Heap and Douglas Knowles arxiv:1702.06462v1 [math.gt] 21 Feb 2017 February 22, 2017 Abstract In this paper we introduce the concept of a space-efficient

More information

Non-overlapping permutation patterns

Non-overlapping permutation patterns PU. M. A. Vol. 22 (2011), No.2, pp. 99 105 Non-overlapping permutation patterns Miklós Bóna Department of Mathematics University of Florida 358 Little Hall, PO Box 118105 Gainesville, FL 326118105 (USA)

More information

TOPOLOGY, LIMITS OF COMPLEX NUMBERS. Contents 1. Topology and limits of complex numbers 1

TOPOLOGY, LIMITS OF COMPLEX NUMBERS. Contents 1. Topology and limits of complex numbers 1 TOPOLOGY, LIMITS OF COMPLEX NUMBERS Contents 1. Topology and limits of complex numbers 1 1. Topology and limits of complex numbers Since we will be doing calculus on complex numbers, not only do we need

More information

Lower Bounds for the Number of Bends in Three-Dimensional Orthogonal Graph Drawings

Lower Bounds for the Number of Bends in Three-Dimensional Orthogonal Graph Drawings ÂÓÙÖÒÐ Ó ÖÔ ÐÓÖØÑ Ò ÔÔÐØÓÒ ØØÔ»»ÛÛÛº ºÖÓÛÒºÙ»ÔÙÐØÓÒ»» vol.?, no.?, pp. 1 44 (????) Lower Bounds for the Number of Bends in Three-Dimensional Orthogonal Graph Drawings David R. Wood School of Computer Science

More information

Cutting a Pie Is Not a Piece of Cake

Cutting a Pie Is Not a Piece of Cake Cutting a Pie Is Not a Piece of Cake Julius B. Barbanel Department of Mathematics Union College Schenectady, NY 12308 barbanej@union.edu Steven J. Brams Department of Politics New York University New York,

More information

Successor Rules for Flipping Pancakes and Burnt Pancakes

Successor Rules for Flipping Pancakes and Burnt Pancakes Successor Rules for Flipping Pancakes and Burnt Pancakes J. Sawada a, A. Williams b a School of Computer Science, University of Guelph, Canada. Research supported by NSERC. E-mail: jsawada@uoguelph.ca

More information

Sorting by Block Moves

Sorting by Block Moves UNF Digital Commons UNF Theses and Dissertations Student Scholarship 2015 Sorting by Block Moves Jici Huang University of North Florida Suggested Citation Huang, Jici, "Sorting by Block Moves" (2015).

More information

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game 37 Game Theory Game theory is one of the most interesting topics of discrete mathematics. The principal theorem of game theory is sublime and wonderful. We will merely assume this theorem and use it to

More information

Problem 4.R1: Best Range

Problem 4.R1: Best Range CSC 45 Problem Set 4 Due Tuesday, February 7 Problem 4.R1: Best Range Required Problem Points: 50 points Background Consider a list of integers (positive and negative), and you are asked to find the part

More information

132-avoiding Two-stack Sortable Permutations, Fibonacci Numbers, and Pell Numbers

132-avoiding Two-stack Sortable Permutations, Fibonacci Numbers, and Pell Numbers 132-avoiding Two-stack Sortable Permutations, Fibonacci Numbers, and Pell Numbers arxiv:math/0205206v1 [math.co] 19 May 2002 Eric S. Egge Department of Mathematics Gettysburg College Gettysburg, PA 17325

More information

380 IEEE/ACM TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. 3, NO. 4, OCTOBER-DECEMBER 2006

380 IEEE/ACM TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. 3, NO. 4, OCTOBER-DECEMBER 2006 380 IEEE/ACM TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. 3, NO. 4, OCTOBER-DECEMBER 006 New Bounds and Tractable Instances for the Transposition Distance Anthony Labarre Abstract The

More information

In Response to Peg Jumping for Fun and Profit

In Response to Peg Jumping for Fun and Profit In Response to Peg umping for Fun and Profit Matthew Yancey mpyancey@vt.edu Department of Mathematics, Virginia Tech May 1, 2006 Abstract In this paper we begin by considering the optimal solution to a

More information

Algorithms. Abstract. We describe a simple construction of a family of permutations with a certain pseudo-random

Algorithms. Abstract. We describe a simple construction of a family of permutations with a certain pseudo-random Generating Pseudo-Random Permutations and Maimum Flow Algorithms Noga Alon IBM Almaden Research Center, 650 Harry Road, San Jose, CA 9510,USA and Sackler Faculty of Eact Sciences, Tel Aviv University,

More information

Permutations with short monotone subsequences

Permutations with short monotone subsequences Permutations with short monotone subsequences Dan Romik Abstract We consider permutations of 1, 2,..., n 2 whose longest monotone subsequence is of length n and are therefore extremal for the Erdős-Szekeres

More information

arxiv: v2 [math.co] 16 Dec 2014

arxiv: v2 [math.co] 16 Dec 2014 SORTING PERMUTATIONS: GAMES, GENOMES, AND CYCLES K.L.M. ADAMYK, E. HOLMES, G.R. MAYFIELD, D.J. MORITZ, M. SCHEEPERS, B.E. TENNER, AND H.C. WAUCK arxiv:1410.2353v2 [math.co] 16 Dec 2014 Abstract. It has

More information

On uniquely k-determined permutations

On uniquely k-determined permutations On uniquely k-determined permutations Sergey Avgustinovich and Sergey Kitaev 16th March 2007 Abstract Motivated by a new point of view to study occurrences of consecutive patterns in permutations, we introduce

More information

arxiv: v3 [math.co] 4 Dec 2018 MICHAEL CORY

arxiv: v3 [math.co] 4 Dec 2018 MICHAEL CORY CYCLIC PERMUTATIONS AVOIDING PAIRS OF PATTERNS OF LENGTH THREE arxiv:1805.05196v3 [math.co] 4 Dec 2018 MIKLÓS BÓNA MICHAEL CORY Abstract. We enumerate cyclic permutations avoiding two patterns of length

More information

Factorization of permutation

Factorization of permutation Department of Mathematics College of William and Mary Based on the paper: Zejun Huang,, Sharon H. Li, Nung-Sing Sze, Amidakuji/Ghost Leg Drawing Amidakuji/Ghost Leg Drawing It is a scheme for assigning

More information

Perfect sorting by reversals is not always difficult 1

Perfect sorting by reversals is not always difficult 1 Perfect sorting by reversals is not always difficult 1 S. Bérard and A. Bergeron and C. Chauve and C. Paul Juin 2005 Rapport de Recherche LIRMM RR-05042 161, rue Ada - F. 34394 Montpellier cedex 5 - Tél.

More information

Odd king tours on even chessboards

Odd king tours on even chessboards Odd king tours on even chessboards D. Joyner and M. Fourte, Department of Mathematics, U. S. Naval Academy, Annapolis, MD 21402 12-4-97 In this paper we show that there is no complete odd king tour on

More information

Wilson s Theorem and Fermat s Theorem

Wilson s Theorem and Fermat s Theorem Wilson s Theorem and Fermat s Theorem 7-27-2006 Wilson s theorem says that p is prime if and only if (p 1)! = 1 (mod p). Fermat s theorem says that if p is prime and p a, then a p 1 = 1 (mod p). Wilson

More information

Greedy Algorithms. Study Chapters /4/2014 COMP 555 Bioalgorithms (Fall 2014) 1

Greedy Algorithms. Study Chapters /4/2014 COMP 555 Bioalgorithms (Fall 2014) 1 Greedy Algorithms Study Chapters.1-.2 9//201 COMP Bioalgorithms (Fall 201) 1 Which version of Python? Use version 2.7 or 2.6 Python Information Where to run python? On your preferred platform Windows,

More information

Primitive Roots. Chapter Orders and Primitive Roots

Primitive Roots. Chapter Orders and Primitive Roots Chapter 5 Primitive Roots The name primitive root applies to a number a whose powers can be used to represent a reduced residue system modulo n. Primitive roots are therefore generators in that sense,

More information

STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES

STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES FLORIAN BREUER and JOHN MICHAEL ROBSON Abstract We introduce a game called Squares where the single player is presented with a pattern of black and white

More information

PATTERN AVOIDANCE IN PERMUTATIONS ON THE BOOLEAN LATTICE

PATTERN AVOIDANCE IN PERMUTATIONS ON THE BOOLEAN LATTICE PATTERN AVOIDANCE IN PERMUTATIONS ON THE BOOLEAN LATTICE SAM HOPKINS AND MORGAN WEILER Abstract. We extend the concept of pattern avoidance in permutations on a totally ordered set to pattern avoidance

More information

Constructions of Coverings of the Integers: Exploring an Erdős Problem

Constructions of Coverings of the Integers: Exploring an Erdős Problem Constructions of Coverings of the Integers: Exploring an Erdős Problem Kelly Bickel, Michael Firrisa, Juan Ortiz, and Kristen Pueschel August 20, 2008 Abstract In this paper, we study necessary conditions

More information

SMT 2014 Advanced Topics Test Solutions February 15, 2014

SMT 2014 Advanced Topics Test Solutions February 15, 2014 1. David flips a fair coin five times. Compute the probability that the fourth coin flip is the first coin flip that lands heads. 1 Answer: 16 ( ) 1 4 Solution: David must flip three tails, then heads.

More information

The Harassed Waitress Problem

The Harassed Waitress Problem The Harassed Waitress Problem Harrah Essed Wei Therese Italian House of Pancakes Abstract. It is known that a stack of n pancakes can be rearranged in all n! ways by a sequence of n! 1 flips, and that

More information

arxiv: v1 [math.co] 30 Nov 2017

arxiv: v1 [math.co] 30 Nov 2017 A NOTE ON 3-FREE PERMUTATIONS arxiv:1712.00105v1 [math.co] 30 Nov 2017 Bill Correll, Jr. MDA Information Systems LLC, Ann Arbor, MI, USA william.correll@mdaus.com Randy W. Ho Garmin International, Chandler,

More information

Positive Triangle Game

Positive Triangle Game Positive Triangle Game Two players take turns marking the edges of a complete graph, for some n with (+) or ( ) signs. The two players can choose either mark (this is known as a choice game). In this game,

More information

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA Graphs of Tilings Patrick Callahan, University of California Office of the President, Oakland, CA Phyllis Chinn, Department of Mathematics Humboldt State University, Arcata, CA Silvia Heubach, Department

More information

A Graph Theory of Rook Placements

A Graph Theory of Rook Placements A Graph Theory of Rook Placements Kenneth Barrese December 4, 2018 arxiv:1812.00533v1 [math.co] 3 Dec 2018 Abstract Two boards are rook equivalent if they have the same number of non-attacking rook placements

More information

Determinants, Part 1

Determinants, Part 1 Determinants, Part We shall start with some redundant definitions. Definition. Given a matrix A [ a] we say that determinant of A is det A a. Definition 2. Given a matrix a a a 2 A we say that determinant

More information

arxiv: v2 [cs.cc] 18 Mar 2013

arxiv: v2 [cs.cc] 18 Mar 2013 Deciding the Winner of an Arbitrary Finite Poset Game is PSPACE-Complete Daniel Grier arxiv:1209.1750v2 [cs.cc] 18 Mar 2013 University of South Carolina grierd@email.sc.edu Abstract. A poset game is a

More information

EXPLAINING THE SHAPE OF RSK

EXPLAINING THE SHAPE OF RSK EXPLAINING THE SHAPE OF RSK SIMON RUBINSTEIN-SALZEDO 1. Introduction There is an algorithm, due to Robinson, Schensted, and Knuth (henceforth RSK), that gives a bijection between permutations σ S n and

More information

Game Theory and Randomized Algorithms

Game Theory and Randomized Algorithms Game Theory and Randomized Algorithms Guy Aridor Game theory is a set of tools that allow us to understand how decisionmakers interact with each other. It has practical applications in economics, international

More information

Math236 Discrete Maths with Applications

Math236 Discrete Maths with Applications Math236 Discrete Maths with Applications P. Ittmann UKZN, Pietermaritzburg Semester 1, 2012 Ittmann (UKZN PMB) Math236 2012 1 / 43 The Multiplication Principle Theorem Let S be a set of k-tuples (s 1,

More information

Permutation Tableaux and the Dashed Permutation Pattern 32 1

Permutation Tableaux and the Dashed Permutation Pattern 32 1 Permutation Tableaux and the Dashed Permutation Pattern William Y.C. Chen, Lewis H. Liu, Center for Combinatorics, LPMC-TJKLC Nankai University, Tianjin 7, P.R. China chen@nankai.edu.cn, lewis@cfc.nankai.edu.cn

More information

Solving the Rubik s Cube Optimally is NP-complete

Solving the Rubik s Cube Optimally is NP-complete Solving the Rubik s Cube Optimally is NP-complete Erik D. Demaine MIT Computer Science and Artificial Intelligence Laboratory, 32 Vassar St., Cambridge, MA 02139, USA edemaine@mit.edu Sarah Eisenstat MIT

More information

arxiv: v2 [math.gt] 21 Mar 2018

arxiv: v2 [math.gt] 21 Mar 2018 Tile Number and Space-Efficient Knot Mosaics arxiv:1702.06462v2 [math.gt] 21 Mar 2018 Aaron Heap and Douglas Knowles March 22, 2018 Abstract In this paper we introduce the concept of a space-efficient

More information

Week 1. 1 What Is Combinatorics?

Week 1. 1 What Is Combinatorics? 1 What Is Combinatorics? Week 1 The question that what is combinatorics is similar to the question that what is mathematics. If we say that mathematics is about the study of numbers and figures, then combinatorics

More information

Introduction to Counting and Probability

Introduction to Counting and Probability Randolph High School Math League 2013-2014 Page 1 If chance will have me king, why, chance may crown me. Shakespeare, Macbeth, Act I, Scene 3 1 Introduction Introduction to Counting and Probability Counting

More information

Chameleon Coins arxiv: v1 [math.ho] 23 Dec 2015

Chameleon Coins arxiv: v1 [math.ho] 23 Dec 2015 Chameleon Coins arxiv:1512.07338v1 [math.ho] 23 Dec 2015 Tanya Khovanova Konstantin Knop Oleg Polubasov December 24, 2015 Abstract We discuss coin-weighing problems with a new type of coin: a chameleon.

More information

RESTRICTED PERMUTATIONS AND POLYGONS. Ghassan Firro and Toufik Mansour Department of Mathematics, University of Haifa, Haifa, Israel

RESTRICTED PERMUTATIONS AND POLYGONS. Ghassan Firro and Toufik Mansour Department of Mathematics, University of Haifa, Haifa, Israel RESTRICTED PERMUTATIONS AND POLYGONS Ghassan Firro and Toufik Mansour Department of Mathematics, University of Haifa, 905 Haifa, Israel {gferro,toufik}@mathhaifaacil abstract Several authors have examined

More information

Math 255 Spring 2017 Solving x 2 a (mod n)

Math 255 Spring 2017 Solving x 2 a (mod n) Math 255 Spring 2017 Solving x 2 a (mod n) Contents 1 Lifting 1 2 Solving x 2 a (mod p k ) for p odd 3 3 Solving x 2 a (mod 2 k ) 5 4 Solving x 2 a (mod n) for general n 9 1 Lifting Definition 1.1. Let

More information

Tilings with T and Skew Tetrominoes

Tilings with T and Skew Tetrominoes Quercus: Linfield Journal of Undergraduate Research Volume 1 Article 3 10-8-2012 Tilings with T and Skew Tetrominoes Cynthia Lester Linfield College Follow this and additional works at: http://digitalcommons.linfield.edu/quercus

More information

Yale University Department of Computer Science

Yale University Department of Computer Science LUX ETVERITAS Yale University Department of Computer Science Secret Bit Transmission Using a Random Deal of Cards Michael J. Fischer Michael S. Paterson Charles Rackoff YALEU/DCS/TR-792 May 1990 This work

More information

Aesthetically Pleasing Azulejo Patterns

Aesthetically Pleasing Azulejo Patterns Bridges 2009: Mathematics, Music, Art, Architecture, Culture Aesthetically Pleasing Azulejo Patterns Russell Jay Hendel Mathematics Department, Room 312 Towson University 7800 York Road Towson, MD, 21252,

More information

Evacuation and a Geometric Construction for Fibonacci Tableaux

Evacuation and a Geometric Construction for Fibonacci Tableaux Evacuation and a Geometric Construction for Fibonacci Tableaux Kendra Killpatrick Pepperdine University 24255 Pacific Coast Highway Malibu, CA 90263-4321 Kendra.Killpatrick@pepperdine.edu August 25, 2004

More information

ON SOME PROPERTIES OF PERMUTATION TABLEAUX

ON SOME PROPERTIES OF PERMUTATION TABLEAUX ON SOME PROPERTIES OF PERMUTATION TABLEAUX ALEXANDER BURSTEIN Abstract. We consider the relation between various permutation statistics and properties of permutation tableaux. We answer some of the questions

More information

Modular Arithmetic. Kieran Cooney - February 18, 2016

Modular Arithmetic. Kieran Cooney - February 18, 2016 Modular Arithmetic Kieran Cooney - kieran.cooney@hotmail.com February 18, 2016 Sums and products in modular arithmetic Almost all of elementary number theory follows from one very basic theorem: Theorem.

More information

lecture notes September 2, Batcher s Algorithm

lecture notes September 2, Batcher s Algorithm 18.310 lecture notes September 2, 2013 Batcher s Algorithm Lecturer: Michel Goemans Perhaps the most restrictive version of the sorting problem requires not only no motion of the keys beyond compare-and-switches,

More information

SOLITAIRE CLOBBER AS AN OPTIMIZATION PROBLEM ON WORDS

SOLITAIRE CLOBBER AS AN OPTIMIZATION PROBLEM ON WORDS INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 8 (2008), #G04 SOLITAIRE CLOBBER AS AN OPTIMIZATION PROBLEM ON WORDS Vincent D. Blondel Department of Mathematical Engineering, Université catholique

More information

#A13 INTEGERS 15 (2015) THE LOCATION OF THE FIRST ASCENT IN A 123-AVOIDING PERMUTATION

#A13 INTEGERS 15 (2015) THE LOCATION OF THE FIRST ASCENT IN A 123-AVOIDING PERMUTATION #A13 INTEGERS 15 (2015) THE LOCATION OF THE FIRST ASCENT IN A 123-AVOIDING PERMUTATION Samuel Connolly Department of Mathematics, Brown University, Providence, Rhode Island Zachary Gabor Department of

More information

On Drawn K-In-A-Row Games

On Drawn K-In-A-Row Games On Drawn K-In-A-Row Games Sheng-Hao Chiang, I-Chen Wu 2 and Ping-Hung Lin 2 National Experimental High School at Hsinchu Science Park, Hsinchu, Taiwan jiang555@ms37.hinet.net 2 Department of Computer Science,

More information

Combinatorics in the group of parity alternating permutations

Combinatorics in the group of parity alternating permutations Combinatorics in the group of parity alternating permutations Shinji Tanimoto (tanimoto@cc.kochi-wu.ac.jp) arxiv:081.1839v1 [math.co] 10 Dec 008 Department of Mathematics, Kochi Joshi University, Kochi

More information

Mathematical Representations of Ciliate Genome Decryption

Mathematical Representations of Ciliate Genome Decryption Mathematical Representations of Ciliate Genome Decryption Gustavus Adolphus College February 28, 2013 Ciliates Ciliates Single-celled Ciliates Single-celled Characterized by cilia Ciliates Single-celled

More information

Fermat s little theorem. RSA.

Fermat s little theorem. RSA. .. Computing large numbers modulo n (a) In modulo arithmetic, you can always reduce a large number to its remainder a a rem n (mod n). (b) Addition, subtraction, and multiplication preserve congruence:

More information

Techniques for Generating Sudoku Instances

Techniques for Generating Sudoku Instances Chapter Techniques for Generating Sudoku Instances Overview Sudoku puzzles become worldwide popular among many players in different intellectual levels. In this chapter, we are going to discuss different

More information

Conway s Soldiers. Jasper Taylor

Conway s Soldiers. Jasper Taylor Conway s Soldiers Jasper Taylor And the maths problem that I did was called Conway s Soldiers. And in Conway s Soldiers you have a chessboard that continues infinitely in all directions and every square

More information

A Real-Time Algorithm for the (n 2 1)-Puzzle

A Real-Time Algorithm for the (n 2 1)-Puzzle A Real-Time Algorithm for the (n )-Puzzle Ian Parberry Department of Computer Sciences, University of North Texas, P.O. Box 886, Denton, TX 760 6886, U.S.A. Email: ian@cs.unt.edu. URL: http://hercule.csci.unt.edu/ian.

More information

Playing with Permutations: Examining Mathematics in Children s Toys

Playing with Permutations: Examining Mathematics in Children s Toys Western Oregon University Digital Commons@WOU Honors Senior Theses/Projects Student Scholarship -0 Playing with Permutations: Examining Mathematics in Children s Toys Jillian J. Johnson Western Oregon

More information

Tetsuo JAIST EikD Erik D. Martin L. MIT

Tetsuo JAIST EikD Erik D. Martin L. MIT Tetsuo Asano @ JAIST EikD Erik D. Demaine @MIT Martin L. Demaine @ MIT Ryuhei Uehara @ JAIST Short History: 2010/1/9: At Boston Museum we met Kaboozle! 2010/2/21 accepted by 5 th International Conference

More information

Optimal Results in Staged Self-Assembly of Wang Tiles

Optimal Results in Staged Self-Assembly of Wang Tiles Optimal Results in Staged Self-Assembly of Wang Tiles Rohil Prasad Jonathan Tidor January 22, 2013 Abstract The subject of self-assembly deals with the spontaneous creation of ordered systems from simple

More information

Math 127: Equivalence Relations

Math 127: Equivalence Relations Math 127: Equivalence Relations Mary Radcliffe 1 Equivalence Relations Relations can take many forms in mathematics. In these notes, we focus especially on equivalence relations, but there are many other

More information

Card-Based Protocols for Securely Computing the Conjunction of Multiple Variables

Card-Based Protocols for Securely Computing the Conjunction of Multiple Variables Card-Based Protocols for Securely Computing the Conjunction of Multiple Variables Takaaki Mizuki Tohoku University tm-paper+cardconjweb[atmark]g-mailtohoku-universityjp Abstract Consider a deck of real

More information