//end class graph within the graph classvertices are identified by their index number in vertexlist we've already discussed most of the methods shown here to display vertexwe simply print out its one-character label the adjacency matrix (or the adjacency listprovides information that is local to given vertex specificallyit tells you which vertices are connected by single edge to given vertex to answer more global questions about the arrangement of the verticeswe must resort to various algorithms we'll begin with searches searches one of the most fundamental operations to perform on graph is finding which vertices can be reached from specified vertex for exampleimagine trying to find out how many towns in the united states can be reached by passenger train from kansas city (assuming that you don' mind changing trainssome towns could be reached others couldn' be reached because they didn' have passenger rail service possibly others couldn' be reachedeven though they had rail servicebecause their rail system (the narrow-gauge hayfork-hicksville rrfor exampledidn' connect with the standardgauge line you started on or any of the lines that could be reached from your line here' another situation in which you might need to find all the vertices reachable from specified vertex imagine that you're designing printed circuit boardlike the ones inside your computer (open it up and take look!various components--mostly integrated circuits (ics)--are placed on the boardwith pins from the ics protruding through holes in the board the ics are soldered in placeand their pins are electrically connected to other pins by traces--thin metal lines applied to the surface of the circuit boardas shown in figure (noyou don' need to worry about the details of this figure figure ins and traces on circuit boardsearches in grapheach pin might be represented by vertexand each trace by an edge on circuit board there are many electrical circuits that aren' connected to each otherso the graph is by no means connected one during the design processthereforeit may be genuinely useful to create graph and use it to find which pins are connected to the same electrical circuit assume that you've created such graph now you need an algorithm that provides systematic way to start at specified vertexand then move along edges to other verticesin such way that when it' done you are guaranteed that it has visited every