Abstract
We introduce the notion ofsearchability as a property of an in place merging algorithm. We show that a pair of sorted arrays can be merged in place in linear time, so that a search can be performed in logarithmic time at any point during the merging process. We apply this method to devise an implicit data structure which can support searches inO(log2 n) time in the worst case, andO(logn) on the average, and insertions inO(logn) time, in the worst case.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
J. L. Bentley, D. Detig, L. Guibas and J. B. Saxe,An optimal data structure for minimal-storage dynamic member searching, Carnegie-Mellon University, 1978.
J. L. Bentley and J. B. Saxe,Decomposable searching problems I. Static-to-dynamic transformation, Journal of Algorithms 1, 4 (Dec. 1980), 301–358.
E. C. Horvath,Stable sorting in asymptotically optimal time and extra space, Journal of the ACM 25, 2 (April 1978), 177–199.
F. K. Hwang and S. Lin,A simple algorithm for merging two disjoint linearly ordered sets, SIAM Journal on Computing 1, 1 (March 1972), 31–39.
D. E. Knuth,The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley, Reading, MA., 1973.
M. A. Kronrod,An optimal ordering algorithm without a field of operation, Dok. Akad. Nauk SSSR 186 (1969), 1256–1258.
J. I. Munro,An implicit data structure supporting insertion, deletion and search in O(log2 n)time, Journal of Computer and System Sciences 33, 1 (August 1986), 66–74.
J. I. Munro and P. V. Poblete,Searchability in merging and implicit data structures, Proceedings 10th International Conference on Automata, Languages and Programming, Barcelona, July 1983.
J. I. Munro and H. Suwanda,Implicit structure for fast search and update, Journal of Computer and System Sciences 21, 2 (Oct. 1980), 236–250.
L. Trabb Pardo,Stable sorting and merging with optimal space and time bounds, SIAM Journal on Computing 6, 2 (June 1977), 351–372.
J. K. Wong,Some simple in-place merging algorithms, BIT 21 (1981), 157–166.
Author information
Authors and Affiliations
Additional information
This research was partly supported by NSERC under grant A8237 and presented in preliminary form at the 10th International Colloquium on Automata, Languages and Programming.
On leave from the University of Chile.