This puzzle requires that you enter
the digits 1 through 8 in the circles and squares (one digit in
each figure) so that the number in each square is equal to the
sum on the numbers in the circles which adjoin
Background & Techniques
I ran across this little puzzle in a book that was one of
my Christmas gifts this year:
Giant Book of Mensa Mind Challenges ,
Stirling Publications, 2003. There are eight versions of
the single unique solution (rotate it 90° three times, flip it
over or view it in a mirror and rotate it three more
The solution is not included as part of the program but if
you really get stuck, it is available as a sample problem with
our Brute Force problem
solver which uses exhaustive search to find solutions for a
given set of equations and values.
Non-programmers are welcome to read on,
but may want to skip to the bottom of this
page to download executable version of the program.
Notes for programmers:
I used automatic drag and drop to allow users to drag the 8 TLabel
controls (captioned 1 though 8) to the 8 TShape
controls, four circles and four squares. I assigned
the labels and shapes to arrays in order to simplify the
code. The Tag property was used assign a
numeric value to a shape when a label was dropped on it.
Only a few tricky things, like remember to reset the shape's tag
property to zero if a label is dragged from one shape to
another. Also if the receiving shape is already occupied
(its Tag is >0), move the corresponding label back to its
home starting position.
I think everything else is pretty much self explanatory.
Running/Exploring the Program
Suggestions for Further Explorations
We could use drag objects to identify which numbers are being
dragged, but the added value is probably marginal (would only
help those with very short memory retention :>).
|Creation Date: February
February 18, 2016