Shortest Unique Substring Query Revisited
We revisit the problem of finding shortest unique substring (SUS) proposed recently by Pei et al. (ICDE’13). We propose an optimal O(n) time and space algorithm that can find an SUS for every location of a string of size n and thus significantly improve their O(n 2) time complexity. Our method also supports finding all the SUSes covering every location, whereas theirs can find only one SUS for every location. Further, our solution is simpler and easier to implement and can also be more space efficient in practice, since we only use the inverse suffix array and the longest common prefix array of the string, while their algorithm uses the suffix tree of the string and other auxiliary data structures. Our theoretical results are validated by an empirical study that shows our method is much faster and more space-saving.
Keywordsshortest unique substring repetitiveness regularity
Unable to display preview. Download preview PDF.
- 1.Crochemore, M., Rytter, W.: Jewels of stringology. World Scientific (2003)Google Scholar
- 2.İleri, A.M., Külekci, M.O., Xu, B.: Shortest unique substring query revisited, http://arxiv.org/abs/1312.2738
- 5.Pei, J., Wu, W.C.H., Yeh, M.Y.: On shortest unique substring queries. In: Proceedings of the 2013 IEEE International Conference on Data Engineering (ICDE), pp. 937–948 (2013)Google Scholar