5
$\begingroup$

I have 7 doors coloured like the rainbow:

#Rainbow doors

You can move in either direction moving one door for the first go, two for the second, three for the third, etc - you get the idea.

NOTE

You can jump to the other side. e.g. On your first go you can move from red to violet.

Start on red. Is it possible to go to each door, only going to each colour door no more than twice? (It is impossible to do it touching each one just once)

You must end up back on red

What is the sequence of movements which will result in success? (I am looking for the least amount of moves)

The current leader board, top 5:

  1. Matt: 9
  2. Oren Melzer: 9
  3. Matt: 13
$\endgroup$
4
$\begingroup$

Verified by computer program, the optimal solution is

9 steps

This can be done four ways, but they are all rotations/reversals of Matt's answer.

LRLRLRLLL

LRLRLRRLL

RLRLRLLRR

RLRLRLRRR


Many longer solutions exist, up to 13 steps, without hitting the same spot more than twice.

$\endgroup$
5
$\begingroup$

More Efficient

Alternate left and right until you've visited all, then head straight for red

RLRLRLRRR

This will traverse:

Red -> Orange -> Violet -> Yellow -> Indigo -> Green -> Blue -> Blue -> Indigo -> Red

Old Answer

Okay, since we have to go back to the end, add a move left or right (lands back on Indigo, since we're at 7 now), then do the above moves in reverse.

RRRLLL L LLLRRR

This will go back to indigo and then touch the other six doors once, ending on red. The final progression:

(Start) Red -> Orange -> Green -> Violet -> Yellow -> Blue -> Indigo -> Indigo -> Blue -> Yellow -> Violet -> Green -> Orange -> Red

$\endgroup$
  • $\begingroup$ I am afraid you do have to go back to red, nice try though! $\endgroup$ – Beastly Gerbil Jan 13 '16 at 20:35
  • $\begingroup$ I'll edit the puzzle to make that clearer $\endgroup$ – Beastly Gerbil Jan 13 '16 at 20:36
  • $\begingroup$ Sure. It's trivially easy to backtrack and end back on where you started. $\endgroup$ – Matt Jan 13 '16 at 20:43
  • $\begingroup$ Faster way added in. $\endgroup$ – Matt Jan 13 '16 at 20:49
  • $\begingroup$ Well done! I'll accept this unless someone can do this in less than 13 moves $\endgroup$ – Beastly Gerbil Jan 13 '16 at 20:51

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.