Erik Reuter wrote:
> 
> On Thu, Feb 13, 2003 at 05:41:26PM -0500, David Hobby wrote:
> >       It seems to me that there could be Rs who never
> > "checked in".  Couldn't an R keep visiting the room and
> > never see B in the up state?  Then they would always do
> > the ELSE clause, S would never get to 22, and they would
> > all stay there indefinitely.
> 
> My description of X's strategy wasn't as clear as it could have been. I
> should have explicitly indicated the "loop":
> 
> Strategy for X:
> 
> Initialize (in X's memory) a signal counter S = 0
> 
> LOOP
>   IF NOT X's first time in room
>     AND state of switch B has changed from where X left it last THEN {
>       IF switch B changed from up to down THEN {yell "Shit!"; break;}
>         ELSE IF switch B changed from down to up THEN increment S
>   }
> 
>   IF S >= 22 THEN declare "Everyone has visited" [much celebration];
> 
>   TOGGLE switch B and remember its state;
> END_LOOP
> 

        I think that's how I read it the first time.
Look, when switch B is down, the warden takes one of the Rs
into the switch room 100 times in a row.  That should hold 
until the switch is down again.  And X keeps toggling B,
so it should be down again pretty soon.

                                        ---David
_______________________________________________
http://www.mccmedia.com/mailman/listinfo/brin-l

Reply via email to