## Introduction

the game sumpuzzle is a challenging test of logic and simple arithmetic in which the player positions numbers to satisfy six intersecting sums. These intersecting sums contain exactly 9 numbers: the digits 1-9. The starting puzzle presents a grid showing the intersecting sums and their totals, but not the numbers used. The player must work out where to place the numbers 1-9, each of which must appear exactly once.

## Summary

The grid contains 6 simple sums: 3 across and 3 down.
Initially only the operators (+ add, - subtract, x
multiply, / divide) and the result of each sum are shown.
Players fill in
the numbers 1 to 9 which satisfy the intersecting sums.
Each number only appears once in the grid. **Arithmetic is
performed left to right.**
The candidate numbers are shown in each of the 9 squares.
Left-clicking on a candidate will erase it; middle-clicking
will reveal it; right-click will set it as the solution
for that square.
The green wand icons at the end of each sum provide
assistance: left-click will reveal a list of the sets of
numbers which satisfy the sum (please see Figure 1.); right-click will remove
any candidates that are not in the list; middle-click will
restore all the candidates for the sum.
At the top of the display is a Toolbar.
The jigsaw piece button at the left is a menu which
has options for entering
puzzles, reading them from files or saving them to
disk. The menu includes options for configuring the
display and saving the current settings.
It also has an option to set the number of sets
of numbers that satisfy each sum: roughly speaking, the
more sets the harder the puzzle.
Next to the jigsaw icon is a calculator-like icon which is
used for generating a random puzzle;
a thumb for checking and correcting errors, and
a sad smiley for showing the solution. To the
right is a clock which ticks every 5 seconds. Eack puzzle is generated when the player clicks on the calculator icon: there are an unlimted number of puzzles.

## Sumpuzzle Worked Example

A video from sumpuzzle. The player clicks the calculator icon to generate a new puzzle. She then left clicks on the wand at the end of the bottom row which causes a popup to display the possible combinations of digits which would satisfy the corresponding sum. For example the left hand digit is one of 2, 4, 5, 6, 8. She then right clicks on the same wand and the program deletes all the impossible candidates for the cells in that row. She repeats this process for all the rows. When she does the same for the columns several answers get filled in because they are the only remaining candidates. Finally she starts to think for herself and completes the puzzle by a series of left and right clicks, occasionally checking for errors by clicking on the thumb icon.

## Playing

Each of the squares which have yet to be given a value contain tiny "candidate" numbers 1-9. These are buttons which can be left clicked for removal or middle clicked for setting the number for the square. A right click will replace a deleted candidate. In this way they can be used as a simple notepad while working towards the solution for each square. If the player cannot make progress, hints are available.

## Using Hints

Hints are requested for individual sums using the wand icon at the sum's end. A left-click will bring up a list of all the possible sets of digits which satisfy the sum. A right-click will delete all candidates in the sum which do not appear in these sets. A middle-click will resore them.

Of course, use of the hints is not obligatory and purists can work out everything for themselves and simply use the candidate buttons as a notepad for each square.

## Loading Puzzles

The Puzzle menu contains options for reading puzzles from files, saving puzzles to files and for entering puzzles through an on-screen editor. To facilitate this a strict format is used; an example of which is shown here.

If the program finds any deviation from the format it will give an error message and display the offending line of data, and allow the user to edit the file in an on-screen editor window. An example of which is shown in the adjacent screenshot. The puzzle will also be rejected if it has more than one solution.

## Checking for Errors

Clicking on the hand button causes the program to check the puzzle for errors (which can occur due to the player removing incorrect candidates). If errors are detected the hand will flip to the thumbs down position. A further click on the hand will reverse all moves made by the player, back to the last time the puzzle was error free. Note that when a hint is requested the program always checks the puzzle for errors first. If errors are detected no hint search will be performed, the hand will flip to thumbs down and the squares with errors will be highlighted.

## Difficulty

Analysis of all the possible combinations of pairs of the operators +, -, x and / with the digits 1 to 9 shows that there are 5292 different sums. Of these, 8 are satisfied by only one set of numbers, 98 by 2 sets, 70 by 4 sets, ..., 3 by 48 sets. For example A / B x C = 9 is only satisfied by 6 / 2 x 3 = 9; and A + B x C = 119 is satisfied by 8, 9, 7 and 9, 8, 7; but A + B + C = 16 is satisfied by 48 different sets of numbers.

Obviously a major determinant in the difficulty of solving these puzzles is the number of different sets of numbers which can satisfy each individual sum. The next factor is the particular ways in which the sums intersect: each number is in two sums and hence must satisfy both. Finally, the numbers 1 to 9 must each appear exactly once, and so, as for Sudoku, this can further help to reduce the number of alternatives.

To allow the player to set the difficulty of the puzzles presented the Puzzle menu contains an option to select how many sets of numbers satisfy each sum. This value is the average number of sets over the whole puzzle.