vertices represent the classes defined in the programand whose edges indicate inheritance between classes there is an edge from vertex to vertex if the class for extends the class for such edges are directed because the inheritance relation only goes in one direction (that isit is asymmetricif all the edges in graph are undirectedthen we say the graph is an undirected graph likewisea directed graphalso called digraphis graph whose edges are all directed graph that has both directed and undirected edges is often called mixed graph note that an undirected or mixed graph can be converted into directed graph by replacing every undirected edge (uvby the pair of directed edges ( ,vand ( ,uit is often usefulhoweverto keep undirected and mixed graphs represented as they arefor such graphs have several applicationssuch as that of the following example example city map can be modeled by graph whose vertices are intersections or dead-endsand whose edges are stretches of streets without intersections this graph has both undirected edgeswhich correspond to stretches of twoway streetsand directed edgeswhich correspond to stretches of one-way streets thusin this waya graph modeling city map is mixed graph example physical examples of graphs are present in the electrical wiring and plumbing networks of building such networks can be modeled as graphswhere each connectorfixtureor outlet is viewed as vertexand each uninterrupted stretch of wire or pipe is viewed as an edge such graphs are actually components of much larger graphsnamely the local power and water distribution networks depending on the specific aspects of these graphs that we are interested inwe may consider their edges as undirected or directedforin principlewater can flow in pipe and current can flow in wire in either direction