Skip to main content
OlympiadHQ

Browse · MathNet

Print

Thai Mathematical Olympiad

Thailand counting and probability

Problem

A convex polygon of sides is divided into triangles by diagonals which do not intersect inside the polygon. The triangles are painted black and white so that any two triangles with a common side are painted in different colors. For each , determine the maximal difference between the number of black and the number of white triangles.
Solution
Construct a graph by representing each triangle by a vertex of a graph. Two vertices are joined by an edge if their corresponding triangles share a common side. This graph is connected and contains no cycle and hence is a tree. Since it has vertices, it has edges. Moreover, each vertex has degree at most . Paint vertices black and white so that the adjacent vertices have different colors.

Let and denote the sets of black and white vertices, respectively, and let , . We may assume without loss of generality that . Consider the set Then . On the other hand, is the set of all edges of the graph. Hence . This implies It follows that This number can be obtained by constructing the following graph: start with a black vertex of degree one. Its adjacent vertex is white. Then draw two adjacent black vertices to the white vertex, one of which has degree and the other is adjacent to another white vertex. Repeat the construction. The terminal vertex will be slightly different depending on the remainder modulo .
Final answer
If n is congruent to 0 or 2 modulo 3, the maximum difference is floor(n/3). If n is congruent to 1 modulo 3, the maximum difference is floor(n/3) − 1.

Techniques

Graph TheoryColoring schemes, extremal argumentsCounting two ways