Pants decomposition graph (source code)

= Pants decomposition graph
{title2=$V=2g-2,\ E=3g-3$}

The graph of a <pants decomposition> has one vertex per <pair of pants (mathematics)> and one edge per glued cuff. It is a connected trivalent multigraph, possibly with loops. A closed surface of genus $g$ gives $2g-2$ vertices and $3g-3$ edges, so its first <Betti number> is $g$. The graph records a decomposition rather than the homeomorphism class alone, and omits cuff lengths and twists.