I need to find all possible contractions (in the sense of Wick contractions) for 5 fields. One can of course start drawing randomly, but I'm sure there is some kind of algorithm to do this systematically... So, does this algorithm have a name, and is there software that can do this for me?
Also, is there an analytic expression to give me the number of possible contractions $C$, given a number of fields $n$? This question suggests that the formula should take the form $C(n)=n!!$ or something similar, but unfortunately I wasn't able to find a reference for this statement and it seems to already fail for $n=4$, i.e. $C(4)=4!!=8\neq 10$. This would at least provide a good orientation if one is finished with the calculation or not...