[Math] Using Pigeonhole Principle for a graph proof

graph theoryproof-writing

Using the Pigeonhole Principle, prove that in any graph with two or more vertices there must exist two vertices that have the same degree. (Note: the problem does not assume that the graph is connected. Your proof must work for any graph, even those in which some vertices are isolated.)

I don't have any idea how to do this. Any advice?

Best Answer

Suppose we have $n$ vertex and $\deg(v_i)$ denotes the degree of vertex. Notice that $\deg(v_i)\in \{0,1,\ldots,n-1\}$.

Now, Assume not,

That means that $\deg(v_i)$ is one to one function from vertex set to $\{0,1,\ldots,n-1\}$ since both of them have $n$ element then it must be also onto.

There exist $i,j$ such that $\deg(v_i)=0$ and $\deg(v_j)=n-1$ which is a contradiction. Since if one vertex has no connection the other vertex has at most $n-2$ connections.