Sorting signed permutations by reversals using link-cut trees
E. Tannier, A. Bergeron and M.-F. Sagot proposed an algorithm to sort a signed permutation P by performing a minimum number of reversals, for which two implementations exist. With a partition of P in blocks of size b, these implementations take O(n(nblogb+b)) and respectively O((nb)2+n(log(nb)+nb+...
Saved in:
Published in | Information processing letters Vol. 132; pp. 44 - 48 |
---|---|
Main Author | |
Format | Journal Article |
Language | English |
Published |
Elsevier B.V
01.04.2018
Elsevier |
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | E. Tannier, A. Bergeron and M.-F. Sagot proposed an algorithm to sort a signed permutation P by performing a minimum number of reversals, for which two implementations exist. With a partition of P in blocks of size b, these implementations take O(n(nblogb+b)) and respectively O((nb)2+n(log(nb)+nb+b)) time, where n is the size of the permutation. The best running times of O(nnlogn) and respectively O(nn) are obtained with b=nlogn and b=n respectively.
Seeking an O(nlogn) algorithm requires to drop the b addend in the running time formulas, which prevents the choice of a large b. To this end, we propose an implementation of the algorithm whose originality lies in the use of O(logn) aggregate operations allowed by link-cut trees, and by their filiform variant called log-lists. The resulting algorithm has the advantage of reaching a running time of O(n(nblogb)), but also has the drawback of potentially making use of very large numbers, reducing in practice the choices of b.
•We consider Tannier et al.'s algorithm for sorting signed permutations by reversals.•We propose a novel implementation, using the data-structure called log-lists.•We discuss its advantages and drawbacks. |
---|---|
ISSN: | 0020-0190 1872-6119 |
DOI: | 10.1016/j.ipl.2017.12.005 |