In recent work, Zeilberger and the author used a functional equations approach for enumerating permutations with r occurrences of the pattern 12…k. In particular, the approach yielded a polynomial-time enumeration algorithm for any fixed nonnegative r. We extend that approach to patterns of the form 12…(k-2)(k)(k-1) by deriving analogous functional equations and using them to develop similar algorithms that enumerate permutations with r occurrences of the pattern. We also generalize those techniques to handle patterns of the form 23…k1 and derive analogous functional equations and enumeration algorithms. Finally, we show how the functional equations and algorithms can be modified to track inversions as well as handle multiple patterns simultaneously. This paper is accompanied by Maple packages that implement the algorithms described.

生成讲解博客的中文版本

生成AI智能校验的中文版本