## Abstract

Define τ(π) to be the number of subsequences of π that are order-isomorphic to τ. Let τ be a pattern of length three with at most two distinct letters, namely,

τ ∈ {111, 112, 121, 122, 211, 212, 221}.

In this paper, we give an algorithm for finding the generating function

wτ;r(n; y) =X

k≥1

X

π∈[k]n,τ(π)=r

y

k

for the number of k-ary words of length n that contain exactly r occurrences of the pattern τ, for given r ≥ 0. In particular, we obtain explicit formulas for the generating functions wτ;r(n; y), where r = 0, 1.

τ ∈ {111, 112, 121, 122, 211, 212, 221}.

In this paper, we give an algorithm for finding the generating function

wτ;r(n; y) =X

k≥1

X

π∈[k]n,τ(π)=r

y

k

for the number of k-ary words of length n that contain exactly r occurrences of the pattern τ, for given r ≥ 0. In particular, we obtain explicit formulas for the generating functions wτ;r(n; y), where r = 0, 1.

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

Pages (from-to) | 183–201 |

Journal | Journal of Automata, Languages and Combinatorics |

Volume | 21 |

Issue number | 3 |

State | Published - 31 Dec 2016 |