  We define a bivariate polynomial for unlabeled rooted trees and show that the
polynomial of an unlabeled rooted tree $T$ is the generating function of a
class of subtrees of $T$. We prove that the polynomial is a complete
isomorphism invariant for unlabeled rooted trees. Then, we generalize the
polynomial to unlabeled unrooted trees and we show that the generalized
polynomial is a complete isomorphism invariant for unlabeled unrooted trees.
