Can you help the prisoners communicate using just a light bulb?
There are 100 prisoners about to serve solitary confinement. While imprisoned, no prisoner will have contact with any other prisoner – in fact, they will usually never leave their cells. However, each day the warden will pick a prisoner (either at random or arbitrarily) and lead them from to a sealed interrogation room. In this room there is a light bulb, which the prisoner can toggle on or off. The warden will then ask the prisoner “Have I interrogated each prisoner at least once?” The prisoner can either reply “yes” or decline to answer. If they do answer and are right, all prisoners are released – otherwise, they’re all executed.Before entering solitary confinement, the prisoners will have a chance to confer and come up with a strategy. Your job is to come up with such a strategy to ensure their survival while minimizing their time spent in the prison. Formally speaking, your plan must have a zero chance of getting killed and non-zero chance of freedom.