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)
Problem
Source: Tournament of Towns Spring 2015 Senior A-level
Tags: combinatorics
25.02.2017 21:32
30.04.2020 12:22
um.. nice problem. name wizards $A_1,A_2,.. , A_{2015}$ ask from all of them : $A_1$ is good wizard?( only for $A_1 $ you should ask : the persons who say yes to quastion are good?) case 1: all of them have same answer . if $A_1$ be a good wizard then from the question which we ask from him we can find other wizards reality . if $A_1$ be bad you can do this algorithm until arrive to good wizard . case2: at least two of them have opposite answer . if $A_i , A_j$ (it means at least one of them is liar (bad) which when you expel the $A_1$ YOU CAN FIND THEM REALITY)have opposite answer ask from $A_1 $ the persons which said yes are good? ( note that you do this algorithm when $A_1$ is good . because if $A_1$ not be a good wizard you do this algorithm until arrive to a good wizard.) with this algorithem we can find all of bad wizards.
30.04.2020 16:24
utkarshgupta wrote: 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) I found another solution different from the above two I will ask a wizard about all other wizards and then expel him . If he was a good wizard then I have my answer . If he was a evil wizard then I have one less evil wizard . I will repeat this process for all wizards and get my answer .
30.04.2020 16:37
arzhang2001 wrote: um.. nice problem. name wizards $A_1,A_2,.. , A_{2015}$ ask from all of them : $A_1$ is good wizard?( only for $A_1 $ you should ask : the persons who say yes to quastion are good?) case 1: all of them have same answer . if $A_1$ be a good wizard then from the question which we ask from him we can find other wizards reality . if $A_1$ be bad you can do this algorithm until arrive to good wizard . case2: at least two of them have opposite answer . if $A_i , A_j$ (it means at least one of them is liar (bad) which when you expel the $A_1$ YOU CAN FIND THEM REALITY)have opposite answer ask from $A_1 $ the persons which said yes are good? ( note that you do this algorithm when $A_1$ is good . because if $A_1$ not be a good wizard you do this algorithm until arrive to a good wizard.) with this algorithem we can find all of bad wizards. You can only know if A is good or bad after expelling him. Once expelled you can't ask him anything anymore
30.04.2020 20:07
i asked it before expelling him . result not important we ask this from $A_1$ if expelling $A_1$ and understand $A_1$ is bad we do algorithm again it means all you do for $A_1$ do for $A_2$ ,...until $A_i$ be a good wizard.
01.05.2020 05:58
pagol wrote: I will ask a wizard about all other wizards and then expel him. I think you can ask only one question at a time. No doubt your algorithm works pretty well, but it will take maximum time to give output. For example, think of the worst situation. Say, you ask all the wizards about all others, so you have $2015$ answers strings. Now, you put one of them in the test. If he turns to be evil, then you get him out. And repeat this again, then you will have $2014$ answers strings. Now if again it turns to be evil, you have to repeat for again $2013$ steps. Just like that. It should have a shorter algorithm. Though it is a correct answer that satisfies the condition that "put at most one wizard to the test to identify all evil wizards."