Here's a rewrite of my solution. I also simplified it by assuming that
no one ever deviates from their stated strategy. Remember, there is one
guy called X, and everyone else is in group R.
--------------------
Strategy for X:
#this is done only once, during the strategy session
Initialize (in X's memory) a signal counter S = 0
ON EACH VISIT {
IF ( (NOT X's first time in room) AND (switch B is up) and (Q=down) )
THEN increment S;
IF S >= 22 THEN declare "Everyone has visited" ;
TOGGLE switch B and set Q = state where X left it after toggling
} ENDON
-----------------------
Strategy for all R's:
#done only once, during the strategy session, for each R
#note that each R maintains his only internal counters for U and T
#that is, there are 22 U counters and 22 T counters, with each
#R having their own U & T counters
set U = 0
set T = 0
ON EACH VISIT {
IF ( (U=0) AND (switch B = up) ) THEN set U=1;
IF ( (U=1) AND (T=0) and (switch B = down) ) THEN { set switch B = up;
set T=1 } ELSE TOGGLE switch A
} ENDON
--
"Erik Reuter" <[EMAIL PROTECTED]> http://www.erikreuter.net/
_______________________________________________
http://www.mccmedia.com/mailman/listinfo/brin-l