Definition Degree Let G=(V,E) be a graph and v∈V a vertex. Undirected graph The degree of v is the number of edge-ends at v: degG(v)=e∈E∑me(v), where me(v) is the number of times v occurs as an endpoint of e. Thus, a loop at v contributes two. Directed graph The in-degree and out-degree of v count the edges entering and leaving it: degG−(v)=∣{(u,v)∈E:u∈V}∣,degG+(v)=∣{(v,w)∈E:w∈V}∣.