The second puzzle is: how many different paths are there, that spell WAS IT A CAT I SAW, i.e., WASITACATISAW, in either direction?
W | ||||||||||||
W | A | W | ||||||||||
W | A | S | A | W | ||||||||
W | A | S | I | S | A | W | ||||||
W | A | S | I | T | I | S | A | W | ||||
W | A | S | I | T | A | T | I | S | A | W | ||
W | A | S | I | T | A | C | A | T | I | S | A | W |
W | A | S | I | T | A | T | I | S | A | W | ||
W | A | S | I | T | I | S | A | W | ||||
W | A | S | I | S | A | W | ||||||
W | A | S | A | W | ||||||||
W | A | W | ||||||||||
W |
If one path can be obtained from the other by reversing its direction, in this puzzle they are the same path.
Mathematically speaking we are looking for the number of equivalence classes with respect to reversal of direction.