Space Efficient Data Structures for Nearest Larger Neighbor
Given a sequence of n elements from a totally ordered set, and a position in the sequence, the nearest larger neighbor (NLN) query returns the position of the element which is closest to the query position, and is larger than the element at the query position. The problem of finding all nearest larger neighbors has attracted interest due to its applications for parenthesis matching and in computational geometry [1, 2, 3]. We consider a data structure version of this problem, which is to preprocess a given sequence of elements to construct a data structure that can answer NLN queries efficiently. We consider time-space tradeoffs for the problem in both the encoding (where the input is not accessible after the data structure has been created) and indexing model, and consider cases when the input is in a one or two dimensional array. We also consider the version when only the nearest larger right neighbor (NLRN) is sought (in one dimension). We initiate the study of this problem in two dimensions, and describe upper and lower bounds in the encoding and indexing models, distinguishing the two cases when all the elements are distinct or non-distinct.
KeywordsQuery Time Indexing Model Suffix Tree Dimensional Array Query Algorithm
- 11.Peter, B.: Miltersen Cell probe complexity - a survey. In: FSTTCS (1999)Google Scholar