The Counter and the Flag
researchers are quarantined in separate wings of a facility with no way to contact one another. Each day the warden escorts one uniformly random researcher (chosen independently each day) into a courtyard containing a single signal flag, initially lowered; the visitor may raise it, lower it, or leave it alone, and nobody else can see it. At any time, any researcher may declare that all have visited the courtyard: a correct declaration releases everyone, an incorrect one condemns them all. They may strategize only before the first visit. What strategy guarantees eventual release?
Answer
Free accounts unlock one worked solution a day. Pro includes every answer.
