update graph travesal
add minimum spanning tree