Write and . With two identical degree- vertices, let lines join them. The remaining half-edges on each vertex form self-loops. Both and are even. The number of Wick contractions issince one chooses and matches the joining half-edges and then pairs the rest independently. Dividing by the expansion denominator gives every symmetry factor weight without guessing graph multiplicities.
For two quartic vertices, givesThe graphs are respectively the product of two first-order two-loop graphs; two vertices joined by two lines with one self-loop on each; and two vertices joined by four lines with no self-loops.
For two sextic vertices, givesThe corresponding numbers of self-loops on each vertex are . All seven second-order graphs are drawn in solution; in each series the graph is disconnected and the others are connected.
For completeness, a mixed quartic-sextic pair, not needed for the two pure second-order coefficients, contributesTaking removes the products of first-order graphs, that is, the terms. The requested partition function retains them.