Twenty switches in an office computer network are to be connected so that each switch has a direct connection to exactly three other switches. How many connections will be necessary?
I notice that this problem is about graphs, where the switches are the vertices and the connections are the edges. I recall that the degree of a vertex is the number of edges incident to it, and that the sum of the degrees of all the vertices in a graph is equal to twice the number of edges. This means that if I have 20 switches, each with degree 3, then the sum of the degrees is 20 * 3 = 60. So the number of edges, which is the same as the number of connections, is half of that, or 30. 