Order and degree
For any graph, directed or not, we can read off some basic properties that are of interest later in the chapter. We call the number of vertices |V| the order of the graph and the number of edges |E| its degree, sometimes also referred to as its valency. The degree of a vertex is the number of edges that have this vertex as either source or target. In the case of directed graphs and a given vertex v, we can additionally distinguish between in-degree, that is, the sum of all the edges pointing towards v, and out-degree, that is, the sum of all the edges starting at v. To give an example of this, the undirected graph in Figure 1 has order 5 and degree 6, same as the directed graph shown in Figure 2. In the latter, vertex v
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access