Problem 4. In a convex $n$-gon, some diagonals (which may intersect) are constructed so that no three diagonals intersect at an interior point of the polygon. In this way, the polygon is divided into triangles. What is the maximum number of triangles that can be formed?
Solution: We will prove that the number of triangles is at most $2n-4$ for even $n=2k$ and $2n-5$ for odd $n=2k+1$.

Example. We construct non-intersecting diagonals that partition the $n$-gon into $k-1$ quadrilaterals (for odd $n$, one triangle remains) and in each of these quadrilaterals, we construct the two diagonals (they partition it into four triangles). For even $n$, we get $4(k-1)=2n-4$ triangles, and for odd $n$, the triangles are $4(k-1)+1=2n-5$.

Estimate. First, we note that there is no diagonal that intersects two other diagonals at internal points.

Let us assume that such a diagonal exists and consider the segment on it that connects two adjacent intersection points. At the intersection of this segment with the two diagonals, angles with a sum of $360^{\circ}$ are formed. Therefore, on one side of the segment, the sum of the angles is not less than $180^{\circ}$, i.e., there cannot be a triangle. Contradiction.

Therefore, the diagonals can be divided into intersecting pairs. The four ends of the diagonals in each such pair are also connected by diagonals or sides of the polygon (to form a partition into triangles). This means that if we remove all pairs of intersecting diagonals, we will obtain a partition of the polygon into $k$ quadrilaterals and $m$ triangles. All their vertices are vertices of the given polygon, so the sum of their angles is equal to the sum of the angles of the polygon, i.e.,

$$
k \cdot 360^{\circ} + m \cdot 180^{\circ} = (n-2) \cdot 180^{\circ}
$$

i.e., $2k + m = n-2$. The number of triangles in the original partition is

$$
4k + m = 2(2k + m) - m = 2n - 4 - m \leq 2n - 4
$$

If $n$ is odd, from the equation $2k + m = n-2$ it follows that $m$ is odd, i.e., $m \geq 1$. In this case, the estimate is

$$
4k + m = 2(2k + m) - m = 2n - 4 - m \leq 2n - 5
$$