Connected Components And Spanning Trees