Graph theory · Definition
Degree of a vertex
Before you start you need to know
It measures how connected a vertex is, and it is the first number attached to a graph.
Definition
The degree \(\deg(v)\) of a vertex \(v\) is the number of edges of the graph (the set \(E\)) that have it as an endpoint.
To compute the degree it is enough to count the edge endpoints falling on the vertex. In a simple graph the degree of \(v\) equals its number of neighbours, and it always satisfies \(0\le \deg(v)\le n-1\) when the graph has \(n\) vertices. A vertex of degree \(0\) is isolated and one of degree \(1\) is called a leaf.
The basic result is the handshaking lemma: the sum of all degrees is \(\sum_{v\in V}\deg(v)=2|E|\), because each edge contributes one unit to each of its two endpoints. It follows that the number of odd-degree vertices is always even.
The lemma works as a filter: a list of numbers can be the degree list of a simple graph only if its sum is even and no degree exceeds \(n-1\). This test is necessary but not sufficient; for instance \(3,3,3,1\) passes both checks and yet matches no simple graph, since three vertices of degree \(3\) reach the fourth.
A common mistake is counting edges instead of endpoints: in a simple graph there is no difference, but in multigraphs a loop counts twice. Degree is the basis for regular graphs (all vertices with the same degree), such as \(K_n\), and for the Eulerian paths studied later.
Think about it
In a graph with 10 vertices each has degree 3 or 4. Can exactly 5 vertices have degree 3?
No: the sum would be 5·3+5·4 = 35, odd. The number of odd-degree vertices must be even, so 5 is impossible.
Exercises 10
- A graph has vertices \(1,2,3,4\) and edges \(\{1,2\},\{1,3\},\{1,4\},\{2,3\}\). What is \(\deg(1)\)?
- A graph has edges \(ab, ac, ad, bc, de\). What is the degree of vertex \(c\)?
- A graph has 7 edges. What is the sum of the degrees of all its vertices?
- A graph has five vertices of degrees 3, 3, 2, 2 and 2. How many edges does it have?
- Which of these lists can be the degree list of a simple graph?
- What is the degree of each vertex of the complete graph \(K_6\)?
- A graph has 7 vertices. Which of these numbers can NOT be the number of vertices of odd degree?
- A graph has 12 edges and every vertex has degree 3. How many vertices does it have?
- A simple graph has 6 vertices and one of them is isolated. What is the largest degree another vertex can have?
- Is there a simple graph with 5 vertices in which every vertex has degree 3?
What comes next
References
- Kenneth H. Rosen, Discrete Mathematics and Its Applications, 8th edition, McGraw-Hill, 2019. §10.2
- Susanna S. Epp, Discrete Mathematics with Applications, 5th edition, Cengage, 2019. §10.2
- Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied Introduction, 5th edition, Pearson, 2003. §11.1