Problem

Source: Baltic Way 2024, Problem 8

Tags: combinatorics, combinatorics proposed, grid, game, winning strategy



Let $a$, $b$, $n$ be positive integers such that $a + b \leq n^2$. Alice and Bob play a game on an (initially uncoloured) $n\times n$ grid as follows: - First, Alice paints $a$ cells green. - Then, Bob paints $b$ other (i.e.uncoloured) cells blue. Alice wins if she can find a path of non-blue cells starting with the bottom left cell and ending with the top right cell (where a path is a sequence of cells such that any two consecutive ones have a common side), otherwise Bob wins. Determine, in terms of $a$, $b$ and $n$, who has a winning strategy.