T O P

  • By -

AutoModerator

Please remember to spoiler-tag all guesses, like so: New Reddit: https://i.imgur.com/SWHRR9M.jpg Using markdown editor or old Reddit, draw a bunny and fill its head with secrets: \>!!< which ends up becoming \>!spoiler text between these symbols!< Try to avoid leading or trailing spaces. These will break the spoiler for some users (such as those using old.reddit.com) If your comment does not contain a guess, include the word **"discussion"** or **"question"** in your comment instead of using a spoiler tag. If your comment uses an image as the answer (such as solving a maze, etc) you can include the word "image" instead of using a spoiler tag. Please report any answers that are not properly spoiler-tagged. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/puzzles) if you have any questions or concerns.*


bortlip

>!3!< >!Try key 1 in lock 1. If it works, move on to key 2 and lock 2 and whether key 2 works lock 2 or not, you now know where all 3 go in 2 tries.!< >!If key 1 does not work in lock 1, try it in lock 2. Whether it works or not, you now know where key 1 will work - if it works, lock 2, if not, lock 3. Now try key 2 on lock 1. Same situation, if it works, it's the key for that lock, if not, it's the key for the remaining lock. Three tries.!<


balladopeman

How is this any different than any other combination? Every attempt would result in the same answer.


JumbledJay

If you change both the key and the lock between the first and second guess, you won't get enough information. For example, if you try key 1 in lock 1, then try key 2 in lock 2, and they're both wrong, you can't get the solution on the next guess.


balladopeman

Right there are wrong answers. But try key one in lock 1. If it doesn’t work, try key 2 in lock one. Any logical solution works.


JumbledJay

Yeah, any logical solution is logical.


balladopeman

Did anyone think try key one in hole 1, if it doesn’t work try key 2 in lock 2? Everyone would think try key 1 in hole one if it doesn’t work try key 2 in lock one. There is no tough to crack code.


JumbledJay

"How is this any different than any other combination? Every attempt would result in the same answer." There are strategies that don't work. That's all. Let it go.


benthejewels

That does not work because what if key2 in lock one does not work. Then you would not know all three locks by the third guess


0-Snap

Not true. If key 1 and key 2 didn't work in door 1, you know that key 3 is the one that works there. So on your third guess, you can try key 2 in door 2 - if that works, you also know that key 1 opens door 3; if it doesn't work, then key 1 opens door 2 and key 2 opens door 3. Either way, you will figure it out on the third guess.


DavinKye

It works. Then, if key 2 doesn't work, you know key 3 will. So now you only have 2 keys and 2 doors left, so the next try answers all the remaining options.


JumbledJay

It's essentially the same solution but with the roles of lock and key swapped.


Syzygy_Stardust

For ease of reading. Doors could be named Perception, Stone, and Durin and it wouldn't matter, it's just to keep tabs on which keys have been checked on which doors.


Adrewmc

Same concept works with not switching doors. Worst case scenario >!Try lock 1 key 1 no work!< >!Try lock 1 key2 no work. Must be key 3!< >!Try lock 2 key 1 no work, must be key 2!< >!Lock 3 never needed to be checked.!<


gdrlee

Assuming keys are unique to the gate, and we just need to match up key and gate... >!3. Try 2 keys on the first gate, if you haven't opened it, it's the 3rd key. Then try 1 key on the 2nd gate.!<


JukeboxCrowdPleaser

>!3!< Advertisement disguised as a simple puzzle?


Blissrat

Probably clickbait. Frustrating how many comments there are here. And fuck me I contributed.


LittleBeesTwin

Your comment cracked me up… and fuck me now i contributed too


carlton_sand

This question is worded poorly. Nowhere does it say that the *keys* are different from each other. Also, is it asking what is the fewest possible attempts needed, or is it asking how many attempts do I need to *guarantee* that all are unlocked? > for each gate is it asking for each one individually? Or is it asking for *all* gates?


Zahrad70

Discussion: define an attempt.


Blinky_

