9

Your friend has given you a very unusual birthday present.

It is a round box, and inside the lid are $n$ buttons equally spaced in a circle.
The box functions like this; you can press two buttons, and then the box will shut by itself and spin the buttons around by one place (you don't know whether it spins them clockwise or anticlockwise, though, and it can go a different way each time), before letting you press another two buttons.
Each time you open the box, it looks identical - there's no feedback on which buttons you've pressed before either, they're springy and they remove fingerprints and markings and they all reset to the same temperature and they yada yada, don't post a non-theoretical answer please :)

Once all buttons have been pressed at least once, it will sing you an amusing rendition of happy birthday that you really want to hear!

For what n do you have a strategy to ensure that the box will eventually sing happy birthday?

TheGreatEscaper
  • 11,946
  • 1
  • 42
  • 96

2 Answers2

9

All of them.

On each attempt, one of your two buttons should be the one closest to your finger. This means that you now have one finger to "move" around, keeping the other held still. Now look at any particular button. It will move around, one position "left" or "right", until it either hits your stationary finger (at which point it is pressed) or hits your moving finger.

Now imagine taking the rest of those positions in a line. This is now equivalent to the Sleeping Beauty Problem, which is solvable by the strategy given in that post.

Since you press any arbitrary button within as many moves as it takes to solve the Sleeping Beauty problem (a finite number), you must press all the buttons.

Deusovi
  • 146,248
  • 16
  • 519
  • 609
  • 1
    Yay! https://www.youtube.com/watch?v=v26G0pX86Po – TheGreatEscaper Jan 17 '17 at 06:05
  • 1
    Except for 1, because then it would be impossible to press two buttons. I'm a pedant. – boboquack Jan 17 '17 at 07:21
  • 1
    @boboquack The OP never said two distinct buttons, right? – Ankoganit Jan 17 '17 at 09:58
  • @Ankoganit But then the question would be trivial... – boboquack Jan 17 '17 at 21:03
  • Lets say there are $n=4$ buttons in the cardinal positions. If South is your stationary finger, your button presses will be "South, West", "South, North", "South East" from your description of the strategy right? However, if the box rotates counter clockwise the first time, and clockwise the second time, you will fail to press button that was originally in the North position with this strategy. – Trenin Jan 18 '17 at 15:55
  • cont: Lets say the buttons are numbered clockwise 1-4 with 1 starting in the West position. First time, you will press 1 and 4 since you press "South, West". The box will then spin counter clockwise putting 1 in the South position and 3 in the North position. You will press 1 and 3 the second time. The box will then spin clockwise putting 1 once again in the West position, and 4 in the South position and 3 in the East position. You will press 4 and 3. At the end of this, 2 has never been pressed. – Trenin Jan 18 '17 at 15:58
  • Wait a minute - I think the strategy must be "South, West", "South, North", "South, East", "South, East", "South, North", "South, West". i.e. you return to the start. In this case, a button cannot escape. – Trenin Jan 18 '17 at 16:05
  • @Trenin: Yes, going through just once leads to parity issues, and going back afterwards fixes that. – Deusovi Jan 18 '17 at 16:27
  • I believe that The Sleeping beauty problem/paradox is this – Wen1now Jan 20 '17 at 09:11
  • If there are n buttons then what would be the minimum number of moves required to guarantee that all buttons are pressed? – Hemant Agarwal Jun 15 '23 at 22:18
0

Well, this isn't great, but it's something. What if each time you pushed the button you (think) was pushed last time, and then push the next button clockwise?

If the ring spins counter-clockwise then a new button is located in the position of the last button you pushed. You will push the new button and a new button after that, progressing two spaces around the ring.

If the ring spins clockwise you will end up pressing the same two buttons you pressed last time, making no progress around the ring.

Soo... You would push 2n buttons for counter-clockwise spins + 2 buttons times the number of clockwise spins. If this box only actually spins clockwise and your friend was just being a jerk and lied to you about it ever spinning the other way, you will never get to hear the song.

So I guess my answer is between 2n presses and ∞n presses. Not ideal..