On Mon, Feb 17, 2003 at 12:20:36AM -0500, David Hobby wrote:
> 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.

You lost me. If the warden takes an R in for the first time with switch
B down, and then takes him back 100 times in a row, nothing will happen
during those hundred trips, true. But eventually X will be taken in
again, flip it up, then eventually R will see it up, then eventually X
will flip it down, then eventually R will see it down again. It has to
happen eventually.


-- 
"Erik Reuter" <[EMAIL PROTECTED]>       http://www.erikreuter.net/
_______________________________________________
http://www.mccmedia.com/mailman/listinfo/brin-l

Reply via email to