Iv'e always wondered how many different ways you can put the 5 ships onto the battleship board. Hmm. I think I will figure that out now.
Lets assume a 10x10 square, as then we can do the math in our heads. let's start with the 2 piece battleship. There are 9 ways to put a 2 piece battleship in a 10 peg long row. ( assuming we do not "flip" it 180 degrees ) Since we are assuming we can only rotate the battle ship by 90 or 270 degrees, there are exactly 180 places to put that battleship. ( more like cruser baised on it's size 😉 ) The Equation for the places a battleship 2 pegs long in a "n" size grid is: (n-1) x (n+n) Example: (10-1) x (10+10) = 180 places. I actually drew a 20 x 20 grid, and checked it. This equation does work. Yay! bonus for Evadman! (I can draw squares, but only with a ruler. I probably should have done it in excel.
The same equation with a few modifications will work for the 3 peg battleship. in a 10 peg row, there are 8 ways to place it. so the equation would be (n-2) x (n + n ) or 160 ways. ( also assuming the 3 peg ship can not rotate 180 or 45 degrees ) So that would make the equation for just a 2 peg and 3 peg battleship: {( n - 1 ) x ( n + n )} x {( n - 2 ) x ( n - n )} 180 x 160 = 2880? Wrong. And here is why.
When you pick the places to place the 2 peg battle ship, ( assuming a 10 x 1 row ) you get different #'s of possable places to put the 3 peg battleship. If you place the 2 pegger ( that sounds funny does it not? ) at either end, you have 6 possable places to put the 3 peg ship. if you move the 2 peg ship in one peg, then you only have 5 places to put the 3 peg battleship. Move the 2 peg ship one more peg, and you get 4 possable places. for a 10 x 1 grid, the possable places to put the 3 peg ship, basided on the placement of the 2 peg ship would be: 6, 5, 4, 4, 5, 4, 4, 5, 6. That makes this a chaotic system. A little change can make a big impact on the board. For instance, if you place the 2 pegger so there are only 4 places for the 3 pegger to go, then there will be a proportionate amount of spaces missing for the 4 5 and 6 peg ships.
It is not even possable to "guestimate" the amount of permutations possable, as one little change will have a big effect on total # of permutations available for the other ships. It would actually be possable to change the # of permutations by aprox 20.9% ( 9/43 ) baised on the location of just the 2 peg ship. Arrg!
That would make the range for a 2 and 3 peg solution: ( here is some rambling math now 😉 )
6+5+4+4+5+4+4+5+6 = 43 / 9 = 4.7 repeating
4.7 average places for the 3 peg ship, when 2 peg ship is placed in same row as 3 peg ship which would be ( 9 x 4.7 ) x n ( number of rows x 2 ) so for a 10 x 10, that would be *846* if in same row.
But what about not same row? Here is some more rambling math. This is gonna be a big # , but it must be under the 2880 that we got before, because we now the placement of the 2 peg ship will affect the 3 peg ship placement options. I will break it down....
If the 3 peg ship, and the 2 peg ship are parallel, there will be 8 places to put the 3 peg ship in each of the 9 rows that the 2 peg ship is not in, and an average of 4.7 ways to place the ship in the same row as the 2 peg ship. so for a 10 x 10, assuming parallel only, we have 9 x 8 = 72 places to put that ship, plus the 4.7 average for the same row as the 2 peg ship = 76.7 places
If the 2 peg ship and 3 peg ship are not parallel, the math gets messy 😉
if in a corner, you will only remove about 5 places for the 3 peg ship to go.
Wow, that hurt my head.