Problem

Source: Singapore Junior Math Olympiad 2017 2nd Round p4 SMO

Tags: Coloring, combinatorics



Consider a polygon with $m + n$ sides where $m, n$ are positive integers. Colour $m$ of its vertices red and the remaining $n$ vertices blue. A side is given the number $2$ if both its end vertices are red, the number $1/2.$ if both its end vertices are blue and the number $1$ otherwise. Let the product of these numbers be $P$. Find the largest possible value of $P$.