I brute forced an answer using my minesweeper library at https://github.com/bradmarder/MSEngine
I apologize if this is considered cheating. Here is the snippet of code I used to calculate the answer.
private static void Test()
{
var watch = System.Diagnostics.Stopwatch.StartNew();
var iteration = 0;
while (true)
{
var board = Engine.Instance.GenerateBoard(5, 8, 13);
var count = board.Tiles.Count(x => !x.HasMine && x.AdjacentMineCount == 5);
if (count == 7)
{
var failBoard = BoardStateMachine.GetFailedBoard(board);
Console.WriteLine(GetBoardAsciiArt(failBoard));
break;
}
Interlocked.Increment(ref iteration);
Console.SetCursorPosition(0, Console.CursorTop);
Console.Write($"Iteration = {iteration}, and ellapsed MS = {watch.ElapsedMilliseconds}");
}
}
012x2
02x5x
14x5x
x5x52
x5x5x
14x5x
02x31
01110
This code took 2,031,528 iterations to find a board that satisfied the criteria. On a side note, I played around with this code to find answers to some of your other Minesweeper questions, but the solutions are exceptionally rare. I stopped running the code after 100+ million failed iterations.