Before you stands a panel of 100 identically appearing councilmen. These men have extremely valuable information that your nation requires, however, you must first overcome a small snag - it is known that 50 of the councilmen are consistent liars, never replying truthfully to a question, while the other 50 always speak the truth. However, we have no idea which of them are the liars, and which are the truth-tellers.
All of the councilmen know which of them are truth-tellers, and which are liars. Your task is to determine, with certainty, which are truth-tellers, and which are liars. You may ask any yes-or-no question, but only to one councilman at a time. What is the minimum number of questions you need to be allowed to ask to be certain that you can determine every councilman's alignment, for all cases?
Details:
For formality: Let S be the set of all questioning strategies, let C be the set of all entire councilmen alignments, and let f : S × C → Z + be the number of questions it takes a given strategy s ∈ S to unambiguously determine entire councilmen alignment c ∈ C .
You may vary your questions based on the answers you've already received. For example, you may have two "Question #2"'s, one for if the answer to "Question #1" is 'yes', and the other if it's 'no'. You may also vary the councilmen you query in this manner.
The questions must be logically sound, and have a single, consistent 'yes' or 'no' answer. "Is this statement false?" is not a logically sound question.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
By asking a minimum of four questions (two to each) to 2 of the councilmen i can determine the liar from the truthteller (or both liars/truthtellers). After this all i need to ask either the liar or truthteller is to identify all the other truthtellers and liar. So min. 5 question ?
Log in to reply
"Identify all the other truthtellers and liars" is not a yes-or-no question.
I might be missing something.. But if we ask " is there exactly 100 councilmen here?" , it would take 50question to determine.
Log in to reply
It might take only 50 to determine, if you get lucky and happen to ask all 50 liars, or all 50 truthtellers in a row, but that's almost surely not going to happen. You cannot guarantee that you will know the answer in 50 questions with that strategy, you'd need 99 for that.
since we know all are councilmen..simply asking "are you a woman?" would suffice?
What if i ask a question whose correct answer i know and the first fifty persons answer correctly then the minimum no. Of times can be 50?Pls help me i am a bit confused.for example :does sun rise from east.
Log in to reply
It can be 50, but the problem asks for the worst-case scenario.
I think that you can get it in 96 questions.
You are using the calculation 100 C 50 to get the truthfulness of everyone, but do you really need to get the truthfulness of everyone? You only need it of 99 people, because the last one you can infer. Therefore there are only 99 C 50 possibilities you need to worry about (or 99 C 49). This number ~= 2^95.3, so it should be possible to get it in 96. Right?
Log in to reply
This argument is not quite correct. Of any 99 people, there may be either 50 truth tellers and 49 liars, OR 49 truth tellers and 50 liars. There are (99 C 50) ways for the first to occur, and (99 C 49) for the latter to occur, so there are (99 C 50) + (99 C 49) possibilities. It turns out this number is exactly (100 C 50) due to the recursive relationship in Pascal's triangle, so the answer is unchanged.
(In other words, your strategy would work, but it would require exactly as many questions as the listed solution.)
I think the solution can be smaller. We can ask in p described in the above solution "is the (nth bit of the base 3 conversation of the combination -2)^1/2 greater than 0 ?
We can ask some ridiculous questions. It is not clear what kind of questions we can ask.
going by the trivial solution of 99, query Are you a liar will be anwered No by both liars and truth-tellers, so what are we inferring?
Log in to reply
Nothing if you ask it directly, but if you embed the question as:
"If I were to ask you, ’Are you a liar?’, would you say yes?"
Then you would get the answer to the question 'Are you a liar?'
Firstly, we know that there are ( 5 0 1 0 0 ) way to arrange the liars and truth tellers. Each question we asked only have two possible outcomes either Y E S or N O . The n question we asked, we have 2 n possible outcomes.
2 n ≥ ( 5 0 1 0 0 )
Since the equation contains the factorial of larger number, we can use S t i r l i n g ′ s a p p r o x i m a t i o n during calculation. Lastly, we get
n ≥ 9 6 . 3 5 , n = 9 7
i would ask are you a man if they say not they r liar if they say yes they speak the truth
Let's assume you're really good at thinking up questions, what's the mininum number of questions you would need to ask in order to distinguish between all the possibilities?
Well, how many possibilities are there? First, give the panel an arbitrary ordering, say there is some 1st member, some 2nd member, and so on.
If there are only 2 people and 1 of them is a liar, there are only two possibilities. Either the first person is a liar, or the first person tells the truth. So theoreticially, it should take just one question solve the problem. (It turns out asking the first guy "if I asked the second guy whether you were a liar, would he say yes?" works)
Now, say there are 4 people, and 2 of them are liars. There are 6 possible orderings those people could have; it is impossible to solve by asking fewer than l o g 2 ( 6 ) = 2 . 5 8 questions.
With 100 people, 50 of which are liars, there are l o g 2 ( ( 5 0 1 0 0 ) ) ≈ 9 6 . 3 possibile orderings, so with 97 perfectly chosen questions you ought to find the answer.
Problem Loading...
Note Loading...
Set Loading...
The first thing we need to see is that we can actually get any piece of information we want from any councilmen, regardless of whether they are a liar or not. For any proposition P of which we want to know its truthiness, simply ask the question:
"If I were to ask you if P was true, would you say ’yes’?"
Go ahead and walk through the cases to see for yourself. Both truthtellers and liars will reply 'yes' if P is true, and 'no' otherwise. If you have ever studied the hardest logic puzzle ever , this might be familiar to you.
So what can we verify? Well, we can let P be, for each councilmen, "Are you a liar?" , and in so doing we could determine who's who in not 1 0 0 , but 9 9 questions, since the alignment of the last councilman can always be determined by knowing the alignments of the other 9 9 . However, this isn't optimal - we can do better.
We are given at the start that exactly 5 0 of the councilmen are liars. Therefore, there are not 2 1 0 0 unique possibilities, but rather ( 5 0 1 0 0 ) . And a calculator will show that:
2 9 6 < ( 5 0 1 0 0 ) < 2 9 7
So, from an information theory perspective, we only need 9 7 bits of information to uniquely identify the alignments of all of the councilmen - this is a lower bound on the number of questions we must ask, as, mathematically, it's not possible to produce greater than 2 9 6 possible answers with only 9 6 questions.
Because we can determine the truthfulness of any proposition P , we can easily identify the answer in 9 7 questions! We simply ask questions akin to binary search.
First, we enumerate all ( 5 0 1 0 0 ) possible alignment patterns, give each one a number in binary, and ask any councilmen, using the previously described format, of the proposition P = "Is the n -th bit of the correct configuration 1 ?" . Since there are only 9 7 bits to consider, asking these 9 7 questions will uniquely determine the answer.
Since the theoretic lower bound is 9 7 , and a strategy exists to get the answer in 9 7 questions, the minimum number of questions we must ask is precisely 9 7 .