# Locally Restricted Compositions I. Restricted Adjacent Differences

### Abstract

We study compositions of the integer $n$ in which the first part, successive differences, and the last part are constrained to lie in prescribed sets ${\cal L,D,R}$, respectively. A simple condition on ${\cal D}$ guarantees that the generating function $f(x,{\cal L,D,R})$ has only a simple pole on its circle of convergence and this at $r({\cal D})$, a function independent of ${\cal L}$ and ${\cal R}$. Thus the number of compositions is asymptotic to $Ar({\cal D})^{-n}$ for a suitable constant $A=A({\cal L,D,R})$. We prove a multivariate central and local limit theorem and apply it to various statistics of random locally restricted compositions of $n$, such as number of parts, numbers of parts of given sizes, and number of rises. The first and last parts are shown to have limiting distributions and to be asymptotically independent. If ${\cal D}$ has only finitely many positive elements ${\cal D}^+$, or finitely many negative elements ${\cal D}^-$, then the largest part and number of distinct part sizes are almost surely $\Theta((\log n)^{1/2})$. On the other hand, when both ${\cal D}^+$ and ${\cal D}^-$ have a positive asymptotic lower "local log-density", we prove that the largest part and number of distinct part sizes are almost surely $\Theta(\log n)$, and we give sufficient conditions for the largest part to be almost surely asymptotic to $\log_{1/r({\cal D})}n$.