Riddle thread

Post your best riddles.

To start: have 12 identical-looking balls. One of these balls has a different weight from all the others. You also have a two-pan balance for comparing weights. Using the balance in the smallest number of times possible, determine which ball has the unique weight, and also determine whether it is heavier or lighter than the others.

Other urls found in this thread:

ocf.berkeley.edu/~wwu/riddles/medium.shtml
twitter.com/SFWRedditGifs

7

I think you can do it in 5?

6v6, select heaviest group
3v3, if both are the same weight do 3v3 the lighter group
Now do 1v1 with each of the 3 in the anomalous group against a known correct weight ball from the other 6.

Worst case: ball is lighter, ball is last or second last tested: 6v6, 3v3, 3v3, 1v1, 1v1

That's the best I could come up with.

That's ideal; there are 2*12=24 possible scenarios, which is more than the 2^4=16 outcomes which could be determined in 4 weighings.

Just take two balls from the last three and weigh them against each other.
If the scale is uneven replace one ball with the third.
If the scale is even replace one ball with the third.
Either way its 2 measurements instead of 3 and you will know which ball and if it's heavier or lighter

You're given a lock with three rotating dials, each labeled 0 through 9, and wish to crack it in the fewest possible tries. Ordinarily, this would take up to 10*10*10=1000 attempts, but you know that one of the dials on this lock is broken. However, you aren't sure which, and there's no way to tell other than by analysis of which settings open the lock and which don't. How many different times do you have to try to crack the lock before you can be sure of opening it?

Except each weighing can have 3 outcomes:
>Left side is heavier
>Right side is heavier
>Both have equal weight

This is why 3 weighings are enough.

Split into three sets of 4: Weigh twice to isolate which set of 4 has the unique weight.

Split the set of 4 into two sets of 2: Weigh once with 2 balls from one of the other sets to isolate which set of 2 has the unique weight.

Split the set of 2 and weigh one of the balls individually with a ball from the other set. Since the weight needs to be determined as greater or less, both balls need to be weighed even though only one weigh is required to identify it.

Total weighs: 5

Shit, my bad. 3-weighing solution:

Weigh two groups of 4.
If they're equal:
Look at the other 4. Weigh 2 of the 4 against one of the 4 and one of the normal.
If they're equal:
Weigh the remaining one against a regular coin.
If (WLOG) the 2 are heavier:
Weigh one of the potentially-heavy and one of the potentially-light coins against 2 normal-weight ones.

If coins A,B,C,D are heavier than a,b,c,d:
Weigh A,B,c and a,C,D.
If equal:
Weigh d against b.
If A,B,c heavier:
Weigh A,c against 2 normal coins.
If a,C,D heavier:
Weigh c,C against 2 normal coins.

Given 32 stones of distinct weights and a pan balance, what is the least number of weighings needed to identify the heaviest and second-heaviest stones?

...

That's true. So 6v6, 3v3, 3v3, 1v1 in worst cast.

I thought the strategy would be more effective, but it turns out worse than the normal solution.

4v4, 4v4, to find out which group of 4 has the anomalous ball, and whether it is heavier or lighter.
Then 2v2 against known good balls, then do 1v1 of 1 of the group of 2 anomalous balls against a known good ball.
That's 4, which is equal worse case to going 50/50 split from the start. What's more the best case is worse (splitting in half gives you worst case 4, best case 3).

I think you need to isolate a good set of balls fairly quickly, and realistically that takes 2 comparisons. Even if you have groups of 4 it takes 2 more comparisons to find which ball it is.


How about using 4 groups of 3.
First compare group 1 and 2, take note of whether they are equal, and which group is heavier.
Now compare group 1 and 3, again take note of if they are equal, and which group is heavier.
If 1,2,3 are equal, then the anomalous ball is in group 4. If 1 and 2 are unequal, but 1 and 3 are, then it's group 2. If 1 and 2 are equal but 1 and 3 are not, then it's 3, if 1 and 2 are unequal but so are 1 and 3, then it's 1.
Now we have a group of 3 balls, one of which is the ball. We also know if the ball is heavier or lighter.
Now compare any 2 balls in that group, if they are equal then it's the 3rd ball, if they are unequal then select the ball that is heavier/lighter based on our knowledge.

