I need some riddles.

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

mordantmonkey

Diamond Member
Dec 23, 2004
3,075
5
0
but you don't necessarily have 2 weighings left.
suppose the first two groups you weigh don't balance. you know the od ball is in one but you don't know which. is it lighter or heavier?
then what?... unsolveable with 2 weighings left
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: mordantmonkey
3^3? no you don't
No you don't what? That is the theoretical maximum that you can discover in 3 weighings. In n weighings you can discover at most 3^n things. It is a trinary decision tree instead of a binary one.
 

amoeba

Diamond Member
Aug 7, 2003
3,162
1
0
you can't discover 9 things in 2 weigh ins if you don't know whether odd ball is lighter or heavier.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: mordantmonkey
but you don't necessarily have 2 weighings left.
Yes you do. The first weighing creates the 2 different groups. It then shows how to solve for whichever of those 2 groups you have in 2 weighings. Why would you have less than 2 weighings left? Did you waste it weighing your crack? ;)
 

yoda291

Diamond Member
Aug 11, 2001
5,079
0
0
Originally posted by: chuckywang
Originally posted by: shuan24
Originally posted by: chuckywang
Originally posted by: Kyteland
Originally posted by: chuckywang
Originally posted by: Kyteland

A dragon and a knight lived in a valley. In this valley there were six poison wells on the side of a mountain. The wells contained a very strange kind of poison. If you drank from a lower level well, you would die unless you drank from a higher-level well within a day after drinking.

That is to say, if you drank from the first well, you could save yourself by drinking from the second, third, fourth, fifth, or sixth. If you drank from the fifth well, you could only survive by drinking from the sixth well. Drinking from a second well doesn't re-poison you, it only saves you.

Both the knight and the dragon could get water from the first five wells, but only the dragon could get water from the sixth well because it was so high up. One day, the knight and the dragon got tired of sharing the valley and decided to have a duel. They would each bring two glasses of water and give one glass to the other. And then the other would have to drink it. Then they would drink the second glass, which they brought for themselves.

On the day of the duel, the knight and the dragon met. They exchanged glasses and drank the water in the glasses. Then they drank the water in their second bottle. The dragon died and the knight lived. Why?

So if you drink from the sixth well, nothing can save you?

Correct.

It seems to me that if the dragon brings in two glasses of well #6, then he cannot die and the knight would die. First he drinks a glass of whatever the knight gives him, and then drinks well #6 to save himself. At the other side, the knight would have to drink the well #6 water that the dragon gave him and then nothing can save him.


there doesn't seem to be a logical answer to this one....the answer is probably hidden, like "the knight switched the glasses before he drank it" or something like that.

I suppose if somehow the knight got regular, run of the mill water, then he could kill the dragon by giving him that glass. But I don't see how he could save himself.

I've almost got it I think.
He drinks from well 1 before arriving to the competition. So whichever bottle the dragon brings(including 6), he cures himself. it doesn't work tho because if the dragon brings water from well 1, he's screwed. If he brings water from well 2 as his second drink to compensate for dragon bringing water from (1), and the dragon brings water from well 6, he screws himself.
 

amoeba

Diamond Member
Aug 7, 2003
3,162
1
0
Originally posted by: mordantmonkey
but you don't necessarily have 2 weighings left.


right, which is why I'm confused as to how it works when the first weigh in doesn't balance.

Say I divide in to 3 3 and 2 which would be the logical thing to do and weigh the 3s on the 2nd try.

lets say the 3s don't balance.

now, do I pick the lighter group of 3s or do I pick the heavier group of 3s for the 3rd weigh in?

I don't know because I don't know whether the odd ball out is lighter or heavier than the rest of the balls.
 

mordantmonkey

Diamond Member
Dec 23, 2004
3,075
5
0
Originally posted by: amoeba
you can't discover 9 things in 2 weigh ins if you don't know whether odd ball is lighter or heavier.

