Emericdeutsch2010-04-08 17:34:51

Here is my own answer to my question. It may be too cumbersome, but it works.

for i from 1 to nops(x) do if x[i]>1 then ct:=ct+1 else fi od: ct;

end: for j from 1 to nops(pa) do p[1][j]:=pa[j] od:

Q[1]:=[seq(p[1][j],j=1..nops(pa))]: for i from 2 to pa[1] do for j

from 1 to F(Q[i-1]) do p[i][j]:=Q[i-1][j]-1 od:

Q[i]:=[seq(p[i][j],j=1..F(Q[i-1]))] od: for i from 1 to pa[1] do

col[i]:=[seq(Q[i][j]+nops(Q[i])-j,j=1..nops(Q[i]))] od: a:=proc(i,j)

if i<=nops(Q[j]) and j<=pa[1] then Q[j][i]+nops(Q[j])-i else 1 fi end:
A:=matrix(nops(pa),pa[1],a): product(product(A[m,n],n=1..pa[1]),m=1..nops(pa)); end: # examples:
5

## Leave a Reply

You must be logged in to post a comment.