Advertisement

State Complexity of Single-Word Pattern Matching in Regular Languages

  • Janusz A. Brzozowski
  • Sylvie DaviesEmail author
  • Abhishek Madan
Conference paper
  • 148 Downloads
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11612)

Abstract

The state complexity \(\kappa (L)\) of a regular language L is the number of states in the minimal deterministic finite automaton recognizing L. In a general pattern-matching problem one has a set T of texts and a set P of patterns; both T and P are sets of words over a finite alphabet \(\varSigma \). The matching problem is to determine whether any of the patterns appear in any of the texts, as prefixes, or suffixes, or factors, or subsequences. In previous work we examined the state complexity of these problems when both T and P are regular languages, that is, we computed the state complexity of the languages Open image in new window , Open image in new window , Open image in new window , and Open image in new window , where Open image in new window is the shuffle operation. It turns out that the state complexities of these languages match the naïve upper bounds derived by composing the state complexities of the basic operations used in each expression. However, when P is a single word w, and \(\varSigma \) has two or more letters, the bounds are drastically reduced to the following: Open image in new window ; Open image in new window ; Open image in new window ; and Open image in new window . The bounds for factor and subsequence matching are the same as the naïve bounds, but this is not the case for prefix and suffix matching. For unary languages, we have a tight upper bound of \(m+n-2\) in all four cases.

Keywords

All-sided ideal Combined operation Factor Finite automaton Left ideal Pattern matching Prefix Regular language Right ideal State complexity Subsequence Suffix Two-sided ideal 

References

  1. 1.
    Brzozowski, J.A., Davies, S., Madan, A.: State complexity of pattern matching in regular languages. Theoret. Comput. Sci. (2018).  https://doi.org/10.1016/j.tcs.2018.12.014
  2. 2.
    Brzozowski, J.A., Davies, S., Madan, A.: State complexity of pattern matching in regular languages. CoRR abs/1806.04645 (2018). http://arxiv.org/abs/1806.04645
  3. 3.
    Brzozowski, J.A., Jirásková, G., Li, B.: Quotient complexity of ideal languages. Theoret. Comput. Sci. 470, 36–52 (2013).  https://doi.org/10.1016/j.tcs.2012.10.055MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Crochemore, M., Hancart, C.: Automata for matching patterns. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 399–462. Springer, Heidelberg (1997).  https://doi.org/10.1007/978-3-662-07675-0_9CrossRefGoogle Scholar
  5. 5.
    Elloumi, M., Iliopoulos, C., Wang, J.T., Zomaya, A.Y.: Pattern Recognition in Computational Molecular Biology: Techniques and Approaches. Wiley, Hoboken (2015)CrossRefGoogle Scholar
  6. 6.
    Fu, Q., Lou, J.G., Wang, Y., Li, J.: Execution anomaly detection in distributed systems through unstructured log analysis. In: Wang, W., Kargupta, H., Ranka, S., Yu, P.S., Wu, X. (eds.) Proceedings 9th IEEE International Conference on Data Mining, ICDM 2009, pp. 149–158. IEEE Computer Society (2009).  https://doi.org/10.1109/ICDM.2009.60
  7. 7.
    Gao, Y., Moreira, N., Reis, R., Yu, S.: A survey on operational state complexity. J. Autom. Lang. Comb. 21(4), 251–310 (2016)MathSciNetzbMATHGoogle Scholar
  8. 8.
    Maslov, A.N.: Estimates of the number of states of finite automata. Soviet Math. Doklady 11, 1373–1375 (1970)zbMATHGoogle Scholar
  9. 9.
    Yu, S., Zhuang, Q., Salomaa, K.: The state complexities of some basic operations on regular languages. Theoret. Comput. Sci. 125, 315–328 (1994).  https://doi.org/10.1016/0304-3975(92)00011-FMathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2019

Authors and Affiliations

  • Janusz A. Brzozowski
    • 1
  • Sylvie Davies
    • 2
    Email author
  • Abhishek Madan
    • 1
  1. 1.David R. Cheriton School of Computer ScienceUniversity of WaterlooWaterlooCanada
  2. 2.Department of Pure MathematicsUniversity of WaterlooWaterlooCanada

Personalised recommendations