In the theory of cumulants of vector-valued random variables, the following types of formulas appear: \begin{equation} \theta^i \theta^{jk} [3] = \theta^i \theta^{jk} + \theta^j \theta^{ik} + \theta^k \theta^{ij} \end{equation} This is supposed to mean as follows: sum over all possible permutations (in this case 3) of the indices. The indices of a given theta are symmetric and need not be counted twice.
Another example would be $\theta^i \theta^j \theta^{kl}$ [6]. In this case there is a total of 6 terms:
$i\;|\;j\;|\;kl$
$i\;|\;k\;|\;jl$
$i\;|\;l\;|\;jk$
$j\;|\;k\;|\;il$
$j\;|\;l\;|\;ik$
$k\;|\;l\;|\;ij$
Going to even higher order, $\theta^{ij} \theta^{kl} \theta^{mn}$ [15] has 15 terms, and etc.
I am unaware of any closed expressions for the number of terms. Thus, I was trying to use Mathematica to numerically compute all terms involved in a given permutation.
However, so far I have been entirely unsuccessful. Any ideas?
Here are some (failed) attempts, made with 4 indices and the combination $\theta^i \theta^j \theta^{kl}$. This lists all permutations of four terms.
perm = Permutations[{a, b, c, d}]
I can use Mr. Wizard's dynP to partition in the size I want. For instance,
dynP[{a,b,c,d},{1,1,2}]
{{a},{b},{c,d}}
So, an alternative, would be to do this for all members of perm, and then eliminate duplicates according to the above-specified criteria. This, however, I failed to do.
I appreciate any help in advance.
Best regards,
Gabriel