1. Labeling the Sides:
John labels the sides of the regular n-gon with the numbers 1,2,…,n in some order. Let the labels be a1,a2,…,an in clockwise order.
2. Triangulation:
Mary divides the n-gon into n−2 triangles by drawing n−3 non-intersecting diagonals. Each diagonal is labeled with the number 1.
3. Product Calculation:
For each triangle formed, the product of the numbers on its sides is written. Let the triangles be Δ1,Δ2,…,Δn−2, and let the sides of Δi be labeled with ai1,ai2,ai3. The product for Δi is ai1⋅ai2⋅ai3.
4. Sum Calculation:
Let S be the sum of the products of the sides of all triangles:
S=i=1∑n−2ai1⋅ai2⋅ai3
5. Objective:
John wants to maximize S, while Mary wants to minimize S. Both will make the best possible choices.
6. Optimal Strategy for Mary:
Mary will try to minimize the sum S. To do this, she will aim to minimize the products of the sides of the triangles. Since the diagonals are labeled with 1, the products will be minimized when the sides of the triangles are as small as possible.
7. Optimal Strategy for John:
John will try to maximize S. He will aim to place the largest numbers on the sides of the triangles as much as possible.
8. Analysis of the Products:
Consider the sum of the products of the sides of the triangles. Each side of the n-gon will appear in exactly two triangles. Therefore, the sum of the products can be written as:
S=i=1∑nai⋅(ai−1+ai+1)
where ai−1 and ai+1 are the labels of the sides adjacent to ai.
9. Maximizing the Sum:
To maximize S, John should place the largest numbers in positions where they will be multiplied by the largest possible sums of adjacent numbers.
10. Minimizing the Sum:
Mary will try to minimize the sum by choosing a triangulation that minimizes the products of the sides of the triangles. However, since each side appears in exactly two triangles, her influence is limited.
11. Conclusion:
Given that each side appears in exactly two triangles, the sum S is determined by the sum of the products of the sides of the triangles. The optimal strategy for John is to place the numbers in such a way that the sum of the products is maximized.
The sum of the products of the sides of the triangles is:
S=i=1∑nai⋅(ai−1+ai+1)
Since each number 1,2,…,n appears exactly twice, the sum S is maximized when the numbers are placed in such a way that the products are maximized.
The final answer is n(n+1)