# Product of elements of a set

Let $f=x+y+xz+yw$ where $x,y,z,w$ are variables. Let $S=\{\mbox{ monomials of }f^{20}\}$. How can I calculate the product of elements of $S$ and cardinality of $S$?

-

First note that all the monomials in the expansion

$$f^{20}=\sum_{n_x+n_y+n_z+n_w=20}\binom{20}{n_x,n_y,n_z,n_w}x^{n_x}y^{n_y}(xz)^{n_z}(yw)^{n_w}$$

are distinct. Thus there are as many of them as partitions of $20$ into four parts with zeros allowed. Of these there are $\binom{20+4-1}{4-1}=\binom{23}3=1771$.

As for the product, by symmetry each of the terms will occur the same number of times as a factor, so we only have to count how many times one term, say $x$, occurs. There are

$$\binom{20-n_x+3-1}{3-1}=\binom{22-n_x}2=\frac{(22-n_x)(21-n_x)}2$$

different monomials with $n_x$ factors of $x$, so the total number of factors of each term in the product is

$$\sum_{n_x=0}^{20}\frac{(22-n_x)(21-n_x)}2n_x=8855\;.$$

Thus the product is

$$x^{8855}y^{8855}(xz)^{8855}(yw)^{8855}=x^{17710}y^{17710}z^{8855}w^{8855}\;.$$

-
Thanks for the help. – user12290 Aug 21 '11 at 9:16