Combined Data Structure for Previous- and Next-Smaller-Values
Preprint
Abstract
Let $A$ be a static array storing $n$ elements from a totally ordered set. We present a data structure of optimal size at most $n\log_2(3+2\sqrt{2})+o(n)$ bits that allows us to answer the following queries on $A$ in constant time, without accessing $A$: (1) previous smaller value queries, where given an index $i$, we wish to find the first index to the left of $i$ where $A$ is strictly smaller than at $i$, and (2) next smaller value queries, which search to the right of $i$. As an additional bonus, our data structure also allows to answer a third kind of query: given indices $i<j$, find the position of the minimum in $A[i..j]$. Our data structure has direct consequences for the space-efficient storage of suffix trees.
Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- Wee LCPInformation Processing Letters, 2010
- Faster entropy-bounded compressed suffix treesTheoretical Computer Science, 2009
- Compressed full-text indexesACM Computing Surveys, 2007
- Compressed Suffix Trees with Full FunctionalityTheory of Computing Systems, 2007
- Succinct ordinal trees with level-ancestor queriesACM Transactions on Algorithms, 2006
- Representing Trees of Higher DegreeAlgorithmica, 2005
- Compressed Suffix Arrays and Suffix Trees with Applications to Text Indexing and String MatchingSIAM Journal on Computing, 2005
- Space Efficient Suffix TreesJournal of Algorithms, 2001
- Succinct Representation of Balanced Parentheses and Static TreesSIAM Journal on Computing, 2001
- Optimal Doubly Logarithmic Parallel Algorithms Based On Finding All Nearest Smaller ValuesJournal of Algorithms, 1993