Liars, Liars, Everywhere

Logic Level 5

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 S be the set of all questioning strategies, let C C be the set of all entire councilmen alignments, and let f : S × C Z + f : S \times C \rightarrow \mathbb{Z}^+ be the number of questions it takes a given strategy s S s \in S to unambiguously determine entire councilmen alignment c C c \in C .

    • The answer we seek is min s S ( max c C f ( s , c ) ) \min\limits_{s \in S} \left( \max\limits_{c \in C} f(s,c) \right) .
  • 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.


The answer is 97.

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.

3 solutions

Daniel Ploch
Sep 13, 2014

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 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’?" \text{"If I were to ask you if }P\text{ 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 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 P be, for each councilmen, "Are you a liar?" \text{"Are you a liar?"} , and in so doing we could determine who's who in not 100 100 , but 99 99 questions, since the alignment of the last councilman can always be determined by knowing the alignments of the other 99 99 . However, this isn't optimal - we can do better.


We are given at the start that exactly 50 50 of the councilmen are liars. Therefore, there are not 2 100 2^{100} unique possibilities, but rather ( 100 50 ) \binom{100}{50} . And a calculator will show that:

2 96 < ( 100 50 ) < 2 97 2^{96} < \binom{100}{50} < 2^{97}

So, from an information theory perspective, we only need 97 97 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 96 2^{96} possible answers with only 96 96 questions.

Because we can determine the truthfulness of any proposition P P , we can easily identify the answer in 97 97 questions! We simply ask questions akin to binary search.

First, we enumerate all ( 100 50 ) \binom{100}{50} 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 ?" P = \text{"Is the }n\text{-th bit of the correct configuration }1\text{?"} . Since there are only 97 97 bits to consider, asking these 97 97 questions will uniquely determine the answer.


Since the theoretic lower bound is 97 97 , and a strategy exists to get the answer in 97 97 questions, the minimum number of questions we must ask is precisely 97 \boxed{97} .

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 ?

Ahbi Thakur - 6 years, 8 months ago

Log in to reply

"Identify all the other truthtellers and liars" is not a yes-or-no question.

Daniel Ploch - 6 years, 8 months ago

I might be missing something.. But if we ask " is there exactly 100 councilmen here?" , it would take 50question to determine.

Satadip Chakraborty - 6 years, 9 months ago

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.

Daniel Ploch - 6 years, 9 months ago

since we know all are councilmen..simply asking "are you a woman?" would suffice?

Jai Lodha - 6 years, 6 months ago

Log in to reply

yea thats what i thought

NSCS 747 - 11 months, 1 week ago

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.

Ayush Mishra - 5 years, 10 months ago

Log in to reply

It can be 50, but the problem asks for the worst-case scenario.

Alex Li - 4 years, 8 months ago

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?

Alex Li - 4 years, 8 months ago

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.)

Daniel Ploch - 4 years, 7 months ago

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 ?

Meet Patel - 2 years, 4 months ago

We can ask some ridiculous questions. It is not clear what kind of questions we can ask.

Srikanth Tupurani - 1 year, 10 months ago

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?

Ujjwal Uttaray - 6 years, 8 months ago

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?" \text{"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?'

Daniel Ploch - 6 years, 8 months ago
Kee Aun Ooi
Jun 25, 2015

Firstly, we know that there are ( 100 50 ) \binom{100}{50} way to arrange the liars and truth tellers. Each question we asked only have two possible outcomes either Y E S YES or N O NO . The n n question we asked, we have 2 n 2^n possible outcomes.

2 n ( 100 50 ) 2^n\geq\binom{100}{50}

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 Stirling's approximation during calculation. Lastly, we get

n 96.35 , n = 97 n\geq96.35 , \boxed{n =97}

i would ask are you a man if they say not they r liar if they say yes they speak the truth

NSCS 747 - 11 months, 1 week ago
Brian Cloutier
Sep 13, 2014

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.58 log_2(6) = 2.58 questions.

With 100 people, 50 of which are liars, there are l o g 2 ( ( 100 50 ) ) 96.3 log_2( \binom{100}{50}) \approx 96.3 possibile orderings, so with 97 perfectly chosen questions you ought to find the answer.

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...