there' no way to delete individual edges or verticesso if you make mistakeyou'll need to start over by clicking the new buttonwhich erases all existing vertices and edges (it warns you before it does this clicking the view button switches you to the adjacency matrix for the graph you've madeas shown in figure clicking view again switches you back to the graph figure adjacency matrix view in graphnsearches to run the depth-first search algorithmclick the dfs button repeatedly you'll be prompted to click (not double-clickthe starting vertex at the beginning of the process you can re-create the graph of figure or you can create simpler or more complex ones of your own after you play with it whileyou can predict what the algorithm will do next (unless the graph is too weirdif you use the algorithm on an unconnected graphit will find only those vertices that are connected to the starting vertex java code key to the dfs algorithm is being able to find the vertices that are unvisited and adjacent to specified vertex how do you do thisthe adjacency matrix is the key by going to the row for the specified vertex and stepping across the columnsyou can pick out the columns with the column number is the number of an adjacent vertex you can then check whether this vertex is unvisited if soyou've found what you want--the next vertex to visit if no vertices on the row are simultaneously (adjacentand also unvisitedthen there are no unvisited vertices adjacent to the specified vertex we put the code for this process in the getadjunvisitedvertex(method/returns an unvisited vertex adjacent to public int getadjunvisitedvertex(int vfor(int = <nvertsj++if(adjmat[ ][ ]== &vertexlist[jwasvisited==falsereturn /return first such vertex return - /no such vertices /end getadjunvisitedvert(