Battleship placement proving that the number of battleships is divisible by 3

124 Views Asked by At

We have a grid of 6 columns and $x$ number of rows. All battleships are three units long and can be placed like this: 1 or like this: 2

Where the entire grid is filled with ships with no square units left unfilled, I'm interested in showing that the number of ships positioned as seen in (2) must be divisible by 3; the number of ships placed upright is divisible by 3.

I noticed that the restriction on the number of columns to be 6 means that each column can only have up to two of the ships of type (1), I can show that the number of square units remaining is divisible by 3 but I know that this does not imply the actual number of ships is divisible by 3.

1

There are 1 best solutions below

2
On BEST ANSWER

Say the rows are numbered from $1$ to $x$, and rows numbered $1,4,7,10,\dots,4k+3,\dots$ are all colored black. Each vertical ship touches exactly one black row. Furthermore, the number of vertical ships touching each black row must be a multiple of $3$. Therefore, summing up the number of vertical ships in each black row, the total number of vertical ships must also a multiple of $3$.