GraphLab

Graph theory & algorithm visualizer
About Vertex degrees

GraphLab › Vertex degrees

Degree of a Vertex: In-Degree, Out-Degree and the Handshake Lemma

The degree of a vertex is the number of edges that touch it. A loop counts twice. In a directed graph, the in-degree counts edges coming in and the out-degree counts edges going out.

Handshake lemma

The degrees of all vertices add up to twice the number of edges, because every edge has two ends. So every graph has an even number of vertices with odd degree. In a directed graph, the in-degrees and the out-degrees each add up to the number of edges.

Try it in GraphLab

Each step takes one vertex and highlights its incoming and outgoing edges. The table shows in-degree, out-degree and total degree for every vertex.

More topics