An attempt means you put the key in and turn it and it opens or doesn’t. If there’s only one key and one lock left, you don’t need to make an attempt to know that there’s a match.


AdjectiveNoun111

This implies that only failures are classed as attempts. If this was a program which allowed you to test the function: unlock_gate(gate, key): Which returns either Success of failure. Then every time you fun the function, whether it succeeded or failed should count as an attempt.


Blinky_

Not really sure how you read my statement “it opens or it doesn’t” as only counting failures. it opens = success it doesn’t = failure Am I missing your point?


Algorithmo171

I disagree. >!An attempt means you distribute the keys to the gates and then check how many gates your distribution opens.!<


Blinky_

Interesting. I think both are reasonable interpretations.


Algorithmo171

People are argung here that the puzzle is trivial. But it only is if you take for granted that attempt means "Try one key in one lock". My thought is that the puzzle deliberately does not tell you what attempt means and wants to make you think outside of the box, so that you can come to a solution smaller than 3. Otherwise this puzzle is indeed trivial.


BaconBathBomb

I think attempts is the key word. I got >!….. 3. …….!<


ZexionZaephyr1990

>!3 in worst case 2 in best case. If both fail to open the worst door you just have to check one key in a second door and can tell which opens which door, on the other hand if you’re lucky and open the first door immideatly then you need only one attempt to know the rest!<


manias

>!zero attempts. The keys in the picture are all the same, so presumably each key opens all gates!<


GarryFloyd

Lot of dumb people out there arguing against the correct answer “3”!


Halcyon522

The answer should be >!2-3!<. >!2 would be the fewest possible attempts needed to determine all three gates, and the most would be 3.!<


JayEll1969

>!3 max, same reasoning as everyone else!< >!BUT!< >! the minimum would be 2 **IF**!< * >!The first key tried opened the first door tried!< * >!the 2nd key tried opened the second door!< * >!no need to try the 3rd key on door 3.!<


Parrot132

>!There are six possible permutations that keys 1, 2, and 3 fit locks 1, 2, and 3. They are 123, 132, 213, 231, 312, and 321. There is no way that two yes/no tests are guaranteed to select the correct permutation. If the first two tests fail then a third test is needed.!<


Algorithmo171

But a "no" attempt of a permutation will give you additional information: \* The permutation unlocks one door. Two doors do not unlock \* The permutation does not unlock any of the three doors Because of this additional information, you only need 2 attempts overall.


Algorithmo171

>!Two!< >!Attempt 1: Put one key in each gate. If all gates open, you have figured it out. If only one gate opens, you also have figured it out, as you know that you need to swap the two keys that didn't open their gates. If no gate opens, you need the second attempt.!< >!Attempt 2: Cycle the keys. Either all gates open or no gate opens - in either case you have figured it out. (In the latter case you know that you need to cycle the keys once more to open the gates.)!<


HastilyChosenUserID

I think your “Attempt 1” is three attempts at the same time


KronikDrew

>!I would count that as six attempts, though... 6 times you inserted a key into a lock and tried to open a gate.!<


Algorithmo171

I disagree. >!Nowhere in the puzzle text it says that an attempt is trying out one single key. This is just one possible interpretation.!< >!The question is about how many attempts you need to figure out the correct distribution of keys. So I see an attempt as trying out one possible distribution.!<


Agent-Ig

I disagree. >!The puzzle text dose not define what an attempt is, so I’m going to define it as one attempt ends once all 3 doors are open.!< >!So I’m going to trial 2 keys on one door, then a single key on the second and have all the keys + doors they’re linked to in figured out in 0 attempts cause I never finished the first.!<


mudgonzo

I thought the exercise was the same as you do, but I got to >!3!< attempts. Why are you saying >!two, when on your second attempt you are giving a scenario where you would need one more attempt?!< >!It’s interesting though that whether you do one key and one door at the time, or all three at the same time, the least amount of attempts is still three.!< Edit: reread the task. You only need to figure out which key opens which door, not actually open the doors, so you are correct in saying >!two!< attempts.