Color an grid with colors such that no region is monochromatic. Profile: the coloring of the last row (^ states).
Transition: next row's coloring must differ appropriately. Constraint: for each block involving last row and current row, check it's not monochromatic. DP: = ways to color rows with last row having coloring . Enumerate valid next colorings.