An alternative representation uses just the collection of arcs in the graph. It is convenient to subdivide these into classes of arcs originating from given nodes, and at this point we fix specifically on directed graphs.
Let us agree on some terminology. Consider the arc:
We can now organise the arcs in a directed graph by listing, for each node in turn, the nodes which are adjacent to it. For the graph in Figure 12.2, this gives
Note the empty list for![]()
![]()
![]()
![]()
![]()
![]()
Note in passing that the dual representation
where we list the nodes to which a given node is adjacent, would serve equally well. But it is more usual and more intuitive, especially when considering shortest path algorithms, to think in a ``forwards'' direction. For some purposes, however, it may be convenient to make simultaneous use of both representations.![]()
![]()
![]()
![]()
![]()
![]()