logo Sign In

Riddles — Page 11

Author
Time
*watches warbler die then his own head explodes*
"I don't mind if you don't like my manners. I don't like them myself. They're pretty bad. I grieve over them during the long winter evenings."
Author
Time
I may as well explain how phase 2 works, however firstly let's look at our averages going into it:

~21 people with no token.
~75 people with 1 token.
~3 people with arbitary tokens (2-20).
1 counter

In phase 2 what we aim to do is pair-up all the single tokens, and let the counter collect as well. So after the first cycle you want:

~64 people with no token.
~32 people with 2 tokens.
~3 people with arbitary tokens.
1 counter

Then you want to pair-up all the people with 2 tokens, so half have their tokens removed, and half are now on 4 tokens. You want your algorithim to remember the people with arbitary conts, to convert them to standard counts - and to have the probability to leave no one on on the previous standard count.

That is, when transfering the standard count from 1 to 2, you want no one left with 1 token at the end of it. Simerly when converting 2 to 4 you want no one left with 2 at the end of it. Any left-over people will have to be compleated by phase 3, but we want it so that phase 2 should finish of the counting in most cases.

You also want the arbitary counts to be standardized. That is, while converting the standard count from 1 to 2 you want to convert all odd counts to even. Simerly you want all arbitary counts to be divisible by 4 when conveting the standard count from 2 to 4 and so on...

To do this you need to to impliment stratigic rules. Concider the first cycle:

Rules:

For non-counters:
1. If the light is off and you have an odd number of tokens, then remove one token and turn the light on.
2. If the light is on and you have an odd number of tokens, then add one token and turn the light off.

For the counter:
1. If the light is on then switch it off and add one token to the count.

