Paper record
W1963953096A Generalization of the Suffix Tree to Square Matrices, with Applications
Raffaele Giancarlo
- Year
- 1995
- Venue
- SIAM Journal on Computing
- References
- 22
- Cited by
- 77
Details and counts from OpenAlex.
Abstract
We describe a new data structure, the Lsuffix tree, which generalizes McCreight’s suffix tree for a string [J. Assoc. Comput. Mach., 23 (1976), pp. 262–272] to a square matrix. All matrices have entries from a totally ordered alphabet . Based on the Lsuffix tree, we give efficient algorithms for the static versions of the following dual problems that arise in low-level image processing and visual databases. Two-dimensional pattern retrieval. We have a library of texts $S = \{\textit{TEXT}^{1}, \dotsc , \textit{TEXT}^{r}\}$, where is an matrix, . We may preprocess the library. Then, given an , , $1 \leq i \leq r $, pattern matrix , we want to find all occurrences of in , for all . Let be the size of the library. The preprocessing step builds the Lsuffix tree for the matrices in S and then transforms it into an index (a trie defined over $\Sigma $). It takes time and space. The index can be queried directly in time, where is the total number of occurrences of in , for all . Two-dimensional dictionary matching. We have a dictionary of patterns $DC = \{\textit{PAT}_{1}, \dotsc , \textit{PAT}_{s}\}$, where is of dimension , . We may preprocess the dictionary. Then, given an text matrix , we want to search for all occurrences of patterns in the dictionary in the text. Let be the size of the dictionary and let be the sum of the ’s. The preprocessing consists of building the Lsuffix tree for the matrices in . It takes ) time and space. The search step takes time, where is the total number of occurrences of patterns in the text. Both problems have a dynamic version in which the library and the dictionary, respectively, can be updated by insertion or deletion of square matrices in them. In a companion paper we will provide algorithms for the dynamic version.