Imagine a 10x10 battleship grid that we are going to place a 1x5 or 5x1 ship on.
I want to consider the probability distribution for a square containing a ship which I'd then like to plot using software.
Essentially this should look kind of like a discrete Gaussian since
1, the corner squares have very low probability since there are only two possible ships that could touch these squares.
2, on the other hand the squares in the middle will be covered by a large number of ships. For example, square (5,5) seems to have 5 possible vertical and 5 possible horizontal ships if you draw it out. This is also true for squares (5,6), (6,5), (6,6).
In principle, for a 10x10 grid with a ship of length 5, I could conceive going through all 100 squares and explicitly counting the possible ship arrangements.
How would this generalise to an nxn grid with a ship of length m?