Take a standard 8x8 chessboard, number the black squares 1 and the white squares 0. How many palindromes does this board contain in 'word-search' fashion?
Now generalize and find a formula for any n*n board.
Notes: A palindrome and its reversal should not be counted twice. A palindrome must be at least two digits long and leading zeroes are not allowed. Numbers can be read in any single vertical, horizontal or diagonal direction.
(In reply to
question by Charlie)
That was my first thought, and I assumed that, since it is a standard chessboard, then the rule that a white square must be in the bottom right corner of the board. When n is even, the board can be rotated to get a white corner in the bottom right, but if n is odd, the corners are all the same. Therefore, in order for a general formula to work, the board should always have a white square in the bottom right corner.
|
Posted by Justin
on 2006-06-10 18:44:54 |