that's why.

this is solvable if you know it is heavier or lighter. other wise not with only 3 weighs. it's possible with 3 but not guaranteed.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: amoeba
you can't discover 9 things in 2 weigh ins if you don't know whether odd ball is lighter or heavier.

That's the thing though. The first weighing splits it in to 2 groups. A group of 4 where you don't know if it is lighter or heavier, and a group of 8 where you *do* know whether it is lighter or havier. Remember, it it is in the group of 4 that moved up it must be either lighter or good. If it is in the group that meved down it must be heavier or good.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: yoda291
I've almost got it I think.
He drinks from well 1 before arriving to the competition. So whichever bottle the dragon brings(including 6), he cures himself. it doesn't work tho because if the dragon brings water from well 1, he's screwed. If he brings water from well 2 as his second drink to compensate for dragon bringing water from (1), and the dragon brings water from well 6, he screws himself.
You're thinking too hard. The dragon will bring water from group 6 because he's just a stupid dragon, and not as smart as the human. ;)

To make it a real game theory problem, the dragon and the human have to know all possible strategies for the other and then it is possible for either to lose. Given that the dragon died and the knight didn't you know that dragon had to bring water from well 6 though.
 

mordantmonkey

Diamond Member
Dec 23, 2004
3,075
5
0
Originally posted by: Kyteland
Originally posted by: mordantmonkey
but you don't necessarily have 2 weighings left.
Yes you do. The first weighing creates the 2 different groups. It then shows how to solve for whichever of those 2 groups you have in 2 weighings. Why would you have less than 2 weighings left? Did you waste it weighing your crack? ;)

ok, A B and C. A and B if they balance you know the odd ball is in C, but...

if they don't balance then the odd ball could be in A OR B. now you stuck with the sam problem but 8 balls and only 2 weighs. could be in group a or b, no way to tell cause it could be lighter or heavier. how do you get a solution from this scenario?

one possibility i see from this is you have it down to two balls and no weighings
 

amoeba

Diamond Member
Aug 7, 2003
3,162
1
0
ok Kyteland, I'll go through my logic one more time and you point out where I have a problem.

we all agree on the first weigh in.

you randomly divide in to 3 groups. you weigh 4 and 4.

now, one group of 4 is heavier, one group is lighter. you know the odd ball is in this group of 8.

now you divide the 8 in to 3 3 and 2.

you weigh 3 and 3.

one is heavier, one is lighter.

now what do you do?

 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: amoeba
Originally posted by: mordantmonkey
but you don't necessarily have 2 weighings left.


right, which is why I'm confused as to how it works when the first weigh in doesn't balance.

Say I divide in to 3 3 and 2 which would be the logical thing to do and weigh the 3s on the 2nd try.

lets say the 3s don't balance.

now, do I pick the lighter group of 3s or do I pick the heavier group of 3s for the 3rd weigh in?

I don't know because I don't know whether the odd ball out is lighter or heavier than the rest of the balls.


The secon weiging splits it in to 3 groups: a group of 3 and it must be lighter, a group of 3 and it must be heavier, and a group of 2 where you don't know. But what I'm calling a single thing isn't just a single golf ball, but a single outcome. Ball 12 is heavier, ball 12 is lighter. Those are considered 2 thing. Ball 12 is unknown is also considered 2 things because it can be one of two outcomes.
 

shuan24

Platinum Member
Jul 17, 2003
2,558
0
0
the monkey's right. If the first group of 8 doesn't balance, and you split it up 3-3-2, and the second group of 6 doesn't balance, it would be impossible to know which ball is odd from 1 more try.

