Show newer

@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.

@will Well no, its just the ln(2) you suggest is actually the limit of infinite pots. As the number of pots approaches infinity then the probabilility of success (presuming your allowed to look in up to 50% of the pots) approaches ln(2).. but for a finite number of pots the probabilities are different.

@will The probability of success is 68.82%, slightly less than ln(2) actually.

Answer to the 100 pots problem 

@MutoShack Graph theory. In fact it is one of the most understudied math fields that I personally feel is one of the most useful and easiest to understand. Especially for computer/tech people.

@se7en I can think of lots of things of course, a wave as another example, a fat ass stoner, etc, lol

In case anyone is interested here is a link to a very difficult logic puzzle that anyone without math skills can solve (it is easy to understand though). I also include the answer with a CW for those who want to skip right to the answer.

Question: qoto.org/@freemo/1026715554682

Answer: qoto.org/@freemo/1027664501348

Answer to the 100 pots problem 

@MutoShack Lets take the pots int he room and arbitrarily (doesnt matter how) number them 1 - 100 (or 0 - 99 depending on how you index), we can use this as an ID. So we have pots numbered 1 - 100 as well as numbers 1 - 100 (no repeats) randomly placed in these pots, as you already know.

Next is where the key to all this comes in, it is a basic realization. If you open a pot, any pot, the index of the pot (lets say 5) will either be the same as the number in the pot, or different (obviously).

If it is a different number, and then you go to the pot that has the ID that matches the number in the current pot, what does that mean? Well if you start by opening ID pot 5 as we said and it contains number 42 in it, then we open 42 , well we can no longer say "it will either have a different number in it than its own ID or the same". That statement is no longer true. We know it **can't** have the number 42 in it at all (since pot ID 5 has that number in it). So we **know** this next pot **must** have a number other than 42 in it. It can literally have any number but 42 in it. We can say however "Pot 42 will now have either the number 5 in it, or any number other than 42". If it has 5 in it then it creates a cycle and just repeats, if it has another number in it then the pattern continues.

If we follow this pattern out, every time opening the next pot in the pattern we can assume a few things. First off when we open a pot one of two things will be true about the number int he pot. Either it will contain a number that is completely unique (And doesnt loop back and create a cycle), or it does create a loop back. Moreover since we **know** if it contains a loop back that it can not point to any pot other than the pot we started with (because all the other numbers have been taken) we know that eventually when we do encounter a loop it **must** go back to the pot we started with opening, in this case pot ID 5.

We can also conclude that since every pot contains some number that no matter what pot i start by opening it will be part of a cycle of some size (though that size could be all 100 pots).

So we have an important realization here. If I start at some pot with some ID we call X, and follow the pattern i described above, then eventually somewhere in the cycle you are guaranteed to find your number, X (it will always be the last pot you open before the cycle loops back).

So now consider the problem again. If you are given some number when you enter the room, lets say the number 5 again. As long as you start with the pot with ID 5 (again number them however you want, its arbitrary), and follow the rules above then you are guaranteed to find the number 5. However as i said you might have a cycle of all 100 pots, so this alone wont solve the problem.

So what does your assistant have to do? Look at every pot and draw out **all** the cycles for all the pots and numbers on a piece of paper (or remember it in their mind). The only time your tactic above would fail is there is a cycle of 51 pots or more. However since 51 pots is a **majority** of the total number of pots there can only be, at most, 1 cycle of 51 pots or larger. So if your assistant identifies if there is a 51+ pot cycle, and if there is use their one allowed swap to break that cycle into two smaller cycles, then yoru assistant has guaranteed there are no cycles larger than 50 pots.

Now after your assistant has done what I just described, if you start with the pot that has the ID of the number you are given, and follow the cycle until it loops you are guaranteed to find the number assigned to you and you are guaranteed to find it in under 50 pots.

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

Hey folks, if you are like myself and mighty confused by Transexuality/Transgender things, I would like to recommend @TranimeGirl 's youtube: youtube.com/channel/UCEtVfj-XF

I am learning a lot here from her point of view and it's all exceedingly interesting to me. She explains things well from the standpoint of a MtF transexual (Correct me if that is incorrect, Tranime)

She seems to have a very common sense approach to things, and I appreciate deeply her forthright manner and opinions.

Whatever my opinion is worth, I am very much enjoying learning from her regarding her condition and how it affects her life.

@Surasanji Not weird mania for me without a known condition (so likely worse for you) is hella stressful.

Sweet after almost a week these sleeping meds have finally started to do their job. Went to bed at 9 pm and woke up at 5 am, no alarm. So nice to beat the sun.

@Surasanji
Totally fine. Have fun! I'll upload your quota tomorrow morning if I didn't already.

@fedilab Yes but with the caveat that it would need to be highly configurable and/or be triggered manually as awell as auto.

Anyone need a random bloke to tell you that I care about you and value you as a human being? If so, consider this it, message me if you want the more personalized form.

Love for all!

Show older
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.