Best and worst case 3 comparisons. Can't think of a way to do it in less.

oh this is one of my favourites!
3 iirc

Here's mine:
you have 10 chests with golden coins, one of the chest has fake coins; the real coins weigh 10 grams, the fake ones weigh 9 grams; you have a balance that shows weight; can you find a way to determine which chest has the fake coins in one weighing?

Take one coin from first, two from second and so on. Which ever multiple of nine you get is the order of the chest.

Not really a riddle, but an interesting idea I got. My friend had been staying over at my place and he tends to wear mismatched socks because "He can't be bothered to match them and always picks two socks at random to make a pair". One day I noticed that his socks match and apparently it was not on purpose.

This got me thinking: Say he has N distinct pairs of socks and he matches them at random. What is the probability of getting at least one pair right? What is the average amount of correct pairs?

I vaguely remember solving a similar problem in my discrete mathematics class, it was something like 1/e as n tends to infinity, but I can't for the love of god remember how I got the answer.

I'm not sure what is worse, the fact that the OP posted this because he thought it was new or the fact that so many newfags are posting answers because its the 1st time they've seen it on Veeky Forums.

This is a good one. Hope I can solve it.

I'm OP. I know it's not new. I only wanted riddled. Here:


An acrobat thief enters an ancient temple, and finds the following scenario:
1. The roof of the temple is 100 meters high.
2. In the roof there are two holes, separated by 1 meter.
3. Through each hole passes a single gold rope, each going all the way to the floor.
4. There is nothing else in the room.
The thief would like to cut and steal as much of the ropes as he can. However, he knows that if he falls from height that is greater than 10 meters, he will die. The only thing in his possession is a knife.

How much length of rope can the acrobat thief get? And how?

the worst is the fact that you're an enourmous cunt

110?
this cant be that easy >.>

I think much more.

All of it, tie the ropes at the top through holes, go down holding on both. Once on ground pull on one rope.

Can the thief climb out through one of the holes? If so: all of both ropes.
If not: can the gold ropes be tied securely to each other without slipping?

No and yes.

Another way:
1)cuts one rope from top at say 1 meter
2)ties the cut ends with a shoelace knot with the end of the rope witch he is on
3) once tied, he jumps on the tied up rope and cuts the original one
4)goes down and puls on the first rope to release both ropes
So he gets 199 meters of rope

Riddles coming from here
ocf.berkeley.edu/~wwu/riddles/medium.shtml

3 measurements:
3 groups by 4 balls, a,b,c

1. a v b
If a>b select a
If b>a select b
If a=b select c

Split selected in half and measure
2. 2v2 - select heavier

3. 1v1 - select heavier

Now you have the heavier ball.

How do you know that the anomalous ball is heavier, rather than lighter?

4

How is this good?

1/N

You pick one. Then the second is chosen at random fron set N

>How much length of rope can the acrobat thief get? And how?
Almost all, assuming he knows his knots.

300

After the first try, if one of the sets of 4 is heavier than the other, which one do you pick for further testing?

If you pick two random balls and weigh them, it is possible for them to have different weights. Then pick the heavier one and compare it to another ball. If they're different weights you know the heavier one is the unique one. So the least amount of weighings possible is 2 and the ball is heavier in this situation

fuck, I thought it was written in OP's post, my bad...

Explain yourself

I have one.

The story takes place in a monastery. The rules are very strict in this place. No communication is allowed between the monks, of any kind. The monks meet once a day only, for dinner, where they can see each other.

One day at dinner time, the master monk makes a speech. He says that several monks will need to leave. He says he will mark in their sleep with a cross on the forehead those who need to leave. He says that as soon as the marked ones discover they are marked, they need to leave at once.

After the third dinner after that night, all the marked monks leave, together, at the same time.

How many were they? Explain.

Actually, if N is the number of distinct Pairs it would actually be 1/(2N-1)

Oh all the monks do not leave at the same time?

Well, on the third dinner, all the marked ones leave the monastery. Implying they all understood, at the same time, that they were marked.

Well I'm stumped user. Can you give a clue?

Sure.

