listing continued thegraph addvertex(' ')/ thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )/ab /ac /ad /ae /bc /bd /be /cd /ce /de system out print("minimum spanning tree")thegraph mst()/minimum spanning tree system out println()/end main(/end class mstapp ///////////////////////////////////////////////////////////////the statements in main(form graph that can be visualized as five-pointed star with every node connected to every other node the output is minimum spanning treeab bc cd de topological sorting with directed graphs topological sorting is another operation that can be modeled with graphs it' useful in situations in which items or events must be arranged in specific order let' look at an example an examplecourse prerequisites in high school and collegestudents find (sometimes to their dismaythat they can' take just any course they want some courses have prerequisites--other courses that must be taken first indeedtaking certain courses may be prerequisite to obtaining degree in certain field figure shows somewhat fanciful arrangement of courses necessary for graduating with degree in mathematics