Using Noonan-Zeilberger Functional Equations to enumerate (in Polynomial Time!) Generalized Wilf classes

By Brian Nakamura and Doron Zeilberger


.pdf   .ps   .tex  
[Appeared in Advances in Applied Mathematics v. 50(2013), 356-366]
First Written: Sept. 7, 2012.

Last Update of both webpage and article: Oct. 9, 2012 [Thanks to Manuel Kauers, and an anonymous referee]

Previous update of this webpage (but not article): Sept. 28, 2012 [Thanks to Manuel Kauers]


One of the most challenging problems in enumerative combinatorics is to count Wilf classes, where you are given a pattern, or set of patterns, and you are asked to find a "formula", or at least an efficient algorithm, that inputs a positive integer n and outputs the number of permutations avoiding that pattern. Of course if the pattern is 12 then the answer is 1 (there is just one permutation avoiding the pattern 12, namely [n,n-1, ..., 1]). When the pattern is 123 the answer is famously the Catalan numbers (2n)!/(n!(n+1)!).

In a seminal article, John Noonan and Doron Zeilberger initiated the counting of permutations that have a prescribed, r, say, occurrences of a given pattern. When r=0 we are back to classical Wilf classes. They gave an ingenious method to generate Functional Equations, alas, with an unbounded number of "catalytic variables", but then described a clever way, using multivariable calculus, how to get enumeration schemes. However, this method soon gets unwieldy, even for a computer, and in the present article we present an alternative, much easier to implement, and more efficient way, for getting the answer in Herb Wilf's sense, i.e. devising a "polynomial time algorithm" for computing the enumerating sequences for any r, and for many (but, of course, not all) patterns.


Maple Packages

Important: This article is accompanied by Maple packages

Sample Input and Output for the Maple package P123


Sample Input and Output for the Maple package P1234


Sample Input and Output for the Maple package F1234


Sample Input and Output for the Maple package P12345


Sample Input and Output for the Maple package F12345


Sample Input and Output for the Maple package P123456


Doron Zeilberger's List of Papers

Doron Zeilberger's Home Page