70 of 100: Mini-Minesweeper

Logic Level 2

The grid shown has some squares that contain mines and some that are safe ; every square with a number is safe. In addition, the numbers indicate how many of the adjacent squares (vertically, horizontally, or diagonally) have mines.

How many mines are there on the grid?

Each square contains at most one mine. Be logical! You don't need to guess.

5 6 7 8 9 10

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

12 solutions

Steven Chase
Aug 8, 2017

The central square has three mines around it. There are therefore four broad possibilities stemming from the central square. The upper left and bottom right possibilities fail immediately (see circled squares). The upper right takes a bit more doing, but eventually fails. The lower left works, yielding 8 mines.

I'm red-green color blind. To me they all look almost identical. It's worth picking differing colors or symbols.

Norman Ramsey - 3 years, 10 months ago

Log in to reply

Good to know. I'll keep that in mind for the future.

Steven Chase - 3 years, 10 months ago

Can one know how many mines are on a grid without determining their setup? (given the numbers)

Mateo Matijasevick - 3 years, 10 months ago

Log in to reply

Yes. The 1, 2, 4, and 4 around the central 3 count a total of 11 mines on the entire board. However, they double-count a few times. There are exactly 4 squares where the mines could be double-counted, and each of these squares is around the central 3. Since we know exactly 3 of these are mines, the answer is 11-3 = 8.

EDIT: I failed to consider the far right and far left spaces (on middle line). Because of these spaces this solution is invalid. It works out only because there are no bombs on those spaces.

Alex Li - 3 years, 10 months ago

Log in to reply

Thanks for this brilliant consideration! Let me ask something else... given any valid configuration of numbers on a grid, can one know how many mines are on without determining their setup?

Mateo Matijasevick - 3 years, 10 months ago

My intuition says "no", but I can't say for sure.

Steven Chase - 3 years, 10 months ago

I'm not upvoting this solution as it requires brute force (although in a very crucial situation) but logic alone is waaay more than enough for this exercise. Chew-Seong Cheong answer deserves top recognition.

Miguel Polido - 3 years, 9 months ago

This is the Minesweeper game. Let us start in the area with the most mines. Consider cell C3 which is marked with 3. C3 has only four unknown adjacent cells. This means that one of the four cells has no mine; and it can only be C2 or B3 (marked with "?" in the figure in the left) since B2 is marked 1. This also implies that the remaining two of the four cells are mined (marked with a red flag).

Since C4 is mined and this is indicated by C5: 1, meaning B5 and D5 are mine free (marked in grey).

Similarly, B2: 1 marks the mine in either one of the two ?-cells C2 or B3, implying A1, B1, A2, and A3 are free of mines.

Now, we note that B4: 4 has a flagged cell and three unknown cells. This means that all three unknown cells must be mine (see the figure in the right).

With B3 being mined, C2 must be free.

Then, C1: 1 is marking the mine in D1.

Since D2: 2 is marking the mined D1 and D3, its remaining adjacent cells E1, E2, and E3 are mine free.

We note that D4: 4 has four non-free (including two flagged) adjacent cells all four must be mined.

We have located all the mines and they are 8 \boxed{8} of them.

The numbered squares 'share' adjacent mined squares, which is why the solution can be, indeed is < 16

Katherine barker - 3 years, 10 months ago

My way of working was much the same as yours, but the 2 options I considered were C2 containing a mine,which gives a solution, and not containing a mine, which doesn't - so showing the first option (your 2nd square) is unique. I doubt I could have explained it anywhere near as clearly though

Katherine barker - 3 years, 10 months ago

Log in to reply

I am glad that you like the solution.

Chew-Seong Cheong - 3 years, 10 months ago

I guess I just did not understand the problem. If one avoids assigning an empty square from more than one safe grid (an easy matter), then the number of mines is just the sum of the values in the grid, which is 16. Ed Gray

Edwin Gray - 3 years, 10 months ago

Log in to reply

This is the standard Minesweeper game used to come free with Windows. The free cells are not just the numbered cells but also those shaded grey in my solution.

Chew-Seong Cheong - 3 years, 10 months ago

I added clarification that each square contains at most one mine.

Jason Dyer Staff - 3 years, 10 months ago
Robert DeLisle
Aug 9, 2017

AnnaMarie Hauser
Aug 10, 2017

I used my unifix cubes again to make a model of the grid. I originally was going to use green cubes to represent "safe" squares and red cubes to represent "mines." I started by setting up the original 7 "safe" squares w/ numbers on them. After a few attempts, I decided to introduce black cubes to represent those original 7 "safe" squares, and then use green and red to represent the other "safe" squares and "mines" respectively.