Imagine there is 1 monk marked. Take then the first dinner. All monks can see each other. Take the marked monk. What does he see? What does he conclude?

Now imagine there are 2 monks marked...

Yeah I'm stumped too. If the mark is on their forehead and they can't see it, and monks aren't allowed to communicate, then the only way they'd know is if they looked in a mirror. But that's something that shouldn't be in a monastery.

Oh, the good old Black-Hat White-Hat Riddle. Its easy enough, but i always suck at explaining it.
There are three marked Monks.

If there were One marked Monk, he would see that there were no marked Ones and leave on Day One.
If there were Two mMs, they would see that the other mM didn't walk out on Day one. Therefore they can conclude that they are marked as well and both walk out on Day Two.
And the same goes for all number of days, the marked Monks will always walk after the same number as meals as there are marked Monks.

(The only problem would be if there were no marked Monks and the Prior was just trolling, as nobody would see a marked One and all would walk out)

That's very well reasoned user. There is no mirror indeed.

Thing is there is a way for them to deduce things by just looking at each other

You got it user, good job. didn't know that was a classic.

Explanation is basically what you stated.

* if there is 1 monk marked. Take this monk. 1st dinner. He sees no mark on other monks' foreheads. He concludes he is the marked one. He leaves after dinner 1.

* if there are 2 monks marked. Take one of them. 1st dinner. He sees 1 monk marked. He cannot conclude. He stays. So does his fellow marked monk. 2nd dinner. He sees the marked monk is still here. He concludes that he saw another mark, otherwise he would have left after dinner 1. He concludes then that he is marked. Same reasoning made by fellow monk. They both understand after dinner 2 and leave at the same time.

* if there are 3 monks marked. Take one of them. 1st dinner. He sees two marked monks. He cannot conclude, but he does the reasoning we made earlier. He knows that if they are only 2 marked monks, they will have to leave after dinner 2 (as explained above). If he sees them on dinner 3, he understands he is marked. Same reasoning for the two other monks. They all understand at the same time they are marked, and leave after dinner 3.

Answer is: there are 3 marked monks.

Here is a funny riddle.
For fags that know maths, its a discrete version of the mean value theorem.

A guy is having a practice session of basketball. He spend his day trying shots. He miss the first shot, but at the end of his day, his success rate is over 80%. Can you be sure that, at some point in the day, his success rate is exactly 75%?

Bump and hint : the answer is yes.

well let's take this case.
guy misses first shot. rate=0%.
takes shot 2. rate=1/2=50%.
takes shot 3. rate=2/3=66...%
takes misses shot 4. rate=2/4=50%
takes shot 5. rate=3/5
takes shot 6. rate=4/6=2/3
takes shot 7. rate=5/7
takes shot 8. rate=6/8=3/4=75%

how to prove the thing generally then??

>didn't know that was a classic.
It's usually "illustrated" with Prisoners and Hats.


Another similar one:
There are 4 Prisoners.
They are buried to their Necks in a single file, looking in the same direction. They can see the other Prisoners in front of them, but can't turn and look back. They also can't directly speak with each other, but hear what the others say to the Warden.
Then the Warden comes and puts Hats on each of them, chosen from a Pool of two Blue and three Red.
If three of them are able to correctly call out their own color all are free to go, but if even one of them is wrong all are killed.
After a moment of thinking all are set free. How?

Bonus question: In this scenario only those who can correctly call out their own hat color are able to escape. How does the jailer assure that at least one Prisoners remains?

What about this:

