% search for 3 matching columns ------------ % if we've reach the end of our spread sheet % end our search in failure [* 1 2] [1 x 1] [* 1 2 3] [x -1 -1 -1] ------------ [* 1 2 3] [1 x 0 0] [* 1 2 3] [x -1 -1 -1] ------------ % if we've found a matching triple % end our search in success [* 1 2] [1 x 1] [* 1 2 3] [x a a a] ------------ [* 1 2 3] [1 x 0 1] [* 1 2 3] [x a a a] ------------ % keep skimming down the table until % we run out of data to test [* 1 2] [1 x 1] [* 1 2 3] [x a b c] ------------ [* 1 2] [1 (x + 1) 1] [* 1 2 3] [x a b c] ============ % Seed our state [* 1 2 3] [1 0 1 0] [. 1 2 3] [. 1 3 1] [. 1 3 2] [. 1 3 3] [. 2 1 1] [. 2 1 2] [. 2 1 3] [. 2 2 1] [. 2 2 2] [. 2 2 3] [. 2 3 1] [. 2 3 2] [. -1 -1 -1]