I originally started at the top of the grid and worked my way down, but would run into problems about half way through, so I decided to start from the bottom (which would probably have more "mines" due to the higher numbers) and work my way up. Working with the 2 "middle" squares (the squares surrounded by numbers on 4 sides) also helped. I originally started by making some assumptions ("What would happen if both of these squares were "safe" or both "mines" and after playing around, settling on the idea that they would have to be different in order to satisfy the numbers around them. This idea or working bottom/middle to top/out led me to make some logical substitutions, knowing I couldn't change the location of the black cubes, and finally led me to this solution that satisfied all the criteria: Also noted, I knew I had to start with 7 black cubes (to represent the squares with numbers in them) and at most 10 red cubes (to represent the possibility that there could be 10 mines as indicated by the multiple choices).

I started with the centre square as 3 out of the 4 possible squares must have mines.

The squares to the left, right and bottom all have mines. (This is shown with the blue dots) I then started with the square diagonally to the left of the centre, labelled 1.

1 has 1 mine beneath it already so is complete. The square diagonally to the right however has a mine to its right. This is the only place it can have a mine as the other two areas would mean that the 1 we previously did would have two mines adjacent to it.

Then onto 2. This square now has two mines, represented by the orange and blue dot.

Now onto the 4s. The 4 to the right has 2 adjacent blue dots (mines). The yellow crosses mark places where the other two mines can't go meaning the remaining 2 mines must be where the green dots are.

The 4 to the left has the same problem so the two purple dots mark the mines again.

If you count all the dots you get 8.

Note: The dots represent mines and the Xs represent places which the mine cannot be.

Zach Cox
Aug 9, 2017

Trial and Error Solution!

Adrian Ciurea
Aug 9, 2017

I am not sure if my approach is good enough. Fortunatelly I answered correctly to this question. The numbers shown in the grid sum 16. It is verry likely or better say sure, that each mine is counted two times when summing the numbers in the grid. We can apply this mode of thinking because we must find the number of the mines, not their possitions.This means that there are 16/2 =8 mines. what do you think about this approach. Is it correctly thinked or is just luck?

I would honestly say it was pure luck. Some of the mines were counted 3 times, and some were counted only once. The fact that these numbers balanced out to make the average mine cover 2 numbers was lucky.

Triloshan Thillaikumaran - 3 years, 10 months ago

Just luck. A given mine can be counted up to 8 times using your strategy.

Sie Evan Setiawan - 3 years, 10 months ago
Pujan Yadav
Aug 9, 2017

U'll know if u play minesweeper.

Sundar R
Aug 8, 2017

The most constrained square is the one with 3 mines out of 4 in its neighborhood which means we have to discard only 1 square. If we assume that the square immediately above the 3 and borderiing 1,1 and 2 has a mine, we are led to a situation where the square near bottom left marked 4 cannot have 4 mines in its neighborhood. That means the square immediately above the 3 cannot have a mine which means the other 3 squares bordering the 3 have mines thus leading to the solution as shown below

Paul Marion
Aug 8, 2017

Let us label the columns A-E from the left, and the rows 1-5 from the top.

Start by considering B4. It has 6 unnumbered squares in contact, four of which must be mines. Due to B2 being a 1, only one of A3 and B3 may be a mine, and because of C5 being a 1, only one of C4 and B5 may be a mine, meaning A4 and A5 are mines (mine 1 and 2). As B2 is a 1, and one of A3 and B3 is a mine, it means that A1, A2, B1, and C2 are all clear. As C2 is all clear and C3 is a 3, B3, D3, and C4 must all be mines (mines 3, 4, and 5). As C1 is a 1, and B1 and C2 are clear, then D1 must be a mine (mine 6). At this point, the only cell with a number which does not have its full compliment of mines is D4, which is a 4 and has mines currently in C4 and D3, and therefore requires 2 more mines (mines 7 and 8). (These mines are in E4 and E5; E3 is blank because D2 has its full compliment of mines, and D5 is blank because C5 has its full compliment of mines)

Therefore, there are 8 mines in the grid.

Let us name each columns from the left as A, B, C, D, E and each rows from top as 1, 2, 3, 4, 5. Start with C3 there are 4 misterious squares around it and 3 of them have mines. Look at B2, it indicates that at least one of C2 or B3 is clear. Then we know that C4 and D3 have mines. Look at C5, there are exactly one mine around it, which is C4. Then B5 and D5 are clear. Look at B2 once again. The only mine near it is located at either B3 or C2. That means the other (A1, A2, A3, B1) are clear. Look at B4. We now know that the mines are located at B3, A4, A5 and C4 because A3 and B5 are clear. Back to B2, since we know that B3 contains mine, C2 must be clear. Look at C1, since we know B1 and C2 are clear, the mine must be at D1. Look at D2, since we know that D1 and D3 have mines, E1, E2 and E3 must be clear. Finally, look at D4. Since D5 and E3 are clear, the mines must be located at C4, D3, E4 and E5.

So there are 8 mines located at A4, A5, B3, C4, D1, D3, E4 and E5.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...