English

Counting Subwords and Regular Languages

Formal Languages and Automata Theory 2018-06-22 v2

Abstract

Let xx and yy be words. We consider the languages whose words zz are those for which the numbers of occurrences of xx and yy, as subwords of zz, are the same (resp., the number of xx's is less than the number of yy's, resp., is less than or equal). We give a necessary and sufficient condition on xx and yy for these languages to be regular, and we show how to check this condition efficiently.

Keywords

Cite

@article{arxiv.1804.11175,
  title  = {Counting Subwords and Regular Languages},
  author = {Charles J. Colbourn and Ryan E. Dougherty and Thomas F. Lidbetter and Jeffrey Shallit},
  journal= {arXiv preprint arXiv:1804.11175},
  year   = {2018}
}
R2 v1 2026-06-23T01:39:59.914Z