## Directions Sudoku

Notes on possible new logic puzzles

### Directions Sudoku

I have some ideas I'd like to share, and I've been struggling with this one for a while.
I would name this 'Arrow Sudoku' but that's already a well-known variant (this is starting to feel like trying to choose a good unused name for a Pokemon game )

It starts from a pretty straightforward idea. We have a grid full of arrows so we have to move through the grid following them to find the longest possible path.
The path ends when we enter an infinite loop or we get out of the grid (it could loop to the other side like a toroid but I'm not considering that case)

In this example the longest path (blue) has 11 squares.

From there we could try a little challenge: Find the perfect square (arrows non-repeated in any row/column) with the longest path:

I'm thinking at least 1 clue should be given since a completely empty puzzle would have (at least) 4 solutions because of rotation.
There are many combinations there so it's already a challenging question but probably you are already guessing where I'm going with this.

Diagonal arrows can also be included, and I implemented a dot which would be a dead end of the path, so with that we have a complete Numpad we can translate to numbers 1-9.

And from there the question is: From all possible completed sudoku grids (without considering rotation), which one has the longest path?

Examples: Show
Wecoc

Posts: 76
Joined: 08 April 2019
Location: Girona, Catalonia

### Re: Directions Sudoku

Very challenging.
For the 4x4 example I found a maximum path of 8 cells (P&P).
Hidden Text: Show
Code: Select all
`4862862462482486start at the upper 6`

For the 9x9 sudoku variant, I hesitate between P&P and programming....

Hajime

Posts: 280
Joined: 20 April 2018
Location: Netherlands

### Re: Directions Sudoku

Choose for programming...
Interim result: start at center cell (5,5); path length 46.
Only path cells are shown (sudoku is solvable)
dir_sudoku_46.PNG (14.29 KiB) Viewed 422 times

I think my laptop is busy the whole night...

Hajime

Posts: 280
Joined: 20 April 2018
Location: Netherlands

### Re: Directions Sudoku

Yes, we got the same result on the 4x4 version
On the 9x9 sudoku version you are way ahead of me, but there's a problem.

Image: Show

I think the approch is good though, I believe it's faster to use programming as you did to search for longest possible paths and later check each result for solvability.
Alternatively, as in this case, the 5 will usually be the breaking point: fixing them before-hand could also be a good method.
Wecoc

Posts: 76
Joined: 08 April 2019
Location: Girona, Catalonia

### Re: Directions Sudoku

Oops there is a bug in my program. I do check if the generated path will also lead to a valid Sudoku.
Here something is wrong. In the 3rd row a "2" and a "5" is needed, but in box 1 a "2" is already present.
Back to the drawing board....

A typo in the code, so now a new one, only 43 length, starting at center cell (5,5)
dir_sudoku_43.PNG (13.88 KiB) Viewed 401 times

..3...64..924618...8693..7.9....6284.74.1.39..682...17..71.34686317..9..849......

interim result and and a new night to search....

Hajime

Posts: 280
Joined: 20 April 2018
Location: Netherlands