First page Back Continue Last page Graphics
Multidimensional Array based
Adjacency matrix:
- Advantages:
- Easy to maintain.
- Determination if an edge exists between two vertices is simple and efficient.
- Disadvantages:
- Might be difficult to avoid representing absent nodes
- 0 might be a valid edge and infinity is not valid
- Consume a lot of space. Especially for disconnected/non-complete or sparse graphs.
- Might not be possible due to number of Nodes. Memory consumed is proportional to the square of the number of nodes. 100,000 nodes would require more memory than a 32-bit addressable machine could provide.