# Efficient Data Structures and a New Randomized Approach for Sorting Signed Permutations by Reversals

- 20 Citations
- 476 Downloads

## Abstract

The problem of sorting signed permutations by reversals (SBR) is a fundamental problem in computational molecular biology. The goal is, given a signed permutation, to find a shortest sequence of reversals that transforms it into the positive identity permutation, where a reversal is the operation of taking a segment of the permutation, reversing it, and flipping the signs of its elements.

In this paper we describe a randomized algorithm for SBR. The algorithm tries to sort the permutation by performing a random walk on the oriented Caylay-like graph of signed permutations under its oriented reversals, until it gets “stuck”. We show that if we get stuck at the identity permutation, then we have found a shortest sequence. Empirical testing shows that this process indeed succeeds with high probability on a random permutation.

To implement our algorithm we describe an efficient data structure to maintain a permutation under reversals and draw random oriented reversals in sub-linear time per operation. With this data structure we can implement the random walk in time \( O\left( {n^{3/2} \sqrt {\log n} } \right) \) , thus obtaining an algorithm for SBR that almost always runs in subquadratic time. The data structures we present may also be of independent interest for developing other algorithms for SBR, and for other problems.

## Keywords

Random Permutation Unoriented Component Logarithmic Time Randomize Approach Identity Permutation## Preview

Unable to display preview. Download preview PDF.

## References

- 1.D. A. Bader, B. M. E. Moret, and M. Yan,
*A linear-time algorithm for computing inversion distance between signed Permutations with an experimental study*, Workshop on Algorithms and Data Structures, 2001, pp. 365–376.Google Scholar - 2.V. Bafna and P. A. Pevzner,
*Genome rearragements und sorting by reversals*, SIAM Journal on Computing**25**(1996), no. 2, 272–289.zbMATHCrossRefMathSciNetGoogle Scholar - 3.A. Bergeron,
*A very elementary presentation of the hannenhalli-pevzner theory*, CPM (2001), 106–117.Google Scholar - 4.A. Bergeron, C. Chauve, T. Hartman, and K. Saint-Onge,
*On the properties of sequences of reversals that sort a signed Permutation*, proceedings of JOBIM, June 2002, pp. 99–108.Google Scholar - 5.A. Caprara,
*Sorting by reversals is difficult*, Proceedings of the First International Conference on Computational Molecular Biology (RECOMB), ACM Press, 1997, pp. 75–83.Google Scholar - 6.M. Chrobak, T. Szymacha, and A. Krawczyk,
*A data structure useful for finding hamiltonian cycles*, Theoretical Computer Science**71**(1990), no. 3, 419–424.zbMATHCrossRefMathSciNetGoogle Scholar - 7.M. L. Fredman, D. S. Johnson, L. A. McGeoch, and G. Ostheimer,
*Data structures for traveling salesmen*, Journal of Algorithms**18**(1995), no. 3, 432–479.zbMATHCrossRefMathSciNetGoogle Scholar - 8.S. Hannenhalli and P. A. Pevzner,
*Transforming cabbage into turnip (polynomial algorithm for sorting signed Permutations by reversals)*, Proceedings of the Twenty-Seventh Annual ACM Symposium on Theory of Computing (Las Vegas, Nevada), 29 May–1 June 1995, pp. 178–189.Google Scholar - 9.T. Hartman,
*A simpler 1.5-approximation algorithm for sorting by transpositions*, CPM’ 03, in these proceedings.Google Scholar - 10.H. Kaplan, R. Shamir, and R. E. Tarjan,
*A faster and simpler algorithm for sorting signed permutations by reversals*, SIAM J. Comput.**29**(1999), no. 3, 880–892.CrossRefMathSciNetGoogle Scholar - 11.M. Ozery-Flato and R. Shamir,
*Two notes on genome rearrangements*, Journal of Bioinformatics and Computational Biology (to appear).Google Scholar - 12.P. A. Pevzner,
*Computational molecular biology: An algorithmic approach*, The MIT Press, Cambridge, MA, 2000.zbMATHGoogle Scholar - 13.R. Y. Pinter and S. Skiena,
*Genomic sorting with length-weighted reversals*, manuscript.Google Scholar - 14.D.D. Sleator and R.E. Tarjan,
*Self-adjusting binary search trees*, J. Assoc. Comput. Mach.**32**(1985), 652–686.zbMATHMathSciNetGoogle Scholar