The Tutte polynomial is an invariant of a matroid that is universal with respect to satisfying a deletion-contraction recurrence. Indeed, one way to define the Tutte polynomial of a matroid is: if $M$ is a matroid consisting of $a$ loops and $b$ coloops, then T_M(x, y) = x^ay^b, and if $e \in M$ is neither a loop nor a coloop, then T_M(x, y) := T_{M/e}(x, y) + T_{M\e}(x, y), where M\e is the deletion of M with respect to $\{e\}$, and M/e is the contraction of M with respect to $\{e\}$. Many invariants of a matroid can be determined by substituting values into its Tutte polynomial - cf. tutteEvaluate.
i1 : tuttePolynomial matroid completeGraph 4 3 3 2 2 o1 = x + y + 3x + 4x*y + 3y + 2x + 2y o1 : ZZ[x..y] |
i2 : tuttePolynomial specificMatroid "nonpappus" 6 5 4 3 3 2 2 o2 = y + 3y + 6y + x + 10y + 6x + 8x*y + 15y + 13x + 13y o2 : ZZ[x..y] |