# A new 4 x 4 arrow puzzle

Can anyone help me with solving this puzzle:

Draw arrows in all fields around the diagram in a way that every arrow is pointing at least one number inside. The numbers inside the boxes equal the number of arrows pointing at them. The arrows can point horizontally, vertically or diagonally.

Here is an example showing how to solve this type of puzzle.

This is from a job interview so I have no source.

• I believe there are 2^8 + (3^8) = 6817 combinations of puzzle solutions, so in principle this can be bruteforced. Nov 13 '18 at 16:18
• @Parseltongue I think your math is off; it should actually be 2^8 times 3^8 = 1679616, shouldn't it? Still trivial for a modern computer, but obviously it scales far too quickly to be a feasible approach at higher size squares. This makes me curious whether this is a NP problem; I can see a way of mapping it to a Boolean satisfiability problem, which would be NP (though that's certainly not the most efficient approach), and the sums can probably provide more information, perhaps revealing an algorithm in P. But it reminds me of Sudoku, which is in NP... I wonder. Nov 13 '18 at 20:58
• You're right! My mistake. And those were my thoughts as well... I immediately started trying to code up an algorithm to solve this, but decided Brute Force was easiest. Nov 13 '18 at 21:04
• Here is an "assisted solver" I whipped up to play around with this puzzle. It's just a bare-bones set of <button> and <span> elements in a grid. The values in the grid update live as you rotate the arrows. I see that the answer has already been posted, and a tool like this probably already exists, but perhaps someone will find this one useful. Nov 13 '18 at 23:15
• @benj2240 - that is absolutely amazing! Learned a lot reading the code. Nov 14 '18 at 18:57

## 4 Answers

The first clue I spotted was:

The second column has exactly one vertical arrow.

This can be proven as:

It can't have two vertical arrows because of the 1 in it. If it has zero vertical arrows, then the 4 at (2,2) is forced, and then the 4 at (2,4) is forced. But then the 4 at (4,4) can't be achieved, because of it's six arrow squares, three have already been used: (4,0), (0,4) and (3,5).

Secondly you can spot that:

As the 1 in the second column is already covered, the arrows on row 1 must point diagonally downwards.

I think this is the answer desired:

I started by

Assuming at least one arrows each in an inverted A shape, based on the prevalence of 5s and 4s, in columns 1 and 4, and rows 2 and 4. After that, it was primarily guesswork, placing lines, then working backwards to determine what arrows would cause those lines.

• This is indeed the correct answer. bravo! Nov 13 '18 at 19:03

This solution:

1. places an arrow in every field around the diagram;
2. each arrow points at one or more numbers inside;
3. satisfies the condition of having the numbers in the boxes equaling the numbers of arrows pointing at them!

That being said, the person who is giving you the interview may not like it.

:P

• These are a standard puzzle form: puzzlepicnic.com/puzzles... but something about this puzzle makes me believe it's unsolvable. I wonder if it's just one of those task-persistence measures given in job interviews to see how long you'll try before you give up. Or, if it is solvable, it doesn't have characteristics of other arrow puzzles, which generally have one square with only one logical set of arrows possible. Nov 13 '18 at 15:32
• I too thought about odd angles for arrows, but you sir are taking it to another level x) Nov 13 '18 at 15:35
• Bottom left corner? Nov 13 '18 at 15:49
• @Greg all of the outer squares it touches have an arrow pointing at it Nov 13 '18 at 15:51
• Wow, that is next level! Nov 13 '18 at 15:58

This is a possibility:

I'm sure there are others.