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