English

Counting occurrences of a pattern in a binary word

Combinatorics 2025-07-08 v1

Abstract

Enumerating the number of times one word occurs in another is a much-studied combinatorial subject. By utilizing a method that we call ``lexicographic extreme referencing'', we provide a formula for computing occurrences of one binary word in another. We then study Bn,p(k)B_{n,p}(k), the number of binary words of length nn containing a given word pp exactly kk times. For this purpose, we first use lexicographic extreme referencing to provide an algorithm for constructing all words ww that contain a given word pp. Afterward, we give a modified version of this algorithm for constructing the subset of binary words that are ``primitive'' with respect to pp, and we discuss approaches for finding Bn,p(k)B_{n,p}(k) via primitive words.

Keywords

Cite

@article{arxiv.2507.03205,
  title  = {Counting occurrences of a pattern in a binary word},
  author = {Roger Tian},
  journal= {arXiv preprint arXiv:2507.03205},
  year   = {2025}
}

Comments

12 pages

R2 v1 2026-07-01T03:46:03.997Z