Abstract
We present a novel bit-parallel representation, based on the run-length encoding, of the nondeterministic KMP and suffix automata for a string P with at least two distinct symbols. Our encoding requires \(O((\sigma + m)\lceil \rho / w\rceil )\) space and allows one to simulate the automata on a string in time \(O(\lceil \rho / w\rceil )\) per transition, where \(\sigma \) is the alphabet size, m is the length of P, \(\rho \) is the length of the run-length encoding of P and w is the machine word size in bits. The input string can be given in either unencoded or run-length encoded form. Finally, we present practical variants of the Shift-And and BNDM algorithms based on this encoding.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Amir, A., Landau, G.M., Vishkin, U.: Efficient pattern matching with scaling. J. Algorithms 13(1), 2–32 (1992)
Baeza-Yates, R.A., Gonnet, G.H.: A new approach to text searching. Commun. ACM 35(10), 74–82 (1992)
Baeza-Yates, R.A., Navarro, G.: Faster approximate string matching. Algorithmica 23(2), 127–158 (1999)
Bagnall, A.J., Ratanamahatana, C.A., Keogh, E.J., Lonardi, S., Janacek, G.J.: A bit level representation for time series data mining with shape based similarity. Data Min. Knowl. Discov. 13(1), 11–40 (2006)
Cantone, D., Faro, S., Giaquinta, E.: A compact representation of nondeterministic (suffix) automata for the bit-parallel approach. Inf. Comput. 213, 3–12 (2012)
Crochemore, M., Rytter, W.: Text Algorithms. Oxford University Press, New York (1994)
Durian, B., Holub, J., Peltola, H., Tarhio, J.: Improving practical exact string matching. Inf. Process. Lett. 110(4), 148–152 (2010)
Ďurian, B., Peltola, H., Salmela, L., Tarhio, J.: Bit-parallel search algorithms for long patterns. In: Festa, P. (ed.) SEA 2010. LNCS, vol. 6049, pp. 129–140. Springer, Heidelberg (2010)
Fredriksson, K., Giaquinta, E.: On a compact encoding of the swap automaton. Inf. Process. Lett. 114(7), 392–396 (2014)
Fredriksson, K., Grabowski, S.: Average-optimal string matching. J. Discrete Algorithms 7(4), 579–594 (2009)
Hyyrö, H.: Improving the bit-parallel NFA of Baeza-Yates and Navarro for approximate string matching. Inf. Process. Lett. 108(5), 313–319 (2008)
Hyyrö, H., Navarro, G.: Bit-parallel witnesses and their applications to approximate string matching. Algorithmica 41(3), 203–231 (2005)
Knuth, D.E.: The Art of Computer Programming, Volume I: Fundamental Algorithms, 2nd edn. Addison-Wesley, Boston (1973)
Knuth, D.E., Pratt, V.R., Morris Jr, J.H.: Fast pattern matching in strings. SIAM J. Comput. 6(2), 323–350 (1977)
Navarro, G., Raffinot, M.: Fast and flexible string matching by combining bit-parallelism and suffix automata. ACM J. Exp. Algorithmics 5, 4 (2000)
Navarro, G., Raffinot, M.: Flexible Pattern Matching in Strings - Practical on-Line Search Algorithms for Texts and Biological Sequences. Cambridge University Press, Cambridge (2002)
Peltola, H., Tarhio, J.: Alternative algorithms for bit-parallel string matching. In: Nascimento, M.A., de Moura, E.S., Oliveira, A.L. (eds.) SPIRE 2003. LNCS, vol. 2857, pp. 80–93. Springer, Heidelberg (2003)
Wu, S., Manber, U.: Fast text searching allowing errors. Commun. ACM 35(10), 83–91 (1992)
Acknowledgments
The author thanks Jorma Tarhio, Djamal Belazzougui and the anonymous reviewers for helpful comments.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Giaquinta, E. (2015). Run-Length Encoded Nondeterministic KMP and Suffix Automata. In: Drewes, F. (eds) Implementation and Application of Automata. CIAA 2015. Lecture Notes in Computer Science(), vol 9223. Springer, Cham. https://doi.org/10.1007/978-3-319-22360-5_9
Download citation
DOI: https://doi.org/10.1007/978-3-319-22360-5_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-22359-9
Online ISBN: 978-3-319-22360-5
eBook Packages: Computer ScienceComputer Science (R0)