Some people asked me to share a lvery difficult yet simple logic puzzle that has stumped my friends. It is also my favorite interview question.

First off some background. The problem is not a trick question, as much as it may seem like one. There is no play on words, no hidden exception. Everything in this problem is exactly how it is presented and the answer doesn't rely on any slight of hand. Take this puzzle at face value.

Also **ALL ANSWERS NEED CONTENT WARNINGS** I do not want you spoiling it for others. This goes for questions and hints too.

Now on to the puzzle:

There is a room with 100 jars with lids on them all in a row. There is also a stack of papers, 100 papers each labeled 1 to 100. The papers are shuffled and one paper placed into each pot randomly.

You and your assistant are in an a joining room. Your assistant is allowed to enter the room, look in all 100 pots, and if they wish they can pick any 2 pots and switch the paper in them. They can only do this one time, they do not have to do this they can choose to also do nothing. At this point they leave the room, without talking to you.

Next, someone tells you a random number from 1 to 100. Your goal is to enter the room and open a pot tht has that number in it. You are allowed to open, at most, 50 of the pots.

Whatever process you use to open those pots must **guarantee** that by the time you open the 50th pot that the number you were given will be found. Obviously your assistant didn't know what the number is at any point.

What rules do you give your assistant, and what rules do you follow, to ensure you are successful?

@MutoShack @inditoot

@freemo @MutoShack

This sounds more like a probability question then a riddle πŸ™‚ Will give it shot though

There is no math or probabilities needed. Any solution works 100% of the time.


@freemo @MutoShack

lol, I wasted a single page doing math on it πŸ˜…. its getting interesting though

possible solution 

possible solution 

@freemo @MutoShack @inditoot leave the lid off the pot with the number I need.

Thx assistant. πŸ™‚


He doesnt know what number you need when he goes in. Also id say this is a trick. The answer is nothing tricky like that.

@MutoShack @inditoot

@freemo @MutoShack @inditoot I'd just get a shady assistant that would get the guys that set up the test to text him πŸ˜‚

@Wetrix @freemo @MutoShack

πŸ˜‚πŸ˜‚πŸ˜‚ That is another way to solve it
although there are multiple ways we can increase our chances but they are not enough to guarantee that we gonna get that number in 50 tries.

solution, excessive smugness 

solution, excessive smugness 

Comments on this weird puzzle. 

Comments on this weird puzzle. 

@freemo Do I have only one assistant available? Can he do the enter-room-switch-two-jars as often as I wish before I enter?

@pschwede He can only switch the jars once, you only have one assistant, there is no tricks in terms of wording or setup. This riddle is exactly as it appears at first glance.

@freemo do each of the jars contain only one paper? The text doesn't tell how the stack of papers is put into the jars.

@pschwede only one piece of paper, randomly and uniformly distributed.


proposed change 

proposed change 

Sign in to participate in the conversation
QOTO Mastodon

QOTO: Question Others to Teach Ourselves. A STEM-oriented instance.

No hate, No censorship. Be kind, be respectful

We federate with all servers: we don't block any servers.