Restricted k-ary words and functional equations

Ghassan Firro, Toufik Mansour

Research output: Contribution to journalArticlepeer-review


We present an algorithm for finding a system of recurrence relations for the number of k-ary words of length 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-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-ary words and k-ary words containing τ exactly once, where τ is either a classical, a generalized, or a distanced pattern of length three.

Original languageEnglish
Pages (from-to)602-616
Number of pages15
JournalDiscrete Applied Mathematics
Issue number4
StatePublished - 28 Feb 2009


  • Functional equations
  • Generating functions
  • Pattern-avoiding k-ary words

ASJC Scopus subject areas

  • Discrete Mathematics and Combinatorics
  • Applied Mathematics


Dive into the research topics of 'Restricted k-ary words and functional equations'. Together they form a unique fingerprint.

Cite this