read `DyckClever.txt`: with(combinat): N:=5: S:=powerset({seq(i,i=1..N)}): print(` Given sets A and B of positive integersWe are interested in counting the number of Dyck paths `): print(`whose peak-heights are never in A and valley-heights are never in B`): print(``): print(`Below we give the quadratic equations satisfied by the generating function, as well as the expression in terms`): print(`C=(1-sqrt(1-4*x))/(2*x), the generating function for the Catalan mumbers for all sets A and B that are subsets of`): print(``): print({seq(i,i=1..N)}): for A in S do for B in S do print(``): print(`----------------------------`): print(``): print(`(A,B)= `, (A,B)): print(``): print(fAB(A,B,x,P)=0 ): print(``): print(P= fABcat(A,B,x,C) ): print(``): od: od: print(``): print(`-------------------------`): print(``): print(`This took`, time(), `second. `): print(``): quit: