Sam Lloyd's puzzle, Was It A Cat I Saw?, is an example of a palindrome (it reads the same backwards as forwards).
It originates from
Alice in Wonderland when Alice sees the grin of the Cheshire cat. In how many different ways can you read
Alice's question, "Was it a cat I saw?", starting at any one of the W's, spelling by moving up or down, left or right, to adjacent
letters until you reach the C, and then back to the border again?
Click here for a Printer version
The answer is 63,504 different ways.
There are 252 ways of reaching the C in the center. Then there are the same number of ways back out to the edge, so
the answer is 252 x 252 = 63,504.
The diagram below shows how many ways you can get to a particular letter.
There are 24 starting positions (W) along the outside, so each of these squares is marked with a 1.
There are 3 ways that you can get to the square marked with an A in the 2nd row, 2nd column. You can get there from the top, left, or the right.
There are 2 ways that you can reach the A in the third row, second column -- from the top or from the left.
There are 7 ways that you can reach the S in the third row, third column -- from the top, from the left, or from the right. So, add the numbers in
those squares (3, 2, and 2) to get 7.
To get to the C in the very middle, there are four ways to reach it -- from the top, the bottom, the left, and the right. So add the numbers in
those squares (63 + 63 + 63 + 63) to get 252.
Dr. Hari Kishan had a much different approach to the problem. He looked at how many different ways you can get from a particular w to the middle c.
Here is his solution:
There are 24 w's in all. We may start from any w and can reach c by moving up or down, left or right and then can come back to border to any w to have
'was it a cat I saw'. There are four inclined rows of w containing 6 w in each row. Any w of any row can go to any w of any row. Thus
there are 4×4=16 ways of row to row. From any corner w we may reach c in 1 way and come back to it in 1 way. From second w we may reach
c in 6 ways and come back to it in 6 ways and so on. From third w we may reach c in 15 ways and come back to it in 15 ways.
From fourth w we may reach c in 20 ways and come back to it in 20 ways. From fifth w we may reach c in 15 ways and come back to it in 15 ways.
From sixth w we may reach c in 6 ways and come back to it in 6 ways. In any row any w can go to any row w.
Therefore total possible ways to
have 'was it a cat I saw' in a row
=(1+6+15+20+15+6)(1+6+15+20+15+6)
=63×63=3969.
Hence total possible ways to have 'was it a cat I saw' equals 3969 x 16 = 63504.