The last day of the cycle (you don't want this to happen):
1. If the light is on and you have an odd number of tokens, then remove one token and leave the light on.
2. If the light is on, then add one token and turn the light off.

I estimate by the end you should expect to have:

~3 or 4 people on 16 tokens.
~96/95 people on zero tokens.
1 counter. Then let the counter have time to count the max value (16).

Then enter Phase 3 which decreases the ammount the counter counts until it reaches 1 and then stands and runs until the end. Usually it should complete with never entering phase 3.
Author
Time
A solution without going to an arm’s length:
Light starts off. All prisoners are assigned the number 1.
Days go in a 20 day cycle. Days are numbered 1-20. It starts over day 21.

Days 1-19:
If light is off –
If your number is 0, add the number of the previous day. Leave the light on.
If your number is less than 5, subtract one from your number. Leave light off.
If your number is greater than 5, add the previous day number to your number. Leave light on.

If light is on –
If your number is 0, leave it on.
If your number is less than the day in the cycle, keep your number and leave it on.
If your number is greater than the day in the cycle, subtract the day from your number, turn the light off.

On Day 20:
If light is off: add 20 to your number. Leave light off.
If light is on: keep your number, leave light off.

If your number is greater than 50, always leave the light on and never subtract.
If your number is 100, make your assertion.

In English:
Basically, if you leave the light on you are communicating “all the previous days in the cycle are accounted for.” Likewise, if you leave the light off, you are saying “count me and all the days before me.”

At all time there will be 100 “points” totaled. These points are stored either in the day number or by each prisoner. Initially, 1 point is stored by each prisoner. On day 1, he transfers his point from himself to the day (now day = 1 and prisoner = 0). On day 2, supposedly the same thing happens (day=2, another prisoner = 0). Suppose the first prisoner re-enters the room – he assigns himself the previous day (2) and turns the light on (if light is on, the ‘day’ value is 0, if light is off, the ‘day’ value is the day number.) Hooray! We’ve just transferred a point to another prisoner. The goal is to get one guy all 100 points.

Now let’s jump ahead and suppose that 10 prisoners have 10 points each. On day one of a cycle, some poor sap with 0 will walk in and turn the light on, keeping 0 (day 1 – 1) as his number. On day five, a prisoner with 10 walks in. He turns the light off and subtracts 5 from his number. The next day, another prisoner with 10 walks in and sees the light off, and adds 5 to his number. Hooray! We’re still adding up points!

The PROBLEM is, that this algorithm has a distributing effect on the points. That is, the prisoners without points will outnumber the prisoners with points, and this algorithm will favor distributing the points evenly rather than consolidating them. Since the prisoners don’t know who has how many points, they have to give freely; I have not worked out a solution to this problem. I did add in two “valves” of sorts, at 5 and 50, to favor the consolidation rather than distribution of points. That is, once you reach a critical level of points, there are inhibitions to distributing them.

The other problem is, this will work *eventually*. It will take a really long time, and the prisoners would be better off waiting 5 years and taking their chances. That is statistically more advantageous than waiting for my algorithm to get them out; no one would live long enough. In the end, the guy with 1 point would have to go in on day 1 of the cycle and then Mr. 99 would have to follow (which is a 1 in 10,000 chance every 20 days…200,000 days…) and that’s just after we’ve gotten to that point.

I read some more and will look into the solution of changing the arbitrary count. However, two caveats: 1 - it's just less elegant. In a situation like this, it's obviously practical, but I like to find a single recursive solution. 2 - it get's into practical math. If you are going to change the default count number, you have to be assured that everyone is on board. You have to decide ahead of time when to change the count, so you get into probabilities. You can be pretty sure, but you've left the realm of logical solutions. There's always the possibility that the universe will screw you, so you haven't really solved the riddle. Maybe you've found a way around this... my solution doesn't guarantee a solution, but you ARE guaranteed to know when you have or haven't.

I’m enjoying this; I’ll be thinking. It’s comforting to know that other teams of people haven’t found a good solution either, so I don’t have to feel bad giving up eventually.

Does someone want to put out a normal riddle to keep this going?
If you're going to take forever, then I'm having a hotdog!
Author
Time
What confuses me, DanielB, is that at somepoint, you're going to have two prisoners with tokens, or points, or whatever. To dump them off, the one, the counter, will have to directly follow the other one. Each has a 1 in 100 chance in any day, so the chance of a consecutive sequence is 100 x 100 = 10,000. That means that once you get to that point, even if you are able to check every day, the minimum is 10,000 days (I understand it will often happen significantly sooner than that). To execute in 3,000 days, on average, you have to get around this last step somehow, because 3,000 average doesn't come from a 10,000 probability, which doesn't even start on day 1.

?

Should Ric, Daniel, and I discuss this in a separate thread since it killed the riddles-proper?
If you're going to take forever, then I'm having a hotdog!
Author
Time
(I'm triple posting because I'm changing subjects. Sorry)

How is it possible for a common person to throw a ball, have it stop in midair, and return to her (I've been reading law books that use "her" as the neuter singular to be both grammatically and politically correct...), with nothing attached to it and no special equipment?
If you're going to take forever, then I'm having a hotdog!
Author
Time
Throw the ball up.
“Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same in any country.” — Nazi Reich Marshal Hermann Goering
Author
Time
Well, SOME people have had trouble with that one. I guess not you : ) Good work.
If you're going to take forever, then I'm having a hotdog!
Author
Time
Does that and the other thread now mean that we can finally move on to a new (and somewhat reasonable) riddle?
"You fell victim to one of the classic blunders, the most famous of which is 'Never get involved in a land war in Asia'."
--Vizzini (Wallace Shawn), The Princess Bride
-------------------------
Kevin A
Webmaster/Primary Cynic
kapgar.typepad.com
kapgar.com
Author
Time
Quote

Originally posted by: ricarleite
Imagine that there are five filosofers sitting on a round table, each with a plate with spaghetti on it. These filosofers eat the spaghetti using 2 forks at the same time. Now, between each plate there is only one fork, so that a filosofer can see his plate, a fork on the left side, and a fork on the right side. OK? Now, every filosofer will start eating his spaghetti at a random time, eat it for a random time, and stop eating it at a random time, the proceed to eat again, ad infinitum. When a filosofer decides to eat the spaghetti, he'll reach for BOTH forks and proceed to eat. The problem is, if a filosofer grabs a fork, let's say, on his left side, the filosofer to his left can't grab his RIGHT fork, get it? Now, if a filosofer wants to eat, and he can't get both of his right and left forks, he'll just stay there, waiting for the fork. Unfortunally, this can lead to a lock up if every filosofer grabs one fork. Now, you gotta decide a special rule so that this scenario never happens, and the filosofers never lock up.


Since I got the last one right, this is my riddle. It's not as insane as it may seem, it's actually as easy as the ball one.
“Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same in any country.” — Nazi Reich Marshal Hermann Goering
Author
Time
What are the parameters on the special rule? Can I just have one filosopher (generally we spell it philosopher, after the Greek spelling) grab right then left? Or is that a hard constraint on the problem?

Otherwise, can we say he only grabs left if he can see a fork on his right?
If you're going to take forever, then I'm having a hotdog!
Author
Time
ahh, the dining philosopher problem

brings up evil memories from college, Operating Systems class...something about semephores, dont know how i passed that class let alone got an A :-p, but worse yet one class had us code this using some shitty programming language written by a mathmatician using relational algebra....

if i post the code for that program would that be a solution?
Why Anakin really turned to the dark side:
"Anakin, You're father I am" - Yoda
"No. No. That's not true! That's impossible!" - Anakin

0100111001101001011011100110101001100001

*touchy people disclaimer*
some or all of the above comments are partially exaggerated to convey a point, none of the comments are meant as personal attacks on anyone mentioned or reference in the above post
Author
Time
Quote

Originally posted by: Starboy
Can I just have one filosopher (generally we spell it philosopher, after the Greek spelling) grab right then left?


It's almost that. Just think a little bit harder and you'll get it.

And no, no coding please. This is "riddles", not "coding".
“Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same in any country.” — Nazi Reich Marshal Hermann Goering
Author
Time
What about my second possibility above? He doesn't grab unless he's looking at a fork on his right?
If you're going to take forever, then I'm having a hotdog!
Author
Time
OK let me add two things:

The philosofers are "blind".

The philosophers already grab one fork at a time. Imagine all of them grab the left one at the same time, and they all go with their hands to the right one, and of course they won't find the right fork. They'll just wait in that position, and this will lock things up. Now, define a rule for the philosophers to follow, so a lock up never happens.
“Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same in any country.” — Nazi Reich Marshal Hermann Goering
Author
Time
Here's one for you, sean. What do you do with an elephant with 3 balls?

<span class=“Italics”>MeBeJedi: Sadly, I believe the prequels are beyond repair.
<span class=“Bold”>JediRandy: They’re certainly beyond any repair you’re capable of making.</span></span>

<span class=“Italics”>MeBeJedi: You aren’t one of us.
<span class=“Bold”>Go-Mer-Tonic: I can’t say I find that very disappointing.</span></span>

<span class=“Italics”>JediRandy: I won’t suck as much as a fan edit.</span>

Author
Time
Walk him and pitch to the rhinocerous.

<span class=“Italics”>MeBeJedi: Sadly, I believe the prequels are beyond repair.
<span class=“Bold”>JediRandy: They’re certainly beyond any repair you’re capable of making.</span></span>

<span class=“Italics”>MeBeJedi: You aren’t one of us.
<span class=“Bold”>Go-Mer-Tonic: I can’t say I find that very disappointing.</span></span>

<span class=“Italics”>JediRandy: I won’t suck as much as a fan edit.</span>

Author
Time
Sorry, I thought the original question specified that they grabbed left, then right. That's not specified. So let's say four philosophers grab their left fork, then their right for. One philosopher grabs his right fork, then his left fork. This way, they will never lock up.

But the question says they grab BOTH forks...does this constrain the philosophers to a simultaneous grab? Because then they can't grab one at a time...
If you're going to take forever, then I'm having a hotdog!
Author
Time
There was no rule about what fork they grabbed first, but you got it right: if at least one of them grabs the forks in a different order than the others, a lock up will never happen.

Now, would anyone please post a "normal" riddle, now?
“Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same in any country.” — Nazi Reich Marshal Hermann Goering
Author
Time
What is it that, after you take away the whole, some still remains?

I have hands that wave at you,
Though I never say goodbye.
It's cool for you to be with me,
Especially when I say, "HI."
What am I?
Author
Time
The first one has me thinking of a doughnut...
If you're going to take forever, then I'm having a hotdog!
Author
Time
Don't tell me you all gave up?

That's a good one, Starboy, but not what I'm looking for.
Author
Time
Quote

Originally posted by: maddog00

I have hands that wave at you,
Though I never say goodbye.
It's cool for you to be with me,
Especially when I say, "HI."
What am I?


a fan?