Abstract
A sequence of real numbers is called twisted if it can be produced from the sorted sequence by repeatedly reversing the order of consecutive subsequences. It is shown that twisted sequences constitute a class of exponentially many members each of which can be recognized and sorted, by a simple on-line algorithm, in linear time.
Similar content being viewed by others
References
A. V. Aho, J. E. Hopcroft, and J. D. Ullman,Data Structures and Algorithms, Addison Wesley, Reading, MA (1983).
K. S. Booth and G. S. Luecker,Testing for the consecutive ones property, interval graphs, and graph planarity using PQ-tree algorithms, J. Computer and System Sciences 13 (1976), pp. 335–379.
K. Hoffmann, K. Mehlhorn, P. Rosenstiehl, and R. E. Tarjan,Sorting Jordan sequences in linear time using level-linked search trees, Information and Control 68 (1986), pp. 170–184.
R. Kemp,Fundamentals of the Average Case Analysis of Particular Algorithms, Wiley-Teubner Series Comp. Sci. (1984).
D. Knuth,The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison Wesley, Reading, MA (1973).
K. Mehlhorn,Data Structures and Algorithms, Vol. 1: Sorting and Searching, Springer-Verlag, Berlin (1984).
F. P. Preparata and M. I. Shamos,Computational Geometry, Springer-Verlag, New York (1985).
Author information
Authors and Affiliations
Additional information
Research was supported by the Austrian Fonds zur Förderung der Wissenschaftlichen Forschung.
Rights and permissions
About this article
Cite this article
Aurenhammer, F. On-line sorting of twisted sequences in linear time. BIT 28, 194–204 (1988). https://doi.org/10.1007/BF01934085
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01934085