NumberthonNumberthon

SolveFire POTD

Bronze
combinatorics
5/12/2026
Problems sourced from solvefire.net
Problem
In a 4×44\times4 grid of lamps, exactly 8 lamps are turned on. A setup is called balanced if each row and each column contains an even number of lamps that are on. How many balanced setups are possible?
Solution ApproachShow

Step-by-step approach

A balanced configuration is a matrix in F24×4\mathbb{F}_2^{4\times4} whose row sums and column sums are all 0 mod 2. The number of such 0-1 matrices with a fixed weight (exactly 8 ones) is found by inclusion-exclusion or generating functions.

Ready for more competition problems?

Practice the full SolveFire course and compete in ranked math battles — free to play.