OR basically, 3^1 < 6. (6 because you don't know which group of 3 contains the odd ball)
 

amoeba

Diamond Member
Aug 7, 2003
3,162
1
0
Originally posted by: Kyteland
Originally posted by: yoda291
I've almost got it I think.
He drinks from well 1 before arriving to the competition. So whichever bottle the dragon brings(including 6), he cures himself. it doesn't work tho because if the dragon brings water from well 1, he's screwed. If he brings water from well 2 as his second drink to compensate for dragon bringing water from (1), and the dragon brings water from well 6, he screws himself.
You're thinking too hard. The dragon will bring water from group 6 because he's just a stupid dragon, and not as smart as the human. ;)

To make it a real game theory problem, the dragon and the human have to know all possible strategies for the other and then it is possible for either to lose. Given that the dragon died and the knight didn't you know that dragon had to bring water from well 6 though.



knight should still drink from well 1 previous to duel as that is probabilistically his best chance of survival.

But if its real game theory, anything can happen.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: amoeba
ok Kyteland, I'll go through my logic one more time and you point out where I have a problem.

we all agree on the first weigh in.

you randomly divide in to 3 groups. you weigh 4 and 4.

now, one group of 4 is heavier, one group is lighter. you know the odd ball is in this group of 8.

now you divide the 8 in to 3 3 and 2.

you weigh 3 and 3.

one is heavier, one is lighter.

now what do you do?

Actually, you still need to weigh groups of 4, but in such a way to split your decision tree in to groups of 3-3-2

So 1,2,3,4 are "lighter" 5,6,7,8 are "heavier"

Weigh 1,2,3,5 against 4,10,11,12. If it goes up then the ball is either 1,2,3. If it balances then it is 6,7,8. If it goes down it is 4,5. For there it is easy.

That is what I mean when I say groups of 3-3-2. I'm talking about groups of *outcomes* not groups of balls. That's where the confusion is.
 

amoeba

Diamond Member
Aug 7, 2003
3,162
1
0
Originally posted by: Kyteland
Originally posted by: amoeba
Originally posted by: mordantmonkey
but you don't necessarily have 2 weighings left.


right, which is why I'm confused as to how it works when the first weigh in doesn't balance.

Say I divide in to 3 3 and 2 which would be the logical thing to do and weigh the 3s on the 2nd try.

lets say the 3s don't balance.

now, do I pick the lighter group of 3s or do I pick the heavier group of 3s for the 3rd weigh in?

I don't know because I don't know whether the odd ball out is lighter or heavier than the rest of the balls.


The secon weiging splits it in to 3 groups: a group of 3 and it must be lighter, a group of 3 and it must be heavier, and a group of 2 where you don't know. But what I'm calling a single thing isn't just a single golf ball, but a single outcome. Ball 12 is heavier, ball 12 is lighter. Those are considered 2 thing. Ball 12 is unknown is also considered 2 things because it can be one of two outcomes.


the group of 3 could equal the group of 3 and the weird ball be in the group of 2. in fact you would want that result as you can just take one of the 2 and weigh it against any of the other 10 that you know already match.

however, if the group of 3s do not balance. you are stuck on the 3rd weigh in.

 

mordantmonkey

Diamond Member
Dec 23, 2004
3,075
5
0
Originally posted by: Kyteland
Originally posted by: amoeba
Originally posted by: mordantmonkey
but you don't necessarily have 2 weighings left.


right, which is why I'm confused as to how it works when the first weigh in doesn't balance.

Say I divide in to 3 3 and 2 which would be the logical thing to do and weigh the 3s on the 2nd try.

lets say the 3s don't balance.

now, do I pick the lighter group of 3s or do I pick the heavier group of 3s for the 3rd weigh in?

I don't know because I don't know whether the odd ball out is lighter or heavier than the rest of the balls.


The secon weiging splits it in to 3 groups: a group of 3 and it must be lighter, a group of 3 and it must be heavier, and a group of 2 where you don't know. But what I'm calling a single thing isn't just a single golf ball, but a single outcome. Ball 12 is heavier, ball 12 is lighter. Those are considered 2 thing. Ball 12 is unknown is also considered 2 things because it can be one of two outcomes.

