Consider a grid. A cell is either ON or OFF. When a cell is selected, that cell and all cells connected to that cell by an edge are toggled on-off, off-on. See the diagram for the 3 cases of selecting a corner cell, an edge cell or central cell in a grid that has all cells on (white).
The goal is to get every cell to be off simultaneously. This is not possible for all starting states. A state is solvable if, by a process of selecting cells, the goal can be achieved.
Let be the number of solvable states for a grid.
You are given , , and .
Let and be the Fibonacci sequence and define
You are given , and .
Find . Give your answer modulo .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.