MathLabs

Problem 2

Let PP be a regular 20062006-gon. A diagonal of PP is called good if its endpoints divide the boundary of PP into two parts, each composed of an odd number of sides of PP. The sides of PP are also called good. Suppose PP has been dissected into triangles by 20032003 diagonals, no two of which have a common point in the interior of PP. Find the maximum number of isosceles triangles having two good sides that could appear in such a configuration.
Step 3 of 5: Count the leaves of the forest
In plain words

A triangle with two good sides becomes a leaf after good-diagonal edges are removed; a triangle with no good side keeps all three non-good diagonal adjacencies. A tree whose degrees are only 11 and 33 has (ni+2)/2(n_i+2)/2 leaves.

deg⁡F(v)∈{1,3},L(F)=∑i=1k+1ni+22=1003+k\deg_F(v)\in\{1,3\},\qquad L(F)=\sum_{i=1}^{k+1}\frac{n_i+2}{2}=1003+k
Detailed analysis

By Step 1, every triangle has two good sides or zero. Boundary sides are good, so a zero-good-side triangle has three non-good diagonals and degree 33 in FF, while a two-good-side triangle has exactly one non-good side and degree 11. If the k+1k+1 components have n1,…,nk+1n_1,\ldots,n_{k+1} vertices, the iith has (ni+2)/2(n_i+2)/2 leaves. Since ∑ni=2004\sum n_i=2004, FF has 1003+k1003+k leaves.