Make 3 groups (let's call them A, B, C) of 4.
1. Weigh A against B. If even, pick C and go to 2, otherwise go to 1b.
1b: Weigh A against C. If even, pick B and go to 2, otherwise pick A and go to 2.
2: Split the picked group into 2 pairs (D, E). Weigh pair D.
3: If 2 resulted in even, pick a ball from E and compare it to a ball from D. If even, the other ball from E is the odd one. If uneven, the picked ball from E is the odd one. If 2 resulted in uneven, do the same thing with D and E switched.

3-4 steps. Any mistakes that I missed?

Ok here is a reasoning.

Let's take a number M of missed shots.
Let's write N the total number of shots.

We know that M/N > 80% in the end.

Question is: does P exist so that M/(N-P) = 3/4 exactly ?
4M = 3(N-P)
Question is equivalent to: does this equation has a solution in P? 3P = 3N - 4M

>everyone has been on Veeky Forums forever
>everyone has read all the threads ever posted

The master monk marked his own forehead because he broke the rule of no communication by telling the other monks he would be marking foreheads. He stayed awake for a couple of days to troll a few perfect logicians, then marked his forehead and fucked off.

Its not exactly this but keep searching this way. You want (N-M)/N = 3/4

Do other tries, you might see something trying.

Okay, stupid question, can you explain the Formula, especially what P is supposed to represent?
I have solved the problem for myself, but i can't really grasp the way you wrote it down.
Oh, okay, that's not the question OP, i was really racking my sleep deprived brain over this solution.

Anyway, the general thing i came up with is this:
s= Shots
m= Missed Shots
n= Base Denominator
s, m, n are all Integers.
s, m > 0 , n>1

If you have the threshold of [math](n-1)/n[/math] and start below it you have to cross [math]s-m/s = n-1/n[/math] if you want to go bigger than [math]n-1/n[/math] .

And here i am somewhat stuck and maybe can't express it mathematically correct anymore, i might get a bit rambly, but please bear with me.

In every interval [math]n[/math] [math]m[/math] can increase between [math]0[/math] and [math]n[/math].

Therefore the difference [math](s-s/n)-(s-m)[/math] can decrease at most by [math]1[/math].

The easiest way to prove that [math]s-m/s = n-1/n[/math] falls on a number divisible by n by proving that there are no integer solutions otherwise.
[math]s-m/s = (n-1)/n[/math] while
[math] s = kn+y and 0((m/(kn+y))+1-kn-y)>0, m>0, k>=0, n>1, 0

Already posted in this thread is an answer with 3, so maybe it's better than you think

Taking dials 1 and 2, iterate through the 100 combinations. If 3 is broken, then one will work.

If it doesn't work, hold 2 fixed and iterate through 1 and 3, all 100 combinations. If 2 is broken it will open, otherwise you know 1 must be broken.

Now hold 1 fixed and go through 2 and 3, knowing that the solution must be a combination of those 2.

Actual answer 300 tries to open, 299 to know the combination.

Best case 2, worst case 7, O(n)

Brute force isn't a particularly good solution.

To get from 0/1 to 4/5 I guess at some point you need to pass through 3/4.

To get 80% score rate you need to have a total number of throws divisible by 5. At some point to get there you need to have taken a number of throws divisible by 4.

I'm not sure the correct way to prove it, but to go from 0/1 to 4/5 you need to pass through 3/4 at some point, either at your 4th throw, or 8th, 12th, etc. I can see that you can't cross 3/4 without landing right on it, but I don't see a reason why. Even if you take 100 throws, by (.75*.8*n)/(.8*n)=80 at the latest you need to get 75%.

I don't know how to prove this kind of thing. What's the best method to use? Perhaps induction?

A slight modification to this solution can give you a chance of figuring it out in 2 moves if you get lucky (assuming marking is allowed).

If the first weighing is unequal, you can remove two balls from one side, say C and D from the heavier side, and transfer one ball from the lighter side to the heavier side, say d. If, by chance, the scale changes directions, you know the transferred ball is the odd one, and you know whether it is heavier or lighter (depending on which side it came from on the original measurement). If not, you can proceed the same way.

Oops. Switching one ball from one side to the other in the second move, knowing the ball is in the group somewhere (which is guaranteed if you start with 6v6), you are always going to have a chance of getting lucky and moving that ball, and solving it in two moves. However, doing this in the scenario I mentioned in would present the possibility of requiring 4 steps to solve it, rather than the guaranteed 3 following the steps in .

here is one that i enjoyed

you are in a room with 3 light switches, all in the off position, and a door.
you are told that through the door and around the corner are three identical light bulbs, all curently off.
each different switch toggles a different corresponding bulb, but you cant see the bulbs from the switches

your task is to determine which switch works which bulb, you can only pass the door once.

google will tell you the answer, but if you havent heard it before, it will be very gratifying to discover the answer yourself.

Half balls on one scale, half balls on other scale.

Record difference.

Take one of the halfs and half it again, putting one half on one side, and one half on other side

If balance then discard; else discard other pile.

Use recording from earlier with knowledge of which pile different ball is in to determine if ball is heavier or lighter.

Continue halving piles and weighing them until different weight ball is found.

Around 6 moves.

I like this a lot, but I find myself wondering: if there is no communication between the monks (not even meaningful looks or similar), why don't more than one assume they are marked and leave? The ones that are not marked should reach the same conclusion as the marked ones (although erroneously), shouldn't they?

I see your point. The others, the unmarked ones, are making the same reasoning. They see 3 marked monks. They cannot conclude, each of them thinking "I see 3 marks, but maybe I'm the 4th one", so they all stay. Even after dinner 3, because they made the reasoning we did: they know they have to wait until dinner 4.

At dinner 4, they see the marked monks left, they all conclude at the same time that they are not marked.

Ok thank you, I misused the quantities... If M is missed shots, N total numbers of shots, then yeah we want (N-M)/N > 80% in the end, and we wonder if integers N and M exist so that (N-M)/N=3/4.

That yields 1-M/N = 3/4. This always solutions in N: N=4M.
For example, if the lad misses 5 shots, he needs to perform good shots so that he shoots 20 times. And then his success rate will be (20-5)/20=3/4
If the lad misses 27 shots, he will need 108 shoots.

That's not a proper demonstration though. I don't know how to "write" it, and what are the exact hypothesis and so on...

Ah right, missed that. Thank you for the explanation

Your question is not stupid. I missed the thing. P was supposed to be an arbitrary variable, going from 0 to whatever needed, and I was wondering if the fraction representing the success rate was reaching for a given P, the value 3/4. It doesn't lead anywhere interesting, so I left that...

On safari, the maths/eqn environments don't seem to produce anything readable, so I struggle read your explanations, but did you anwser "yes it's possible" or "no it's impossible" ?

This one is funny. With the disappearing of filament bulbs for the benefit of LED bulbs, this will become trickier for the next generations. Maybe it will become a pre-historical riddle one day.

You're right, that is a good one and it feels nice to get it by yourself. Helps to visualize it, too.


True, power saving bulbs are also out.

Obviously works for n = 1 and n = 2, but what if n = 3? The chance is clearly different from 1/N as you have a one in five chance to get the correct match with ONLY the first pair, thus the chance is actually higher.

Run really fast and you will be able to see the last of the rays of light? Dunno.

Don't be daft. You'd need a meme drive to be able to do that.
The actual way is to feel each of the switches. If the middle one is warm then hold your dowsing rods over it until it cools, THEN go into the other room, and your rods will show you which is which.

You have 100 swimming pools filled with water, save for exactly one, which has been filled by mistake with a highly toxic liquid which differs from water ONLY by its weigh : while 1liter of water weighs 1 kg, 1 liter of the toxic liquid weights (say) 2 kg.

You have a big scale, but you can only use it ONCE.

How do you determine which pool is filled with toxic liquid ?

I don't get what you are saying, desu.

There are N pairs of sock. And i assumed every pair was distinct, so there are no four socks that are the same.
Also the formula i posted is indeed only for the first draw, as the math for later draws is more complicated and Stochastic 101 is way too far in my past so i am not 100% on the right notation, so bear with me here:
N is the number of pairs, T = 2N is the total number of socks, S is the number of socks drawn so far before this pair-up, C is the chance of a match.

Cₛ = ((T-S)/(T-S-1))-(S/T-S)

Chance for a Match is the Number of available socks divided by the available Socks after

>(Sock Total - Drawn Socks) divided by (Sock Total - Drawn Socks -1 )

Minus the Chance that the partner has already been drawn
> ( Drawn Socks divided by Total Socks )

Cₛ = ((T-S)/(T-S-1))-(S/T-S)

This one, or rather a variant of it, is my favorite.

The thief doesn't even need to enter the temple. Simply climb onto the roof and cut them off from there.

Take 1l from pool 1, 2l from pool 2, 3l from pool 3 etc.
The difference between the measured weight and the expected weight (5050kg) is the number of the pool with the toxic stuff.

clever

What? Turn on one switch for like a minute. Turn it off again, turn another one on.
Enter the room. The lighted bulb belongs to the last switch you activated. Touch the other two off bulbs and the warm one belongs to your first switch, leaving only the cold one.

No rods, nothing overcomplicated.

But what if the ambient temperature I the second room is somewhere around 200 Fahrenheit? Won't that make it difficult to tell which of the two darkened bulbs is the warmer?
You need a solution that works in all conditions.

He could basically steal all of it (barring short stumps at the top).
First, he climbs up all the way and cuts the rope B, which he is not currently on.
He doesn't let it fall to the ground, thou, but attaches it to rope A.
He holds on to B and cuts of A.
Then he knots A back onto the stump that it has one tensionable end and one end that can be pulled to release the knot with the tensionable reaching down to the ground. (I don't know the right knot terminology, sorry)
He holds on to A again, unties B and attaches it to the releasing end of A.
Carefully he climbs down and when he is at the end of the rope janks on B which releases the knot and makes almost 200m of golden rope come down.

AKA the "chances of ever being paired up with your soul mate when there are >7 billion people on this planet" riddle

forgot to quote the riddle

Then you wouldn't walk around the corner, as you'd die in that heat.
Fucking autism, it is a clearly and simply stated riddle.

Plus, this is Veeky Forums, please fuck off with Fahrenheit. Use Kelvin or Celsius

OP of this riddle here. Still unsolved :p
Hard to follow, keep searching.
>Therefore the difference (s−s/n)−(s−m) can decrease at most by 1
Finding something like this (that can only move by 1) is a very good step.

You don't know that in the end of the day, you reach exactly 80% btw. But that's not important.
When you want to do """"""induction with real numbers""""", how do you do?

Keep going :) Try the simplest cases and see why it always work.

Ok I'll give you a hint for the method. It might help a lot, it might not. Consider the first moment he goes beyond 75% success rate. (considering the first moment smth is not true is an equivalent alternative to induction that can be adapted to the real case, that's what I meant up there with my 5 commas).

I am struggling to express this simple truth mathematically:
No matter what, when you have a fraction n-1/n you eventually land exactly on it as the most you can gain on it in an interval of n is 1.
If you are "one short" in the numerator at x you can reach it only at x+n.
x also has to fall on a number that's a multiple of n, as we are working with integers for numerator and denominator.

>induction with real numbers
Here's the recipe that generally works, in most practical cases:
* prove something for all n in N.
* then generalize to all n/p in Q.
* then use the density of Q in R.

For the last bit, you generally use this property of the density - not true in all spaces where density is defined though: for all x in R, x is a limit of a series (q_n) with terms in Q.

However, we're discussing here a discrete function.

And user previously showed that there always existed an N and a M that, on the way to 80%, was making (N-M)/N reaching the exact value of 75%.

We can now also wonder if 75%=3/4 has something special.We could now wonder are the other values x that (N-M)/N exactly reaches on its way to 80% ?

Take one from the first, two from the second, three from the third and so on.
Take 550 minus the weight on the scale; that result will be the number of the chest with the fake gold.

> objects to Fahrenheit
> doesn't object to dowsing rods
Yeah, that's fine.

Weigh 6 and 6 and see which side is lighter.
Then weigh 3 and 3 and see which side is lighter.
Then weigh 2 and 1 and you can use this to deduce which balls is a different weigh in only 3 attempts.
I'm also extremely stupid so yea, there's that.

You got something exact here, the generalisation say that number on which you will always fall if you go greater are the proportions (n-1)/n. Keep searching a proof :o)

The odd ball might be heavier

My odd ball is heavier.

You let a mice in the room first, then you see if it died from UV-induced cancer

1: turn on first switch
2: wait 1.5 to 2 decades for dimming to start
3: ...

You take the cat with you, leaving the dog and the mouse in the room with the switches. Then you go back alone and collect the dog. Swap the dog and cat. Leave the cat and take the mouse. Leave the mouse with the dog and go back alone for the cat. Then you turn all the switches on and make the last trip, with the cat.