paper

Counting occurrences of a pattern in a binary word

arXiv:2507.03205

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 , the number of binary words of length containing a given word exactly times. For this purpose, we first use lexicographic extreme referencing to provide an algorithm for constructing all words that contain a given word . Afterward, we give a modified version of this algorithm for constructing the subset of binary words that are ``primitive'' with respect to , and we discuss approaches for finding via primitive words.

12 pages

Counting occurrences of a pattern in a binary word · wovepaper