Restricted k k -ary words and functional equations
We present an algorithm for finding a system of recurrence relations for the number of k k -ary words of length n n that satisfy a certain set of conditions. A rewriting of these relations automatically gives a system of functional equations satisfied by the multivariate generating function that counts k k -ary words by their length and the indices of the corresponding recurrence relations. We propose an approach to describing such equations. In several interesting cases the algorithm recovers and refines results on ? ? -avoiding k k -ary words and k k -ary words containing ? ? exactly once, where ? ? is either a classical, a generalized, or a distanced pattern of length three.
functional equations generating functions pattern-avoiding k k -ary words k k k k k