Problem

Source: 2019 Greece National Olympiad

Tags: combinatorics



Given a $n\times m$ grid we play the following game . Initially we place $M$ tokens in each of $M$ empty cells and at the end of the game we need to fill the whole grid with tokens.For that purpose we are allowed to make the following move:If an empty cell shares a common side with at least two other cells that contain a token then we can place a token in this cell.Find the minimum value of $M$ in terms of $m,n$ that enables us to win the game.