This paper contributes to a programme initiated by the first author: `How much information about a graph is revealed in its Potts partition function?'. We show that the $W$-polynomial distinguishes non-isomorphic weighted trees of a \emph{ good} family. The framework developed to do so also allows us to show that the $W$-polynomial distinguishes non-isomorphic caterpillars. This establishes Stanley's isomorphism conjecture for caterpillars, an extensively studied problem.
Categories: math.CO