I was wondering, is it possible to find the number of edges in a graph when given the number of vertices and the degree of each vertex?
-
1sum up the degrees of all the vertices and divide the result by two. – hyportnex Oct 09 '14 at 23:44
3 Answers
Of course. To avoid double-counting, the closed form is this, for a graph $G = (V,E)$:
$$|E| = \frac 12 \cdot \sum_{v \in V} \mathrm{deg}(v)$$
This is a very important result, known as the Handshake Lemma.
- 17,672
- 13
- 67
- 114
If your graph has no buckles, then half of sum of all vertices degrees will give you the edge number. You have to take half of it due to every edge increases degree of $2$ vertices by $1$.
- 1,325
- 9
- 14
Imagine taking some scissors and snipping each edge. Now you have twice as many half-edges. Each vertex is now the center of a star with as many half-edges as its degree in the original graph. This allows you to relate the number of edges to the total of all the degrees. This result is sometimes called the Handshaking Lemma.
If you impose some sort of regularity (say, all vertices are of degree $d$), then you can work out the number of vertices.
- 25,273