graph representation you can represent graph in many ways the two most common ways of representing graph is as followsadjacency matrix an adjacency matrix is vxv binary matrix element ai, is if there is an edge from vertex to vertex else ai,jis notea binary matrix is matrix in which the cells can have only one of two possible values either or the adjacency matrix can also be modified for the weighted graph in which instead of storing or in ai,jthe weight or cost of the edge will be stored in an undirected graphif ai, then aj, in directed graphif ai, then aj, may or may not be adjacency matrix provides constant time access ( ( to determine if there is an edge between two nodes space complexity of the adjacency matrix is ( the adjacency matrix of the following graph isi/ : : : : the adjacency matrix of the following graph isi/ : : : :