( removevertex (deg( )in contrast to the edge-list way of doing thingsthe adjacency list structure provides improved running times for the following methodsmethod incidentedges(vtakes time proportional to the number of incident vertices of vthat iso(deg( )time method areadjacent( ,vcan be performed by inspecting either the incidence collection of or that of by choosing the smaller of the twowe get (min(deg( ),deg( ))running time method removevertex(vtakes (deg( )time the adjacency matrix structure like the adjacency list structurethe adjacency matrix structure of graph also extends the edge list structure with an additional component in this casewe augment the edge list with matrix ( two-dimensional arraya that allows us to determine adjacencies between pairs of vertices in constant time in the adjacency matrix representationwe think of the vertices as being the integers in the set { , and the edges as being pairs of such integers this allows us to store references to edges in the cells of two-dimensional array specificallythe adjacency matrix representation extends the edge list structure as follows (see figure ) vertex object stores distinct integer in the range , called the index of we keep two-dimensional array such that the cell [ ,jholds reference to the edge (vw)if it existswhere is the vertex with index and is the vertex with index if there is no such edgethen [ ,jnull figure (aa graph without parallel edges(bschematic representation of the simplified adjacency matrix structure for