read `DyckClever.txt`: with(combinat): N:=5: M:=1000: 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 , as well as the linear recurrence`): print(`satisfied by the sequence and the value of`, a(M) ): print(`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(``): lprint(InfoAB(A,B,x,P,C,a,n,M)); print(``): od: od: print(``): print(`-------------------------`): print(``): print(`This took`, time(), `second. `): print(``): quit: