in reply to Challenge: Mystery Word Puzzle
In this case, one rule has reduced to a perfect match. The mystery word must contain 'o','l', and 'r'. I then could subtract those letters from the remaining rules, reducing the counts accordingly. Now the word has one letter in common with 'hs'.
Now I can search for /^[rolh]{5}$/ and /^[rols]{5}$/, finding 'rolls' and 'solos'.
(Update: Of course 'solos' must be eliminated, leaving 'rolls' as the only solution.)
I believe this method could be generalized to a solution-space searching recursive algorithm. I will try to write it up when I have time.
|
---|