## Abstract

A level (L) is an occurrence of two consecutive equal entries in a word w = w_{1}w_{2} . . . , while a rise (R) or descent (D) occurs when the right or left entry, respectively, is strictly larger. If u = u_{1}u_{2} . . . un and v = v_{1}v_{2} . . . v_{n} are k-ary words of the same given length and 1 ≤ i ≤ n-1, then there is, for example, an occurrence of LR at index i if u_{i} = u_{i+1} and v_{i} < v_{i+1}, and, likewise, for the other possibilities. Similar terminology may be used when discussing ordered d-tuples of k-ary words of length n (the set of which we'll often denote by [k]^{nd}). In this paper, we consider the problem of enumerating the members of [k]^{nd} according to the number of occurrences of the pattern ρ, where d ≥ 1 and ρ is any word of length d in the alphabet {L,R,D}. In particular, we find an explicit formula for the generating function counting the members of [k]^{nd} according to the number of occurrences of the patterns ρ = L_{i}R^{d-i}, 0 < i < d, which, by symmetry, is seen to solve the aforementioned problem in its entirety. We also provide simple formulas for the average number of occurrences of ρ within all of the members of [k]^{nd}, providing both algebraic and combinatorial proofs. Finally, in the case d = 2, we solve the problem above where we also allow for weak rises (which we'll denote by R_{w}), i.e., indices i such that w_{i} ≤ w_{i+1} in w. Enumerating the cases R_{w}R_{w} and RR_{w} seems to be more difficult, and to do so, we combine the kernel method with the simultaneous use of several recurrences.

Original language | English |
---|---|

Article number | 62 |

Journal | Online Journal of Analytic Combinatorics |

Volume | 9 |

State | Published - 2014 |

## Keywords

- Descent
- Generating function
- K-ary word
- Level
- Rise

## ASJC Scopus subject areas

- Discrete Mathematics and Combinatorics