Node vs. Edge Orientation
Chapters > Algorithm
As we have seen in chapter Graphs, there are two possible representations of a graph, node or edge-oriented. There are no principle differences between them.
The conceptual difference between the two representations is huge, though. Let us elicit it using the same snippet of a computer program as before.
On the left, we see the node-oriented, and on the right the edge-oriented control-flow of the snippet, where individual statement(s) are connected to statement(s) which can be executed after them.
The picture on the right is an algorithmic view of the same control-flow. A relation there must be interpreted as "The decision in condition C1 is based on the result of statement S1, which can be followed either by S5, or another condition C2".
Node orientation is an instance of edge orientation, where relations are related to each other. In the first picture we see the control-flow of a program, in the second the control-flow of all programs using the same control-flow.
Both representations are old techniques. For example, Euler (1707-1783) used the edge-oriented version to discuss the solution of the problem "Seven Bridges of Königsberg".
The two representations complement each other. CPM (Critical Path Method) and PERT (Program Evaluation and Review Technique) are using this alternate representations. CPM is used to analyze duration, and dependencies among tasks of a project, while PERT is used to schedule them.
We will use the edge-oriented representation during the rest of our discussions.