Table of Contents
Fetching ...

Counting k-ary words by number of adjacency differences of a prescribed size

Sela Fried, Toufik Mansour, Mark Shattuck

TL;DR

This work extends the permutation-adjacency problem of Spahn and Zeilberger to the realm of k-ary words, delivering explicit generating functions that count adjacencies of the form $a(a+s)$ and, in the absolute-difference variant, $a(a\pm s)$. It leverages linear algebra (Cramer's rule and LU decompositions), determinant identities, and Chebyshev polynomials to obtain closed forms for generating functions, recurrences, and special-case counts, while also connecting to restricted growth representations of set partitions and to OEIS sequences. The paper furnishes both algebraic formulas and combinatorial proofs, and delivers exact results for small parameters, including Fibonacci- and Bell-number related counts, with extensions to partitions via restricted-growth encodings and to color-composition interpretations. The results provide a rich toolkit for enumerating adjacency patterns in k-ary words and partitions, with potential applications in combinatorial enumeration, pattern-avoidance, and sequence analysis. The work also highlights deep connections between adjacency statistics and classical polynomials and number sequences, suggesting further avenues for bijective and generating-function approaches in related combinatorial structures.

Abstract

Recently, the general problem of enumerating permutations $π=π_1\cdots π_n$ such that $π_{i+r}-π_i \neq s$ for all $1\leq i\leq n-r$, where $r$ and $s$ are fixed, was considered by Spahn and Zeilberger. In this paper, we consider an analogous problem on $k$-ary words involving the distribution of the corresponding statistic. Note that for $k$-ary words, it suffices to consider only the $r=1$ case of the aforementioned problem on permutations. Here, we compute for arbitrary $s$ an explicit formula for the ordinary generating function for $n \geq 0$ of the distribution of the statistic on $k$-ary words $ρ=ρ_1\cdotsρ_n$ recording the number of indices $i$ such that $ρ_{i+1}-ρ_i=s$. This result may then be used to find a comparable formula for finite set partitions with a fixed number of blocks, represented sequentially as restricted growth functions. Further, several sequences from the OEIS arise as enumerators of certain classes of $k$-ary words avoiding adjacencies with a prescribed difference. The comparable problem where one tracks indices $i$ such that the absolute difference $|a_{i+1}-a_i|$ is a fixed number is also considered on $k$-ary words and the corresponding generating function may be expressed in terms of Chebyshev polynomials. Finally, combinatorial proofs are found for several related recurrences and formulas for the total number of adjacencies of the form $a(a+s)$ on the various structures.

Counting k-ary words by number of adjacency differences of a prescribed size

TL;DR

This work extends the permutation-adjacency problem of Spahn and Zeilberger to the realm of k-ary words, delivering explicit generating functions that count adjacencies of the form and, in the absolute-difference variant, . It leverages linear algebra (Cramer's rule and LU decompositions), determinant identities, and Chebyshev polynomials to obtain closed forms for generating functions, recurrences, and special-case counts, while also connecting to restricted growth representations of set partitions and to OEIS sequences. The paper furnishes both algebraic formulas and combinatorial proofs, and delivers exact results for small parameters, including Fibonacci- and Bell-number related counts, with extensions to partitions via restricted-growth encodings and to color-composition interpretations. The results provide a rich toolkit for enumerating adjacency patterns in k-ary words and partitions, with potential applications in combinatorial enumeration, pattern-avoidance, and sequence analysis. The work also highlights deep connections between adjacency statistics and classical polynomials and number sequences, suggesting further avenues for bijective and generating-function approaches in related combinatorial structures.

Abstract

Recently, the general problem of enumerating permutations such that for all , where and are fixed, was considered by Spahn and Zeilberger. In this paper, we consider an analogous problem on -ary words involving the distribution of the corresponding statistic. Note that for -ary words, it suffices to consider only the case of the aforementioned problem on permutations. Here, we compute for arbitrary an explicit formula for the ordinary generating function for of the distribution of the statistic on -ary words recording the number of indices such that . This result may then be used to find a comparable formula for finite set partitions with a fixed number of blocks, represented sequentially as restricted growth functions. Further, several sequences from the OEIS arise as enumerators of certain classes of -ary words avoiding adjacencies with a prescribed difference. The comparable problem where one tracks indices such that the absolute difference is a fixed number is also considered on -ary words and the corresponding generating function may be expressed in terms of Chebyshev polynomials. Finally, combinatorial proofs are found for several related recurrences and formulas for the total number of adjacencies of the form on the various structures.

Paper Structure

This paper contains 9 sections, 15 theorems, 106 equations.

Key Result

Lemma 2.1

Let $k$ and $s$ be fixed positive integers, with $k \geq s+1$. If $n \geq 2$, then with $a_{1,i}=1$ for $1 \leq i \leq k$.

Theorems & Definitions (26)

  • Lemma 2.1
  • proof
  • Lemma 2.2
  • proof
  • Theorem 2.3
  • proof
  • Corollary 2.4
  • Corollary 2.5
  • Corollary 3.1
  • Proposition 3.2
  • ...and 16 more