Given a graph $G$ with $n$ nodes, is there an algorithm to find $m$ subtrees, each with $\lfloor n/m\rfloor$ or $\lceil n/m\rceil$ nodes, such that every node of $G$ is in exactly one tree?
Other than brute forcing the problem, it there an algorithm that can create the partitions of a graph that satisfy these conditions?
Furthermore, is there a way to enumerate all such possible partitions that lead to a set of subtrees?
Note I am not looking to prove existence. I actually want to use such an algorithm, so I am really looking for its description.