This is from a practice test I'm working on...not sure how to answer this one:
Consider the three data structures for storing edges (adjacency matrix, adjacency list, edge list) in a graph. What type of application is each data structure best suited for?
Correct me if I'm wrong but to my knowledge an adjacency matrix is the least efficient way to represent a graph because there are elements in the two-dimensional array that represent non-existant edges where as the other two data structures only contain elements that represent existant edges so traversal for any operation is slower. If this is true then why would anyone want to use it?
And as for an adjacency list, it is more efficient than an adjacency matrix, but still contains redundant information --> If an edge joins vertices i and j then a vertex node containing vertex i appears in the adjacency list for vertex j and at the same time the vertex node containing vertex j appears in the adjacency list for vertex i.
And...the edge list is the most efficient.
So reiterating my question.... If an edge list is the most efficient representation, why would you ever want to use one of the other two instead?
Any help would be appreciated, thanks.