This kind of puzzle falls under a general class of problems called Constraint Satisfaction Problems. Sudoku puzzles, map coloring, and cryptarithms are all examples of CSPs. A CSP is defined by a bunch of variables, each of which can take on some values in their <i>domain</i> (In this case each cell is a variable, and initially their domain is all 26 letters.) and a group of arbitrary <i>constraints</i> over the variables (the regexes).<p>One method of solving a CSP is to keep a set that initially contains all of the variables. On each iteration you choose a variable from the set and remove all values in its domain that are impossible given the constraints containing the variable and the domains of the other variables in those constraints. Then you add all of those other variables to the set because they are now restricted more than before. You keep doing the above until you get stuck (which may or may not happen). You then start guessing. There are a bunch of heuristics about how you should choose which variable to guess (eg the variable with the smallest domain). Once you have made your guess, you then add all of the variables back to the set. If you find out the puzzle is impossible, you backtrack to the last guess you made. I believe there are ways you can determine which guess was the problem and immediately backtrack to there.