State Complexity of Prefix Distance

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9223)


The prefix distance between strings x and y is the number of symbol occurrences in the strings that do not belong to the longest common prefix of x and y. The suffix and the substring distance are defined analogously in terms of the longest common suffix and longest common substring, respectively, of two strings. We show that the set of strings within prefix distance k from an n state DFA (deterministic finite automaton) language can be recognized by a DFA with \((k+1) \cdot n - \frac{k(k+1)}{2}\) states and this number of states is needed in the worst case. Also we give tight bounds for the nondeterministic state complexity of the set of strings within prefix, suffix or substring distance k from a regular language.


State Complexity Regular Language Finite Automaton Tight Bound Substring Distance 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Apostolico, A.: Maximal words in sequence comparisons based on subword composition. In: Elomaa, T., Mannila, H., Orponen, P. (eds.) Ukkonen Festschrift 2010. LNCS, vol. 6060, pp. 34–44. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  2. 2.
    Birget, J.C.: Intersection and union of regular languages and state complexity. Inf. Process. Lett. 43, 185–190 (1992)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Calude, C.S., Salomaa, K., Yu, S.: Additive distances and quasi-distances between words. J. Univ. Comput. Sci. 8(2), 141–152 (2002)MathSciNetMATHGoogle Scholar
  4. 4.
    Choffrut, C., Pighizzini, G.: Distances between languages and reflexivity of relations. Theor. Comput. Sci. 286(1), 117–138 (2002)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Deza, M.M., Deza, E.: Encyclopedia of Distances. Springer, Berlin Heidelberg (2009) CrossRefMATHGoogle Scholar
  6. 6.
    Gao, Y., Moreira, N., Reis, R., Yu, S.: A review on state complexity of individual operations. Faculdade de Ciencias, Universidade do Porto, Technical report DCC-2011-8 to appear in Computer Science Review
  7. 7.
    Holzer, M., Kutrib, M.: Descriptional and computational complexity of finite automata – a survey. Inf. Comput. 209, 456–470 (2011)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Kari, L., Konstantinidis, S.: Descriptional complexity of error/edit systems. J. Automata Lang. Comb. 9, 293–309 (2004)MathSciNetMATHGoogle Scholar
  9. 9.
    Kari, L., Konstantinidis, S., Kopecki, S., Yang, M.: An efficient algorithm for computing the edit distance of a regular language via input-altering transducers. CoRR abs/1406.1041 (2014)Google Scholar
  10. 10.
    Konstantinidis, S.: Computing the edit distance of a regular language. Inf. Comput. 205, 1307–1316 (2007)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Kutrib, M., Meckel, K., Wendlandt, M.: Parameterized prefix distance between regular languages. In: Geffert, V., Preneel, B., Rovan, B., Štuller, J., Tjoa, A.M. (eds.) SOFSEM 2014. LNCS, vol. 8327, pp. 419–430. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  12. 12.
    Kutrib, M., Pighizzini, G.: Recent trends in descriptional complexity of formal languages. Bull. EATCS 111, 70–86 (2013)MathSciNetGoogle Scholar
  13. 13.
    Lothaire, M.: Applied Combinatorics on Words, Ch. 1 Algorithms on Words. Encyclopedia of Mathematics and It’s Applications 105. Cambridge University Press, New York (2005) Google Scholar
  14. 14.
    Ng, T., Rappaport, D., Salomaa, K.: Quasi-distances and weighted finite automata. In: Shallit, J., Okhotin, A. (eds.) DCFS 2015. LNCS, vol. 9118, pp. 209–219. Springer, Heidelberg (2015) CrossRefGoogle Scholar
  15. 15.
    Povarov, G.: Descriptive complexity of the hamming neighborhood of a regular language. In: Language and Automata Theory and Applications, pp. 509–520 (2007)Google Scholar
  16. 16.
    Salomaa, K., Schofield, P.: State complexity of additive weighted finite automata. Int. J. Found. Comput. Sci. 18(06), 1407–1416 (2007)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Shallit, J.: A Second Course in Formal Languages and Automata Theory. Cambridge University Press, Cambridge (2009)MATHGoogle Scholar
  18. 18.
    Yu, S.: Regular languages. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 41–110. Springer-Verlag, Berlin (1997)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.School of ComputingQueen’s UniversityKingstonCanada

Personalised recommendations