Space-Efficient Detection of Unusual Words
Detecting all the strings that occur in a text more frequently or less frequently than expected according to an IID or a Markov model is a basic problem in string mining, yet current algorithms are based on data structures that are either space-inefficient or incur large slowdowns, and current implementations cannot scale to genomes or metagenomes in practice. In this paper we engineer an algorithm based on the suffix tree of a string to use just a small data structure built on the Burrows-Wheeler transform, and a stack of \(O(\sigma ^2\log ^2 n)\) bits, where n is the length of the string and \(\sigma \) is the size of the alphabet. The size of the stack is o(n) except for very large values of \(\sigma \). We further improve the algorithm by removing its time dependency on \(\sigma \), by reporting only a subset of the maximal repeats and of the minimal rare words of the string, and by detecting and scoring candidate under-represented strings that do not occur in the string. Our algorithms are practical and work directly on the BWT, thus they can be immediately applied to a number of existing datasets that are available in this form, returning this string mining problem to a manageable scale.
KeywordsInternal Node Lexicographic Order Maximal Repeat Empty String Lower Common Ancestor
Unable to display preview. Download preview PDF.
- 1.Apostolico, A., Bock, M.E., Lonardi, S.: Monotony of surprise and large-scale quest for unusual words. Journal of Computational Biology 10(3–4), 283–311 (2003)Google Scholar
- 3.Apostolico, A., Bock, M.E., Xu, X.: Annotated statistical indices for sequence analysis. In: Proceedgins of Compression and Complexity of Sequences 1997, pp. 215–229. IEEE (1998)Google Scholar
- 5.Belazzougui, D.: Linear time construction of compressed text indices in compact space. In: Proceedings of the 46th Annual ACM Symposium on Theory of Computing, STOC 2014, pp. 148–193. ACM, New York (2014)Google Scholar
- 10.Crochemore, M., Rytter, W.: Jewels of stringology. World Scientific (2002)Google Scholar
- 11.Gog, S.: Compressed suffix trees: design, construction, and applications. PhD thesis, University of Ulm, Germany (2011)Google Scholar
- 14.Ileri, A.M., Külekci, M.O., Xu, B.: A simple yet time-optimal and linear-space algorithm for shortest unique substring queries. Theoretical Computer Science 562, 621–633 (2015)Google Scholar
- 15.Keogh, E., Lonardi, S., Chiu, B.Y.-C.: Finding surprising patterns in a time series database in linear time and space. In: Proceedings of the Eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD 2002, pp. 550–556. ACM, New York (2002)Google Scholar
- 17.Morris, J.H., Pratt, V.R.: A linear pattern-matching algorithm. Technical Report 40, University of California, Berkeley (1970)Google Scholar
- 18.Simon, I.: String matching algorithms and automata. In: First South American Workshop on String Processing, Belo Horizonte, Brazil, pp. 151–157 (1993)Google Scholar