[Home] [Puzzles & Projects] [Delphi Techniques] [Math topics] [Library] [Utilities]
Here's an interesting puzzle requiring the player to choose one letter fro each row in a 5x5 letter grid from top to bottom to form five 5-letter words. Each letter will be used exactly once, and each letter position the a word must come from the corresponding row of the grid.
Background & Techniques
puzzle is adapted from the July 29, 2017 Mensa Page-a-Day calendar. In
play, you may jump to any column to choose he next letter in your word as you go
down. There is no need to rearrange the letters and every letter will be used
exactly once. The clue for this puzzle from the the original calendar specifies
that all of the words describe items with stems.
Non-programmers are welcome to read on, but may want to jump to bottom of this page to download the executable program now.
This is one of the more difficult recursive search based programs I've tackled because the search is mult-level. Not only must we find letters to build candidate words, but also find a sub-set of words that use all letters. After a week of work trying accomplish both tasks in a common "find" function I went back to the "divide and conquer" strategy by separating the two tasks.
Much easier - "Divide and Conquer" works again!
The only other item worth mentioning is use of the library routine IgnoreSelectedDrawCell method in a OnDrawCell exit to remove the default highlighting of the currently selected cell.
Suggestions for Further Explorations
Copyright © 2000-2017, Gary Darby All rights reserved.