Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

I hope this one wasn't posted before...

there is a room with a square table in it, on each side of the table there's a button, the buttons are not switches (as in you don't know if they're pressed or not, each time you press them they switch states), outside there's a lightbulb, the lightbulb only lights when all the buttons are the same state (all switched on or all switched off), each time you can enter the room and press any buttons you want but each time you have to get out to see the lightbulb, your objective is to light the lightbulb with as few visits to the room as possible, but here's the trick, each time you get out to look at the lightbulb the door shuts and the table spins randomly.

You have to come up with a SURE technique to light the bulb, as in there has to be a maximum number of visits that you guarantee...

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Sorry forgot to mention, you may not use any out-of-the-box solutions, you may not mark the table or buttons and you may not touch the bulb to feel it's heat, all you can do is press the buttons and see the bulb if it's on or off...

It's 7

Link to comment
Share on other sites

  • 0


  2

1 T 3

  4

so we have 4 possible orientations every time we enter the room.

1,2,3,4

4,1,2,3

3,4,1,2

2,3,4,1

step 1: check the light. this really won't change the problem except eliminate two starting states, but we want to make sure we aren't already in a winning state. asumming your not,

we have these possible starting states.

0111, 1011, 1101, 1110;

1100, 0110, 0011, 1001;

1010, 0101;

1000, 0100, 0010, 0001;

hit button 1 and button 3. check the light. if not lit, we must be in one of the following states.

0111, 1011, 1101, 1110;

1100, 0110, 0011, 1001;

1000, 0100, 0010, 0001;

hit buttons 1,2.

0111, 1011, 1101, 1110;

1000, 0100, 0010, 0001;

hit button 1.

1100, 0110, 0011, 1001;

1010, 0101;

hit button 1 and button 3.

1100, 0110, 0011, 1001;

hit button 1 and button 2.

1010, 0101;

hit button 1 and 3; done.

7 checks altogether.

Edited by phillip1882
Link to comment
Share on other sites

  • 0


  2

1 T 3

  4

so we have 4 possible orientations every time we enter the room.

1,2,3,4

4,1,2,3

3,4,1,2

2,3,4,1

step 1: check the light. this really won't change the problem except eliminate two starting states, but we want to make sure we aren't already in a winning state. asumming your not,

we have these possible starting states.

0111, 1011, 1101, 1110;

1100, 0110, 0011, 1001;

1010, 0101;

1000, 0100, 0010, 0001;

hit button 1 and button 3. check the light. if not lit, we must be in one of the following states.

0111, 1011, 1101, 1110;

1100, 0110, 0011, 1001;

1000, 0100, 0010, 0001;

hit buttons 1,2.

0111, 1011, 1101, 1110;

1000, 0100, 0010, 0001;

hit button 1.

1100, 0110, 0011, 1001;

1010, 0101;

hit button 1 and button 3.

1100, 0110, 0011, 1001;

hit button 1 and button 2.

1010, 0101;

hit button 1 and 3; done.

7 checks altogether.

I think you have a problem there, at the part where I highlighted, hitting buttons 1 & 2 doesn't solve all situations, each time it solves only two possible situations max, hitting 1&2 only solves 1100 and 0011, to solve 1001 and 0110 you need to hit buttons 2&3, and because the table is spinning you won't know if you've hit 1&2 or 2&3...

Link to comment
Share on other sites

  • 0

the answer is 9. we can make cases/combinations. that would be 16 in total.. with every single turn we can reduce by 2 the possible combinations.. so tht makes it 9 times watching the bulb and 8 times entering the room... after which certainly the bulb will be on.

Please tell if i am right, its my first ever reply..

Link to comment
Share on other sites

  • 0

the answer is 9. we can make cases/combinations. that would be 16 in total.. with every single turn we can reduce by 2 the possible combinations.. so tht makes it 9 times watching the bulb and 8 times entering the room... after which certainly the bulb will be on.

Please tell if i am right, its my first ever reply..

You need to explain exactly how you'll do it, cause with the table spinning it'll cause some trouble for you, and the solution I'm looking for needs you to enter the room only 7 times...

Link to comment
Share on other sites

  • 0


  2

1 T 3

  4

so we have 4 possible orientations every time we enter the room.

1,2,3,4

4,1,2,3

3,4,1,2

2,3,4,1

step 1: check the light. this really won't change the problem except eliminate two starting states, but we want to make sure we aren't already in a winning state. asumming your not,

we have these possible starting states.

0111, 1011, 1101, 1110;

1100, 0110, 0011, 1001;

1010, 0101;

1000, 0100, 0010, 0001;

hit button 1 and button 3. check the light. if not lit, we must be in one of the following states.

0111, 1011, 1101, 1110;

1100, 0110, 0011, 1001;

1000, 0100, 0010, 0001;

hit buttons 1,2.

0111, 1011, 1101, 1110;

1010, 0101;

1000, 0100, 0010, 0001;

hit button 1,3.

0111, 1011, 1101, 1110;

1000, 0100, 0010, 0001;

hit button 1.

1100, 0110, 0011, 1001;

1010, 0101;

hit button 1 and button 3.

1100, 0110, 0011, 1001;

hit button 1 and button 2.

1010, 0101;

hit button 1 and 3; done.

8 checks altogether.

Edited by phillip1882
Link to comment
Share on other sites

  • 0

Solved by phillip1882 in post

Your solution is same as mine and the one that the asker gave me, but they all have different approaches...

