Mine Sweeping

Imagine a naval war zone of sixteen square areas arranged in a four-by-four array. Some of these squares have been mined. The puzzle is to figure out which ones. Here's your only information: For each square, the total number of mined areas adjoining the square plus the square itself, if it's mined, is odd. By adjoining, this means touching horizontally or vertically or diagonally. Which squares are mined?


Solution:

The four corners are mined.

Proof: First some notation. There are 3 distinct types of squares, which I'll call corner squares (4 of those), edge squares (8 of those), and inner squares (4 of those). See the illustration below. I'll refer to "the sum" for a square to mean the total number of mines in that square and its neighbors. I'll say two squares are "equal" if they are either both mined or both blank.

Partition the grid into four 2 by 2 blocks. The total number of mines in each 2 by 2 block must be odd, since it is the sum for the corner square in that block.

Consider an edge square. The sum for that square is the number of mines in its 2 by 2 block, which is odd, plus the number of mines in the edge and inner squares in the adjacent 2 by 2 block. That means those edge and inner squares are equal. By symmetry, in any of the four 2 by 2 blocks, the inner square and two edge squares are equal. Since the sum for the block is odd, the corner square cannot be equal to the other three. That means that in each 2 by 2 block, either the corner square is mined and the other three or blank, or the corner square is blank and the other three are mined.

Consider an inner square. The sum for that square is the number of mines in its 2 by 2 block (which is odd) plus the sum of the number of mines in the two pairs of squares adjoining each inner edge of the 2 by 2 block (each pair of squares is equal) plus the number of mines in the diagonally opposite inner square. Since the sum must be odd, the diagonally opposite inner square must be blank. By symmetry, all four inner squares are blank, so each 2 by 2 block must have exactly one mine in its corner square.

The 4 by 4 grid

corner edge edge corner
edge inner inner edge
edge inner inner edge
corner edge edge corner