A simple graph is one with no loops or double edges.
A classical Graph theory result is that all graphs have at least one pair of vertices with the same degree. I am wondering which graphs have only one pair.
Give a characterization if possible. If not possible, prove that it is impossible.
For $n > 1,$ there are precisely two such graphs that are the complement of each other and one of them is disconnected. The graph of order $n$ is obtained by taking $G_2 = K_2$ and for $G_{n+1} = \overline{G_{n}} * K_1.$
To see that the claim holds observe that for $n = 2$ the claim is obviously true. Suppose now that $G,\overline{G}$ are two graphs of order $n$ having precisely two vertices of the same degree, and that $G$ is disconnected. Then you can create two such graphs of order $n+1$ by adding a vertex to $G$ and joining it to all vertices of $G,$ and similarly you can create a graph from $\overline{G}$ simply by adding a vertex of degree $0.$
Conversely if $G'$ is a graph of order $n+1$ having precisely two vertices of the same degree then by removing the vertex of degree $n$ or $0$ one (by induction) again obtains either $G$ or $\overline{G}.$