Problem

Source: Tournament of Towns Spring 2015 Senior A-level

Tags: combinatorics



An Emperor invited $2015$ wizards to a festival. Each of the wizards knows who of them is good and who is evil, however the Emperor doesn’t know this. A good wizard always tells the truth, while an evil wizard can tell the truth or lie at any moment. The Emperor gives each wizard a card with a single question, maybe different for different wizards, and after that listens to the answers of all wizards which are either “yes” or “no”. Having listened to all the answers, the Emperor expels a single wizard through a magic door which shows if this wizard is good or evil. Then the Emperor makes new cards with questions and repeats the procedure with the remaining wizards, and so on. The Emperor may stop at any moment, and after this the Emperor may expel or not expel a wizard. Prove that the Emperor can expel all the evil wizards having expelled at most one good wizard. ($10$ points)