Arrow Path Sudoku Solver

Arrow Path Sudoku puzzle

About

Arrow Path Sudoku Solver is a Java application for generating, editing, and solving Arrow Path Sudoku puzzles. While not a school project, it was inspired by one of my former math professors, who was studying the properties of Arrow Path Sudoku. Each Arrow Path Sudoku puzzle (without fixed numbers) has at least nine solutions. But are there puzzles with more solutions? What is the maximum number of solutions? I wrote this program to help study the problem, since I'm better at writing software than mathematical proofs.

Requirements

Arrow Path Sudoku Solver requires the Java Runtime Environment.

Download

arrowpathsudoku.jar

Running

With the Java Runtime Environment installed, open a terminal window, change to the directory where you downloaded arrowpathsudoku.jar, and type:

java -jar arrowpathsudoku.jar

at the command prompt.


Playing Arrow Path Sudoku

Arrow Path Sudoku is played on the classic 9×9 Sudoku grid, and just as in classic Sudoku, the goal is to fill in the grid so that each row, column, and 3×3 block (delimited by thick lines) contains each of the digits 1 through 9. In Arrow Path Sudoku, each cell contains an arrow pointing to another cell in the same block which must contain the next higher digit, or 1 if the referring cell contains 9. There is usually only a single number filled in for the player, known as a hint.

From the puzzle above, we can fill in a few digits:

At this point it is not immediately apparent where the 9 goes. With a little deduction it can be determined that the 9 must go in the upper-right cell of this block. The complete solution to the puzzle is below.

Solved Arrow Path Sudoku puzzle
Solution to the puzzle at top

Properties

The arrows may only point in multiples of 45°, so not all arrangements of numbers possible in a classic Sudoku puzzle are valid in Arrow Path Sudoku.

Since the numbers depend on one another in a cyclic fashion (with 9 pointing back to 1), each solution is equivalent to eight other solutions, provided no numbers are fixed. These alternate solutions may be obtained simply by incrementing each number on the board by a fixed amount using modular arithmetic. Every puzzle without fixed numbers has a multiple of nine solutions. In puzzles with more than nine solutions, fixing different numbers may narrow the solution set by different amounts.


Generating puzzles

Click the generate button, or use the generate menu to generate a new Arrow Path Sudoku puzzle.

The generate button will generate a puzzle with hints by default, or will repeat the last invoked of the top four generate menu items.

Editing

Locked numbers

Locked (fixed) numbers, such as hints created by the generator, are displayed in red. They cannot be edited or deleted without first being unlocked. You may lock or unlock numbers by right-clicking on them.

Arrows

Click in the center of a cell to delete its arrow. Click on the side or corner of a cell to point its arrow in the corresponding direction. Each arrow must point to another cell in the same block, and in a multiple of 45°.

Numbers

Press Backspace, Delete, or 0 to delete the number in the cell under the mouse cursor. Press 19 to set the number in the cell under the mouse cursor. Locked numbers must be unlocked prior to being edited or deleted.

Clearing the board

Click the clear button to clear everything on the board.
Click the clear # button to clear only unlocked numbers.

Solving Arrow Path Sudoku puzzles

When the current puzzle is solvable, the number of solutions (taking into account locked numbers) will be displayed under the board. Click the solve button or use the solve menu to solve the current puzzle. If multiple solutions exist, one will be chosen at random. If the puzzle is partially solved, the solver will attempt to finish solving the puzzle with the current unlocked numbers intact, only changing them if this is not possible. If the puzzle is already solved, but other solutions exist, the solver will pick another solution at random.

Scrolling through multiple solutions

If the puzzle is solved, and multiple solutions exist, you can scroll through them with the keyboard or the mouse wheel.

Scrolling through solutions
Key Mouse Action
scroll wheel up next solution
scroll wheel down previous solution
Page Up 10 solutions forward
Page Down 10 solutions backwards
Home first solution
End last solution

Samples

There are several built-in sample puzzles available from the samples menu. These are meant to demonstrate the existence of Arrow Path puzzles with a large number of solutions. You can load one of these puzzles, solve it, and then experiment with locking down various numbers to see the effect on the number of solutions. You can also scroll through all said solutions as described above!