Degrees for Directed Graphs
If x is a vertex in a digraph G, we can define two sets Pred(x) and Succ(x), the predecessors and successors of x respectively.
Pred(x) = {y | y e V and (y, x) e E}; the size of Pred(x) is called the in-degree of x.
Succ(x) = {y | y e V and (x,y) e E}; the size of Succ(x) is called the out-degree of x.