Abstract
The string matching problem is an extensively studied computational problem having applications in many areas such as text editors, compilers, data compression, plagiarism detection, pattern recognition, etc. Dozens of algorithms have been designed to solve it. The finite automata method, Knuth-Morris-Pratt and Boyer-Moore algorithms are the ones of particular importance among them. The string matching in these algorithms is preceded by pattern preprocessing during which some structure supporting the string matching process is created, such as the finite automaton in the finite automata method and the table of prefix function in the Knuth-Morris-Pratt algorithm. The periodicity in pattern implies regularity in the supporting structure, which one can use to reduce the preprocessing time. In this paper, the problem of making the preprocessing phase more efficient in case of a periodic pattern is investigated for the finite automata method and the Knuth-Morris-Pratt algorithm. It is proved that the construction of supporting structure for the entire pattern in these cases can be reduced to its construction merely for the period of that pattern without affecting the processing of the text.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Boyer, R.S., Moore, J.S.: A Fast String Searching Algorithm. Programming Techniques, pp. 762–772 (1997)
Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6, 323–350 (1997)
Baeza-Yates, R., Gonnet, G.: A new approach to text searching. In: ACM SIGIR Forum, vol. 23, no. SI, pp. 68–175. ACM, New York (1992)
Navarro, G., Raffinot, M.: A bit-parallel approach to suffix automata: fast extended string matching. In: 9th Annual Symposium on Combinatorial Pattern, pp. 14–33. Springer, Heidelberg (1998)
Al-Khamaiseh, K., Al-Shagarin, S.: A survey of string matching algorithms. Int. J. Eng. Res. Appl. 4(7), 144–156 (2014)
Galil, Z.: On improving the worst case running time of the Boyer-Moore string matching algorithm. In: 5th International Colloquium on Automata, Languages and Programming, pp. 241–250. ACM, Italy (1978)
Galil, Z., Seiferas, J.: Time-space optimal string matching. J. Comput. Syst. Sci. 26(3), 280–294 (1981)
Huang, K., Chang, C.: Mining periodic patterns in sequence data. In: Data Warehousing and Knowledge Discovery, 6th International Conference, LNCS, vol. 3181, pp. 401–410. Springer, Spain (2004)
Amir, A., Benson, G.: Detecting multiple periods and periodic patterns in event time sequences. In: Conference on Information and Knowledge Management, pp. 617–626. ACM, Singapore (2017)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. The MIT Press, USA (2009)
Smyth, W.F.: Computing Patterns in Strings, 1st edn. Addison-Wesley, UK (2003)
Aho, A., Hopcroft, J., Ullman, J.: The Design and Analysis of Computer Algorithms, 1st edn. Addison-Wesley, UK (1974)
Kostanyan A.: Fuzzy string matching with finite automata. In: Proceedings on 2017 IEEE Conference CSIT-2017, Yerevan, Armenia, pp. 25–29. IEEE Press, USA (2018)
Simon, I.: String matching algorithms and automata. In: Results and Trends in Theoretical Computer Science, pp. 386–395 (2005)
Apostolico, A., Breslauer, D., Galil, Z.: Optimal parallel algorithms for periods, palindromes and squares. In: 19th International Colloquium on Automata Languages and Programming, pp. 296–307. Springer, Berlin (1992)
Acknowledgements
This work was supported by the Ministry of Education and Science of the Republic of Armenia, project N 18T-1B341.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Kostanyan, A., Karapetyan, A. (2019). String Matching in Case of Periodicity in the Pattern. In: Dolinina, O., Brovko, A., Pechenkin, V., Lvov, A., Zhmud, V., Kreinovich, V. (eds) Recent Research in Control Engineering and Decision Making. ICIT 2019. Studies in Systems, Decision and Control, vol 199. Springer, Cham. https://doi.org/10.1007/978-3-030-12072-6_6
Download citation
DOI: https://doi.org/10.1007/978-3-030-12072-6_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-12071-9
Online ISBN: 978-3-030-12072-6
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)