Because of the table spinning, you need something to stay constant, and that thing is each two buttons across each other will remain the same (1-3 and 2-4), so we start by assuming that each pair are matched but they are different from each other, so first you press buttons 1 & 3, if the light didn't light then that means that one of or both the pairs are mismatched, you assume they're mismatched so you match them by pressing buttons 1 & 2, then you press buttons 1 & 3 assuming that the pairs aren't the same.

If the light didn't turn on that means that only one of the pairs was mismatched, when you pressed buttons 1 & 2 you mismatched one pair and matched the other, so now you press only button 1, if that belonged to the mismatched pair then it's only left to press buttons 1 & 3 in case the pairs aren't the same, but if when you pressed the button 1 alone you mismatched the matched pair then that means that now both pairs are mismatched and so you press buttons 1 & 2 to make them match and then buttons 1 & 3 if the two pairs weren't the same...

You have 4 buttons which you need them all to match, if they are not matched then either there are 3 buttons the same and one different, or two buttons correct and two wrong, first you assume that it's two correct and to wrong, in that case there are two possibilities for the wrong buttons' positions, either they are across each other (1-3 or 2-4) or along side each other, assuming they are across each other you press buttons 1 & 3, if the light didn't turn on then the must have been along side each other and when you pressed buttons 1& 3 they remained along side each other, so now you press buttons 1 & 2, if those were the wrong buttons then now the light would turn on, if they weren't (as in you pressed one 0 buttons and one 1) then now the two wrong buttons are across each other and all is left is to press buttons 1 & 3...

So in conclusion, if there were two wrong buttons and two right buttons you press 1&3, 1&2, 1&3 and they'll light, if they didn't light, then that means that there were 3 right buttons and only 1 wrong, since we always pressed two buttons at a time so far the state won't change and it'll remain 3 right and 1 wrong, so now you press only button 1, if that was the wrong button, then the light should turn on, if it was one of the right buttons, then now you are in a state of 2 right and 2 wrong buttons and you just repeat the 1&3, 1&2, 1&3 process and the light would turn on at some point...

Edited by Anza Power
Link to comment
Share on other sites

  • 0

I hope this one wasn't posted before...

there is a room with a square table in it, on each side of the table there's a button, the buttons are not switches (as in you don't know if they're pressed or not, each time you press them they switch states), outside there's a lightbulb, the lightbulb only lights when all the buttons are the same state (all switched on or all switched off), each time you can enter the room and press any buttons you want but each time you have to get out to see the lightbulb, your objective is to light the lightbulb with as few visits to the room as possible, but here's the trick, each time you get out to look at the lightbulb the door shuts and the table spins randomly.

You have to come up with a SURE technique to light the bulb, as in there has to be a maximum number of visits that you guarantee...

Hmm...I should really read problems more carefully, LOL. I misread the problem and thought that only "all on" would turn the light on. Luckily for me the problem can still be solved efficiently. It's a harder problem and fun, though not a huge stretch once you solve the "all on" or "all off" version given above.

Happily, the answer is 15, which would be the min/max even if the table didn't move.

The first thing I decided was it was easier to assume that that all the switches were off to start, and the light would turn on, when only one of the 16 possible unknown combinations of on and off was achieved. If you go from that assumed state and transition through all the other 15 possible states, you will eventually hit a combination that will turn on the light. It may be something like, button 1 on and the other 3 buttons off with your assumption, but it would be "all on" in reality.

Also, when thinking about the problem, I noticed that each state has a mirrored state that exists if you press all 4 buttons. And that those "mirrored pairs" are unique to each other. I also noticed that there may be four possible orientations for the table, but in reality, there are only two when thinking about how a given button press might transition from one type of configuration to the next.

I identified four different basic configuration types:

1. All buttons in the same state (2 possible states)

2. Two on and two off, in a diagonal configuration (2 possible states)

3. Two on and two off opposing sides to each other (4 possible states)

4. Three either on or off, with one "odd" button (8 possible states)

So, the trick was to explore all the possible states for each configuration type and then transition to the next type.

-------------------------------------

Using these assumptions, here's my solution:

Check the light before you start and after each subsequent step

1. Hit all four buttons (buttons are now all on/ have now covered both states with all buttons the same)

2. Hit buttons 1 and 3 (transitioned to 2 on and 2 off in diagonal formation)

3. Hit all 4 buttons (mirrored state from 2/ have now covered both states in diagonal formation)

4. Hit buttons 1 and 2 (transitioned to first state with 2 on and 2 off with opposing sides)

5. Hit all 4 buttons (mirrored state in from 4)

6. Hit buttons 1 and 3 (still in 2 on and 2 off with opposing configuration, but we switched orientation)

7. Hit all 4 buttons (mirrored state from 6/ have now checked all 4 states with opposing sides)

8. Hit button 1 (Transitioned to 1 on and 3 off/ or 3 on and 1 off/ can't be sure which, but it doesn't matter)

9. Hit all 4 buttons (mirrored state from 8)

10. Hit buttons 1 and 3 (no matter what, just moved the "odd" button to the diagonal corner)

11. Hit all 4 buttons (mirrored state from 10)

12. Hit buttons 1 and 2 (just moved the "odd" button to an adjacent corner, but NOT to the diagonal)

13. Hit all 4 buttons (mirrored state from 12)

14. Hit buttons 1 and 3 (moved the odd button on the diagonal)

15. Hit all 4 buttons (mirrored state from 14)

Including the starting state, all 16 possible configurations were just checked and we must have turned the light on somewhere along the way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...