The Theory of Computation

Bernard M.E. Moret

Addison-Wesley-Longman, 1998


Detailed Solutions

Chapter 2, Problem 34




Prove that, in any group of at least two people, there must be at least two people who are acquainted with the same number of people within the group.

Another way to phrase this exercise is to say that any undirected graph with at least two vertices has at least a pair of vertices of the same degree -- because we can represent people with vertices and the relationship "i knows j" by an edge {i,j}.

A graph on n vertices has a choice of degrees for its vertices from a minimum of 0 to a maximum of n-1; thus, if no two vertices have the same degree, then the graph must have exactly one vertex of each degree. But that is impossible: since one vertex has degree n-1, it is connected to all other vertices, so that there cannot be a vertex of degree 0. Hence there must be at least one pair of vertices with the same degree.