1

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?

3 Answers3

0

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.

Newb
  • 17,672
  • 13
  • 67
  • 114
0

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$.

Andrei Rykhalski
  • 1,325
  • 9
  • 14
0

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.

Sammy Black
  • 25,273