![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Sep 2003
Posts: 5,250
|
Expert Riddle
I bet noone will get this extremely hard riddle
100 prisoners are imprisoned in solitary cells. Each cell is windowless and soundproof. There's a central living room with one light bulb; the bulb is initially off. No prisoner can see the light bulb from his or her own cell. Each day, the warden picks a prisoner equally at random, and that prisoner visits the central living room; at the end of the day the prisoner is returned to his cell. While in the living room, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven't been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity. Before this whole procedure begins, the prisoners are allowed to get together in the courtyard to discuss a plan. What is the optimal plan they can agree on, so that eventually, someone will make a correct assertion? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Guest
Posts: n/a
|
each prisoner twists the lightbulb 1 time
when a prisoner enters, he can check which one he is but undoing the twists and counting the number he then redoes thes number of twists + 1, to show that he was there the prisoner that sees that the lightbulb has been twisted 99 times can claim that he is the 100th person to be in that room |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jun 2002
Location: Connecticut.
Posts: 1,358
|
so basically the riddle is, how can the prisoners deduce from the toggled light bulb that everyone was in the room...
what bdjuf said. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Mar 2004
Location: North East Jabumfuck
Posts: 415
|
42
__________________
fuck you |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Jun 2003
Location: Dirty Dirty Dirty Dirty South
Posts: 965
|
Quote:
ahhh..the riddle in the riddle...lol
__________________
CLICK HERE FOR SOME EXTREME PAYCHECKS 178.247.277 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: May 2003
Posts: 2,594
|
Quote:
__________________
new search |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Sep 2003
Posts: 5,250
|
so do you guys give up. its a really hard one. and im not surprised if noone got it
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Guest
Posts: n/a
|
Quote:
|
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
the first one that goes in turn off the light. when he is called again..noone else may touch the switch.the light will be still off so he knows everybody has been in.
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Sep 2003
Posts: 5,250
|
Here's the answer that ive got
As before, the prisoners choose an 'announcer' among them. Then they agree on the following procedure: - each prisoner keeps a counter, which is initially 1. - the bulb has a value assosiated with it, which is - 0 for night number 0 - 1 for nights number 1... 800 - 2 for nights number 801...1600 - 4 for nights number 1601...2400 - 8 for nights number 2401...4540 - 2 for nights number 4541...5340 - 1 otherwise. (day 1 shall be the day when the first prisoner enters the room; the night number n shall be between the days n and n+1). - now, when a prisoner enters the room, he does the following: - check if the bulb burns and add the value of bulb (for the previous night) to their counter if that's the case. - if the counter is 100 (this usually only happens for the 'announcer'), announce that every prisoner has been to the room. - for days 1..2400, if the binary representation of the counter contains 1 in the digit corresponding to the value of the bulb for the next night, switch on the bulb, switch it off otherwise. - for days 2401 and the following days, if their counter is greater or equal to the value of the bulb for the next night, switch on the bulb, and switch it off otherwise. - the 'announcer' switches the bulb off for days 801 and all following days. - if the bulb is burning, reduce their counter by the value of the bulb for the next night. The idea here is to calculate the sum (which is known from the beginning) of all the counters of the prisoners to a single prisoner (usually the 'announcer'). The sum [value of bulb if it's burning] + counters of all prisoners remains constant throughout the process, and all counters of the prisoners remain non-negative. This means that if the counter ever reaches 100 for a prisoner, all other prisoners have to have been to the living room. The speedup results from the fact that the chance that after the first 800 days, every prisoner's count is either 0 or 2, and that after the first 1600 days every prisoner's count is either 0 or 4, and that after the first 2400 days, every prisoner's count is either 0 or 8 except for the 'announcer', and that after at most 4540 days, the 'announcer''s count reaches 100 is pretty high. Computer simulation of 500,000 runs gives: average standard min max deviation 3948.319 628.189 2850 10000 The parameters in the procedure were hand-tuned; so there is no reason to believe that they're optimal. Btw, for those who're interested: A method which requires 4.2 Mio days on average is the following: - assign each prisoner a number 0..99. - again, each prisoner keeps a counter which is initially 0 though (and serves a different purpose than the counter above) - on each day, the prisoner entering the room does the following: - let n be the day number, minus 1, modulo 100. - if the bulb is off and n equals their number, set their counter to n+1. announce that everyone has been to the room if their number is 99. - else, if the bulb is off and n is greater than our counter, set our counter to n. - switch on the bulb if our counter is less than or equal to n; switch it off otherwise. The problem here is, that to increase the maximum counter by one, someone who knows the current maximum counter must enter the room on a day with n=counter-1, and, on the following day, the prisoner with the number equal to the current maximum counter must enter the room. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Join Date: Sep 2003
Posts: 5,250
|
Quote:
But what if he is called on the first day and the 3rd day. 98 prissoners still werent in the room |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
more simple...after 100 days they all have been there.
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
Quote:
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Pixel Pusher
Industry Role:
Join Date: Nov 2002
Posts: 7,093
|
Quote:
![]() ![]()
__________________
[email protected] |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Dec 2003
Location: Lincoln, NE
Posts: 2,018
|
I must be high
__________________
ICQ #286508534 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Join Date: Jan 2003
Location: United States of America
Posts: 1,159
|
the can get together and devise a plan where each time a prisoner is in the room, he takes a single shit in the corner. eventually, when that one prisoner enters and counts the 100 pieces of shit, then he can assert that 100 prisoners have been in the living room.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Confirmed User
Join Date: May 2003
Posts: 2,594
|
Quote:
__________________
new search |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
I have found the source of the riddle and its not realy a riddle. The besy sequence will take 29 years. Its a theoritical problem from stanford.
the link riddle
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Too lazy to set a custom title
Join Date: Oct 2002
Location: Global Traveler
Posts: 51,271
|
Damn, I'm too lazy to read that long riddle.
But I guess, I can't get it either. Oh well, good luck to those whose trying to sort it out. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
Relatively easy.
- One prisoner is designated as the 'caller'. He'll be the one saying everyone has visited. The first time he goes in, he turns the light off. - Every other prisoner will turn the light on if it is their first time in an unlit room. - Every time the 'caller' arrives to the room, he turns off the light and increments his count. When he reaches 99, he can declare and everyone goes free. No major math insanity, just a little planning. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | |
Confirmed User
Join Date: Jun 2002
Location: Connecticut.
Posts: 1,358
|
Quote:
almost spit out my asia plum arizona green tea |
|
![]() |
![]() ![]() ![]() ![]() ![]() |