Solution

ID: past-exam-of-the-probability-statistics-and-options-ii-course-of-the-university-of-oxford/2010/r/r2/v/a/solution

The sum of degrees is twice the number of edges, so
For this gives
Necessity of the divisibility condition follows. Conversely, when , choose internal labels and form a Prüfer sequence in which each of them appears exactly times. Its length is ; all other labels are absent. The decoded tree has degree at the chosen labels and degree one elsewhere. Thus the divisibility condition is sufficient, with the displayed leaf of a graph count. For the code is empty and the sole edge works, with no internal vertices.
The division assumes . If , all vertices would have degree one, and the only connected tree with is the two-vertex edge. This separate case is not expressed by division by .

New to topics? Read the docs here!