Sorting Signed Permutations by Inversions in O(nlogn) Time

  • Krister M. Swenson
  • Vaibhav Rajan
  • Yu Lin
  • Bernard M. E. Moret
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5541)


The study of genomic inversions (or reversals) has been a mainstay of computational genomics for nearly 20 years. After the initial breakthrough of Hannenhalli and Pevzner, who gave the first polynomial-time algorithm for sorting signed permutations by inversions, improved algorithms have been designed, culminating with an optimal linear-time algorithm for computing the inversion distance and a subquadratic algorithm for providing a shortest sequence of inversions—also known as sorting by inversions. Remaining open was the question of whether sorting by inversions could be done in O(nlogn) time.

In this paper, we present a qualified answer to this question, by providing two new sorting algorithms, a simple and fast randomized algorithm and a deterministic refinement. The deterministic algorithm runs in time O(nlogn + kn), where k is a data-dependent parameter. We provide the results of extensive experiments showing that both the average and the standard deviation for k are small constants, independent of the size of the permutation. We conclude (but do not prove) that almost all signed permutations can be sorted by inversions in O(nlogn) time.


Negative Element Frame Element Logarithmic Time Signed Permutation Left Subtree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bader, D.A., Moret, B.M.E., Yan, M.: A fast linear-time algorithm for inversion distance with an experimental comparison. J. Comput. Biol. 8(5), 483–491 (2001)CrossRefPubMedGoogle Scholar
  2. 2.
    Bergeron, A., Heber, S., Stoye, J.: Common intervals and sorting by reversals: a marriage of necessity. In: Proc. 2nd European Conf. Comput. Biol. ECCB 2002, pp. 54–63 (2002)Google Scholar
  3. 3.
    Bergeron, A., Stoye, J.: On the similarity of sets of permutations and its applications to genome comparison. In: Warnow, T.J., Zhu, B. (eds.) COCOON 2003. LNCS, vol. 2697, pp. 68–79. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  4. 4.
    Caprara, A.: Sorting by reversals is difficult. In: Proc. 1st Int’l Conf. Comput. Mol. Biol. (RECOMB 1997), pp. 75–83 (1997)Google Scholar
  5. 5.
    Day, W.H.E., Sankoff, D.: The computational complexity of inferring phylogenies from chromosome inversion data. J. Theor. Biol. 127, 213–218 (1987)CrossRefGoogle Scholar
  6. 6.
    Hannenhalli, S., Pevzner, P.A.: Transforming cabbage into turnip (polynomial algorithm for sorting signed permutations by reversals). In: Proc. 27th Ann. ACM Symp. Theory of Comput (STOC 1995), pp. 178–189. ACM Press, New York (1995)Google Scholar
  7. 7.
    Kaplan, H., Verbin, E.: Efficient data structures and a new randomized approach for sorting signed permutations by reversals. In: Baeza-Yates, R., Chávez, E., Crochemore, M. (eds.) CPM 2003. LNCS, vol. 2676, pp. 170–185. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Moret, B.M.E., Warnow, T.: Advances in phylogeny reconstruction from gene order and content data. In: Zimmer, E.A., Roalson, E.H. (eds.) Molecular Evolution: Producing the Biochemical Data, Part B, Methods in Enzymology, vol. 395, pp. 673–700. Elsevier, Amsterdam (2005)CrossRefGoogle Scholar
  9. 9.
    Palmer, J.D.: Chloroplast and mitochondrial genome evolution in land plants. In: Herrmann, R. (ed.) Cell Organelles, pp. 99–133. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  10. 10.
    Palmer, J.D., Thompson, W.F.: Rearrangements in the chloroplast genomes of mung bean and pea. Proc. Nat’l Acad. Sci., USA 78, 5533–5537 (1981)CrossRefGoogle Scholar
  11. 11.
    Sankoff, D.: Edit distance for genome comparison based on non-local operations. In: Apostolico, A., Galil, Z., Manber, U., Crochemore, M. (eds.) CPM 1992. LNCS, vol. 644, pp. 121–135. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  12. 12.
    Sankoff, D., Goldstein, M.: Probabilistic models for genome shuffling. Bull. Math. Biol. 51, 117–124 (1989)CrossRefPubMedGoogle Scholar
  13. 13.
    Sleator, D.D., Tarjan, R.E.: Self-adjusting binary search trees. J. ACM 32(3), 652–686 (1985)CrossRefGoogle Scholar
  14. 14.
    Sturtevant, A.H.: A crossover reducer in Drosophila melanogaster due to inversion of a section of the third chromosome. Biol. Zent. Bl. 46, 697–702 (1926)Google Scholar
  15. 15.
    Sturtevant, A.H., Dobzhansky, T.: Inversions in the third chromosome of wild races of drosophila pseudoobscura and their use in the study of the history of the species. Proc. Nat’l Acad. Sci., USA 22, 448–450 (1936)CrossRefGoogle Scholar
  16. 16.
    Tannier, E., Bergeron, A., Sagot, M.-F.: Advances on sorting by reversals. Disc. Appl. Math. 155(6–7), 881–888 (2007)CrossRefGoogle Scholar
  17. 17.
    Tannier, E., Sagot, M.-F.: Sorting by reversals in subquadratic time. In: Sahinalp, S.C., Muthukrishnan, S.M., Dogrusoz, U. (eds.) CPM 2004. LNCS, vol. 3109, pp. 1–13. Springer, Heidelberg (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Krister M. Swenson
    • 1
  • Vaibhav Rajan
    • 1
  • Yu Lin
    • 1
  • Bernard M. E. Moret
    • 1
  1. 1.Laboratory for Computational Biology and BioinformaticsEPFL (École Polytechnique Fédérale de Lausanne)Switzerland

Personalised recommendations