O(1)-time unsorting by prefix-reversals in a boustrophedon linked list

6Citations
Citations of this article
1Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Conventional wisdom suggests that O(k)-time is required to reverse a substring of length k. To reduce this time complexity, a simple and unorthodox data structure is introduced. A boustrophedon linked list is a doubly-linked list, except that each node does not differentiate between its backward and forward pointers. This lack of information allows substrings of any length to be reversed in O(1)-time. This advantage is used to efficiently unsort permutations using prefix-reversals. More specifically, this paper presents two algorithms that visit each successive permutations of (n) = {1, 2,.. ., n} in worst-case O(1)-time (i.e. loopless). The first visits the permutations using a prefix-reversal Gray code due to Zaks [22], while the second visits the permutations in colexicographic order. As an added challenge, both algorithms are nonprobing since they rearrange the data structure without querying its values. To accomplish this feat, the algorithms are based on two integer sequences: A055881 in the OEIS [17] and an unnamed sequence. © 2010 Springer-Verlag Berlin Heidelberg.

Cite

CITATION STYLE

APA

Williams, A. (2010). O(1)-time unsorting by prefix-reversals in a boustrophedon linked list. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 6099 LNCS, pp. 368–379). https://doi.org/10.1007/978-3-642-13122-6_35

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free