Enumeration of words by the sum of differences between adjacent letters
We consider the sum u of differences between adjacent letters of a word of n letters, chosen uniformly at random from a given alphabet. This paper obtains the enumerating generating function for the number of such words with respect to the sum u, as well as explicit formulas for the mean and variance of u.
generating functions k-ary words statistics kernel method chebyshev polynomials