enter image description here

This is a 9x9 grid, with a sign in the center cell like shown. You can add signs to this grid one at a time following these rules:

  • Each sign placed must point to the next sign placed
  • Placed signs become obstacles, so future signs cannot point through them
  • Every new sign turns right (90 deg clockwise of last sign)
  • An older sign may not become blocked by newer signs

What is the maximum number of signs you can place on this grid?

For sake of clarity, if you would like to answer this question, please use this numbered notation. It's easier to understand.

enter image description here

Sorry if this puzzle is a little open-ended. I think I have the maximum but I've been wrong before, and that was just today.

  • $\begingroup$ Just run a spiral in tight rounds - I think you fill the square. $\endgroup$ – Moti Jun 21 '19 at 19:43
  • $\begingroup$ @Moti but is that the maximum? $\endgroup$ – Weather Vane Jun 21 '19 at 19:45
  • $\begingroup$ If it fills the square than it is maximum. No? $\endgroup$ – Moti Jun 21 '19 at 19:46
  • $\begingroup$ It fills the grid with routes, not signs. Post an answer. $\endgroup$ – Weather Vane Jun 21 '19 at 19:47
  • $\begingroup$ @Moti each sign has to be a 90 degree clockwise turn from the previous one so you would not be able to place the whole spiral, just the turning points. $\endgroup$ – hexomino Jun 21 '19 at 22:14

Edit: my answer was inadequate. Only downvotes now please.
@Oray asked to follow up his answer and I found a fault in my previous work, resulting in

50 signs.

enter image description here
It's neat the way it ends up in the corner.
This 50-solution was found fairly quickly but the code ran for 15 minutes.

My original and obsolete answer was

36 signs.

Looking at the left-hand diagram below, one obvious solution taking a spiral path is 18 signs.

enter image description here
However I felt sure that could be improved if the signs were placed closer together; the shorter each path, the more signs can be placed. As no sign may block the path between two other signs, I thought an interwoven arabesque pattern such as in the right-hand diagram would do that. The idea was that each corner could be filled in turn, moving to the next corner.

But I got in such a terrible tangle that I decided to write a recursive solution in C code that explored all possible solutions. It turned out to be feasible and all routes were explored within a few seconds, giving only one solution (with an alternative position for the last sign).

enter image description here
The result turned out to be what I intended: each corner filled in succession clockwise.

  • $\begingroup$ I would like to point out that a now-deleted answer from @Oray was much better than my first answer. $\endgroup$ – Weather Vane Jun 22 '19 at 20:32
  • 2
    $\begingroup$ I don't get why you're asking for down votes. Your most recent edit seems to stand on its own as a good answer to the question; that it came only after an iterative progression of inferior answers is not a knock on it (or you) at all. It's not at all uncommon for answers to be refined until they are maximally correct. If you feel this answer has no merit, delete it (though I hope you don't; your final answer seems like the final answer). Also, there's no need to retain earlier answers (and doing so is discouraged); there's edit history for people who want to see what came before. $\endgroup$ – Rubio Jun 23 '19 at 2:37
  • $\begingroup$ Where did the other answers go? Watching Hexomino, Oray, and you work together to solve these is always entertaining. You beat my number once again but at least this time I had the same strategy (I just didn't cram enough in at the start) $\endgroup$ – Dark Thunder Jun 23 '19 at 14:49
  • $\begingroup$ @Rubio and DarkThunder, perhaps you can see deleted answers, if so you can see from the comments under the one from Oray that I had not indented to improve this, but he asked me to verify if his hand-made solution of 47 was optimal. When I found the error in my work, I posted the better answer, hence the request for no more votes. I did not expect Oray to delete his. $\endgroup$ – Weather Vane Jun 23 '19 at 16:45

I have found a better answer than this answer by just playing with it:

[enter image description here


47 arrows

not sure this is optimal though, but most likely. gonna write a program if noone does that until I wrote :D

  • $\begingroup$ Mybad: still my answer is there now and it would be unfair to revisit what I thought was the solution. $\endgroup$ – Weather Vane Jun 22 '19 at 15:10
  • $\begingroup$ @WeatherVane please fix your code, and let me know if 47 is optimal, otherwise I will write a one :P $\endgroup$ – Oray Jun 22 '19 at 15:11
  • 1
    $\begingroup$ Sadly I fixed it :( $\endgroup$ – Weather Vane Jun 22 '19 at 15:57
  • 1
    $\begingroup$ @WeatherVane I just wrote my own code and confirmed your answer now :D $\endgroup$ – Oray Jun 22 '19 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.