Monday, April 10, 2017

logical deduction - Can you open the door or die?


You wake up and find yourself in a very strange room with a single door. You find a note on the ground surrounded by lots of cards:



There are 66 green and 66 blue door cards on the ground. If you put one blue and one green card into the slots next to the door, the door will open. If you insert two cards of the same color, you will lose a life! I won't tell you how many lives you have, but you will die if you lose all of them!



For most people, this could be completed easily. Unfortunately, you cannot distinguish the color of the cards because you are fully colorblind! Whoever put you there probably knows this. They undoubtedly gave you just enough lives for you to be certain you can get out - if you play their game optimally.


How many tries do you need to guarantee you open the door?



Answer



I believe I can open it in




66



The reasoning behind it is:



The general strategy I'll be using is just brute-forcing a single card against all others. Pick a card, this'll be the "master" card you'll always use. Then you simply test the master card with another card up to 66 times. If it doesn't work, than you toss out the non-master card, and repeat.
As there are an equal number of green and blue cards (66), we can solve it the same regardless of the first card you chose.
So say your first card is green, then the worst case is that you fail your first 65 tries by getting 65 greens in a row. Then on the 66th try you're guaranteed to have a matching blue card since there are no green cards remaining besides the one in your hand.
The argument applies in exactly the same way if you chose a blue card first, just with blue cards instead.



No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...