III. GRAPH-THEORETIC DATA STRUCTURES
There are different ways to store graphs in a
computer system. The data structure used depends
on both the graph structure and the algorithm used
for manipulating the graph. Theoretically one can
distinguish between list and matrix structures but in
concrete applications the best structure is often a
combination of both. List structures are often
preferred for sparse graphs as they have smaller
memory requirements. Matrix structures on the
other hand provide faster access for some
applications but can consume huge amounts of
memory. [3].
A. List Structures
There are two types of list structures, which are:
1. Incidence list
The edges are represented by an array
containing pairs (tuples if directed) of vertices (that
the edge connects) and possibly weight and other
data. Vertices connected by an edge are said to be
adjacent.
2. Adjacency list
Much like the incidence list, each vertex has a
list of which vertices it is adjacent to. This causes
redundancy in an undirected graph: for example, if