12
$\begingroup$

You are making a new Minesweeper game. You can place 1, 2 or 3 mines in a cell. As usual the number in an empty cell is the number of mines surrounding it (in 8 directions). Can you place mines into a 6x10 grid such that every number from 0 to 24 inclusive appears exactly once? Good luck!

$\endgroup$
0

1 Answer 1

9
$\begingroup$

Success:

\begin{matrix} &5 &8 &6 &9 &\color{red}{3} &\color{red}{3} &\color{red}{3} &\color{red}{2} &2 &0 \\&\color{red}{2} &\color{red}{3} &\color{red}{3} &15 &\color{red}{3} &24 &\color{red}{3} &12 &3 &1 \\&\color{red}{2} &22 &\color{red}{3} &18 &\color{red}{3} &\color{red}{3} &\color{red}{3} &13 &\color{red}{1} &4 \\&\color{red}{3} &\color{red}{3} &\color{red}{3} &20 &\color{red}{3} &21 &\color{red}{3} &16 &\color{red}{3} &7 \\&\color{red}{3} &23 &\color{red}{2} &\color{red}{3} &\color{red}{3} &17 &\color{red}{3} &19 &\color{red}{3} &10 \\&\color{red}{3} &\color{red}{3} &\color{red}{3} &14 &\color{red}{3} &11&\color{red}{2} &\color{red}{2} &\color{red}{3} &\color{red}{1} \\\end{matrix}

A near miss, with all but 24:

\begin{matrix} 3 &\color{red}{3} &\color{red}{3} &\color{red}{3} &13 &\color{red}{2} &5 &0 &1 &\color{red}{1} \\ 8 &14 &21 &\color{red}{3} &\color{red}{2} &\color{red}{3} &11 &6 &10 &7 \\ \color{red}{2} &\color{red}{3} &\color{red}{3} &\color{red}{3} &23 &\color{red}{3} &15 &\color{red}{3} &\color{red}{3} &\color{red}{3} \\ \color{red}{3} &\color{red}{3} &19 &\color{red}{3} &\color{red}{3} &\color{red}{3} &18 &\color{red}{3} &17 &\color{red}{2} \\ \color{red}{3} &16 &\color{red}{3} &\color{red}{1} &22 &\color{red}{3} &20 &\color{red}{3} &12 &4 \\ \color{red}{2} &\color{red}{2} &9 &\color{red}{3} &\color{red}{3} &\color{red}{3} &\color{red}{3} &\color{red}{2} &\color{red}{2} &2 \end{matrix}

$\endgroup$
4
  • $\begingroup$ How did you do it? $\endgroup$
    – I'm Nobody
    Oct 26, 2022 at 17:37
  • 1
    $\begingroup$ @I'mNobody I used integer linear programming, with a binary decision variable $x_{ijk}$ to indicate whether cell $(i,j)$ contains $k$ mines and a binary decision variable $y_{ijk}$ to indicate whether cell $(i,j)$ has $k$ neighboring mines. $\endgroup$
    – RobPratt
    Oct 26, 2022 at 18:08
  • $\begingroup$ Well done you got it! I was worried that no one would get it. Would you be able to show the numbers in the empty cells somehow? $\endgroup$ Oct 27, 2022 at 13:01
  • $\begingroup$ Do you think it is possible to find a solution on a grid with smaller area, such as 7x8? $\endgroup$ Oct 27, 2022 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.