|
|
![]() |
|
Mensa Puzzle 2-5-14 Calendar |
Brute Force is one of my favorite programs because it solves so many puzzles that can be expressed as algebra problems, including this one. We need to assign coins to the empty squares so that the sums match the given numbers. That requires 12 equations (5 rows, 5 columns, 2 diagonals) with 17 variables (the empty squares) with 4 possible values for each (empty, nickel, dime, quarter). The Brute Force button found the solution in about 30 minutes and verified that it was unique in 15 minutes more after searching all 17 trillion possible solutions.
Brute Force Version 3.0 fixes
a problem with Incremental Solving when multiple variables can
have the same value as in this puzzle . Incremental Solve works by
enumerating each valid solution for the 1st equation, then testing the 2nd
equation to see if there could be a valid solution given the trial solution for
the 1st, then the 3rd given 1st and 2nd, etc.
Once I fixed the problems that kept it from working on this case, the
Incremental Search button finds the unique solution in 0.05 seconds and takes an
additional 0.10 second to verify that the solution is unique!.
,
February 20, 2014: The Text Search program modifications which writes lines or portions of matching lines to a file was posted a couple of weeks ago. The fellow who requested likes the way it works, but we disagreed on what the default options should be. Text Search Version 2.1 resolves our differences by remembering options selected from run to run. Everyone is now happy.
February 28, 2014: A viewer working on a playback program for Chess games was having trouble building the keys for each rank using FEN notation. FEN uses letters for the chess pieces (P for Pawn, B for Bishops, etc.) and numbers to represent the count of consecutive empty cells. He didn't tell me that objective though until I had written this little demo program, Count Grid Cells which builds keys based on randomly placed letters on an 8x8 grid. The link is to a page of beginner's level Delphi programs. Click on the link within that page or scroll to page bottom to find the download links.
As a bonus, I finally took time to develop a simple way to remove that irritating highlight color drawn for every selected cell in a TStringGrid. I installed it for the two grids it in this program and like so much that I plan to add it to our DFFUtils utility library unit.
|
|