# Most 5s in a 5x5 Super Minesweeper grid

In a Super™ Minesweeper grid each cell is either a mine or a value. A value in row $$𝑟$$ and column $$𝑐$$ represents the total number of mines located in row $$𝑟$$ or column $$𝑐$$.

What is the most number of 5s that can occur in a 5x5 Super™ Minesweeper grid? Good luck!

• Would [optimization] be an appropriate tag? – bobble Nov 9 '20 at 0:59
• Yes I suppose it is an optimization. – Dmitry Kamenetsky Nov 9 '20 at 1:02
• Shouldn't it be "the total number of mines located in row r AND column c."? – Kruga Nov 9 '20 at 8:26
• it depends how you interpret it. We are counting mines that are either in the same row or same column, they can't be in both. – Dmitry Kamenetsky Nov 9 '20 at 10:47

Number of fives:

Twelve

One such grid:

 X 5 X 5 X
5 X 5 X 5
X 5 X 5 X
5 X 5 X 5
X 5 X 5 X

• Via integer linear programming, this value is optimal. – RobPratt Nov 9 '20 at 1:32
• @RobPratt I expected it would be. Thanks for confirmation. – Daniel Mathias Nov 9 '20 at 1:33
• Well done! Pretty solution. – Dmitry Kamenetsky Nov 9 '20 at 2:29