Consider the following problem: You are given a two-dimensional array of integers and you are allowed to place a chess king on one of the arrays. The king can move in any of the eight directions at a time and you want to know how many (simple) paths this king can go that satisfy that the corresponding numbers are strictly increasing and that end in an even number.
As an example, consider the following array:
In this array, we have the paths
, [0 1 2], [0 2], [1 2],  (strictly increasing and ending in an even number).
Read the rest of this entry »