Problem

Source: 2021 Mexico Center Zone Regional Olympiad, problem 2

Tags: Mexico, combinatorics, board



The Mictlán is an $n\times n$ board and each border of each $1\times 1$ cell is painted either purple or orange. Initially, a catrina lies inside a $1\times 1$ cell and may move in four directions (up, down, left, right) into another cell with the condition that she may move from one cell to another only if the border that joins them is painted orange. We know that no matter which cell the catrina chooses as a starting point, she may reach all other cells through a sequence of valid movements and she may not abandon the Mictlán (she may not leave the board). What is the maximum number of borders that could have been colored purple? Proposed by CDMX