the fact that this doesn't make any sense makes me think your probability math sucks. work it out in a scenario basis and you will see why it can't be done. then figure out the math of it and let me know.
 

mordantmonkey

Diamond Member
Dec 23, 2004
3,075
5
0
Originally posted by: shuan24
the monkey's right. If the first group of 8 doesn't balance, and you split it up 3-3-2, and the second group of 6 doesn't balance, it would be impossible to know which ball is odd from 1 more try.

OR basically, 3^1 < 6. (6 because you don't know which group of 3 contains the odd ball)

shut up, you racist bastard! ;)
 

shuan24

Platinum Member
Jul 17, 2003
2,558
0
0
ok I followed your instructions for the second weigh in. Now you've narrowed it down to balls 1, 2, 3. You only have one weigh left. How do you know which ball is lighter/heavier? You still have the 3^1 < 6 scenario.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: mordantmonkey
the fact that this doesn't make any sense makes me think your probability math sucks. work it out in a scenario basis and you will see why it can't be done. then figure out the math of it and let me know.
The reason it makes no sense is that I'm calling a group something different than you. I'm talking about groups of outcomes. You are talking about groups of balls. Big difference.

The first weighing splits the balls in to 3 *outcome* groups of 8-8-8, (for a total of 24 outcomes) and you know which group the off ball is in by how the scale moves. The second weiging takes that group of 8 and splits it in to to 3 more *outcome* groups of 3-3-2, and you know which group has the odd ball by the outcome of the weighing. The third weighing trivially solves for either the outcome groups of 2 or 3, and you have the ball and its weight.

Does that make more sense?
 

amoeba

Diamond Member
Aug 7, 2003
3,162
1
0
Originally posted by: Kyteland
Originally posted by: amoeba
ok Kyteland, I'll go through my logic one more time and you point out where I have a problem.

we all agree on the first weigh in.

you randomly divide in to 3 groups. you weigh 4 and 4.

now, one group of 4 is heavier, one group is lighter. you know the odd ball is in this group of 8.

now you divide the 8 in to 3 3 and 2.

you weigh 3 and 3.

one is heavier, one is lighter.

now what do you do?

Actually, you still need to weigh groups of 4, but in such a way to split your decision tree in to groups of 3-3-2

So 1,2,3,4 are "lighter" 5,6,7,8 are "heavier"

Weigh 1,2,3,5 against 4,10,11,12. If it goes up then the ball is either 1,2,3. If it balances then it is 6,7,8. If it goes down it is 4,5. For there it is easy.

That is what I mean when I say groups of 3-3-2. I'm talking about groups of *outcomes* not groups of balls. That's where the confusion is.



hmm you are right. good riddle. I think its easier explained if you said if 1235 goes up, the ball is in 123 and its lighter, if it balances, then the ball is in 678 and its heavier and if it goes down, its in 4,5 and its lighter if its 4 heavier if its 5.

nice one. got me good.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: shuan24
ok I followed your instructions for the second weigh in. Now you've narrowed it down to balls 1, 2, 3. You only have one weigh left. How do you know which ball is lighter/heavier? You still have the 3^1 < 6 scenario.
By the time it moves to 1,2,3 you have to know whether it is lighter or heavier. You know this from the first weighing, where the group 1,2,3,4 either moved up making it lighter or moved down making it heavier. Say it's lighter for this wxample. At that point you weigh 1 vs 2. It is balances it is 3 and lighter. Otherwise it is whichever ball 1 or 2 that rises.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: amoeba
hmm you are right. good riddle. I think its easier explained if you said if 1235 goes up, the ball is in 123 and its lighter, if it balances, then the ball is in 678 and its heavier and if it goes down, its in 4,5 and its lighter if its 4 heavier if its 5.

nice one. got me good.
Sorry that wasn't clear. I'm trying to slam out a bunch of work before I go home for the day and answer questions here and I'm not doing either one very well. ;)