9
$\begingroup$

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.

$\endgroup$
5
  • $\begingroup$ Just run a spiral in tight rounds - I think you fill the square. $\endgroup$
    – Moti
    Commented Jun 21, 2019 at 19:43
  • $\begingroup$ @Moti but is that the maximum? $\endgroup$ Commented Jun 21, 2019 at 19:45
  • $\begingroup$ If it fills the square than it is maximum. No? $\endgroup$
    – Moti
    Commented Jun 21, 2019 at 19:46
  • $\begingroup$ It fills the grid with routes, not signs. Post an answer. $\endgroup$ Commented Jun 21, 2019 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
    Commented Jun 21, 2019 at 22:14

2 Answers 2

8
$\begingroup$

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.

$\endgroup$
4
  • $\begingroup$ I would like to point out that a now-deleted answer from @Oray was much better than my first answer. $\endgroup$ Commented Jun 22, 2019 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
    Commented Jun 23, 2019 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$
    – Skosh
    Commented Jun 23, 2019 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$ Commented Jun 23, 2019 at 16:45
3
$\begingroup$

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

[enter image description here

with

47 arrows

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

$\endgroup$
4
  • $\begingroup$ Mybad: still my answer is there now and it would be unfair to revisit what I thought was the solution. $\endgroup$ Commented Jun 22, 2019 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
    Commented Jun 22, 2019 at 15:11
  • 1
    $\begingroup$ Sadly I fixed it :( $\endgroup$ Commented Jun 22, 2019 at 15:57
  • 1
    $\begingroup$ @WeatherVane I just wrote my own code and confirmed your answer now :D $\endgroup$
    – Oray
    Commented Jun 22, 2019 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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