
- Time
- Post link
Quote
Originally posted by: Starboy
Daniel, have you found a solution to this, or am I just too pessimistic about the probability? Does the math work out like the "two people in the room with the same birthday" problem? No...it can't. Hmmm...
QuoteWell he has to know in which specified period the switch was turned on. If the light is on at the end of such a period then the person visiting on the last day must take the tokens. He can, however, turn the light switch on, or leave it on on such days if he leaves the required number of tokens in the light switch.
Originally posted by: Starboy
You have two variable holders: the lightbulb and the day. If the counter does not need to know when the light switch was turned on, all he has is the lightbulb variable...
So that's why you have the standard count, so he knows how many to add. Interesting...
Quote
Originally posted by: DanielB
Here are the full rules for each phase:
Phase 1:
For days 1 to n-1 of an n day cycle:
1. If the light is off and you have one token then remove it and leave the light off.
2. If the light is off and you have zero tokens then turn the light on and add to your count DayNumber - n. Turn the light on. If this was the first cycle then you are now the counter.
3. If the light is off and you are the counter then turn it on. Add Daynumber - n to your count.
Quote
Originally posted by: WarblerQuote
Originally posted by: DanielB
Here are the full rules for each phase:
Phase 1:
For days 1 to n-1 of an n day cycle:
1. If the light is off and you have one token then remove it and leave the light off.
2. If the light is off and you have zero tokens then turn the light on and add to your count DayNumber - n. Turn the light on. If this was the first cycle then you are now the counter.
3. If the light is off and you are the counter then turn it on. Add Daynumber - n to your count.
this, to me makes no sense. Lets say that the 1st cycle is 20 days. Lets also say on day 10 someone goes into the room for the 2nd time and the light is off. According to your directions, that person is supposed to add to their count(which I guess starts out at zero, you don't indicate where the count starts at), the daynumber(which is 10)-n(which is 20).
0+(10-20)= -10????????????