spanning tree algorithms 5020917