Counting alternating permutations with restricted prefix and suffix
In this paper, we use Hasse diagrams and generating functions to count alternating permutations with restricted prefix and suffix of lengths 3 and 4. In other words, for an alternating permutation $\sigma=\sigma_1\sigma_2\sigma_3\cdots\sigma_{n}\in S_{n}$, we restrict length-3 prefixes $\sigma_1\sigma_2\sigma_3$ to follow certain patterns, such as $231$ and $132$, or follow certain restrictions such as $\sigma_2 \geq \max\{\sigma_1,\sigma_3\}+2$, similarly for prefixes of length 4. We also study the enumeration of alternating permutations with restrictions on both prefix and suffix.