Tree vertex splitting problem greedy method