edgesas shown in figure this is perhaps the first example of graph being used to represent problem in the real world amap vertex edge bgraph figure the bridges of konigsberg representing graph in program it' all very well to think about graphs in the abstractas euler and other mathematicians did until the invention of the computerbut we want to represent graphs by using computer what sort of software structures are appropriate to model graphwe'll look at vertices first and then at edges vertices in very abstract graph program you could simply number the vertices to - (where is the number of verticesyou wouldn' need any sort of variable to hold the vertices because their usefulness would result from their relationships with other vertices in most situationshowevera vertex represents some real-world objectand the object must be described using data items if vertex represents city in an airline route simulationfor exampleit may need to store the name of the cityits altitudeits locationand other such information thusit' usually convenient to represent vertex by an object of vertex class our example programs store only letter (like )used as label for identifying the vertexand flag for use in search algorithmsas we'll see later here' how the vertex class looks