Pi Han has written down a perfect square between 1 to 300 inclusive. Calvin wants to know the integer, and is allowed to ask "yes/no" questions to determine it. Pi Han would immediately answer the question, and then Calvin can use that information to ask his next question. As a point of pride, Calvin would not ask questions to which he already knows the answer. Calvin asks the following questions:
At this point, Calvin declares that he knows the answer. However, he turns out to be incorrect because Pi Han gave the wrong answer to each of the 4 questions!
What is the number in the envelope? If you think it cannot be uniquely determined, enter 0 as your answer.
Clarification
: Before the questions are asked, Calvin knows that Pi Han wrote down a perfect square between 1 and 300 inclusive.
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.
The problem statement says "As a point of pride, Calvin wants to minimize the number of questions he asks." However, in this case, he would not have asked question 3. (unless I'm missing something). I was really confused because I thought that would be an important part of the question.
This might also relate to the fact that you seem to be assuming all numbers are perfect squares... which is not written anywhere in the problem statement as far as I can see.
Log in to reply
Why would he not have asked question 3? He needed to know whether it was 1- or 2-digit.
I have rephrased it to 'Calvin would not ask questions to which he already knows the answer", in case the interpretation is that "Calvin should bisect the set each time, in order to minimize the worst case scenario". Does that help?
There was a condition that the written number was a perfect square. We accidentally removed it when editing the question. We have added it back in.
This question was great
Edit: Ignore my comment. I didn't realize that 2nd digit referred to the units digit. I've edited the problem to "2nd digit from the left".
For (4), shouldn't the answer be Yes? That will lead Calvin to conclude that the number is 64.
Log in to reply
If we have answers from Pi Han as : ● NO ● NO ● NO ● YES then after reversing the answers we get : ● YES ● YES ● YES ● NO
which implies the correct answer as 64 also.
I agree with the answer 169 but why it is not 64 also ???
Log in to reply
Because if the answer to the first question was "No" he would not have needed to ask the third question.
Solution by diagram
The numbers shown are the square roots of the numbers to be guessed at.
For each question, yes = ↗ and no = ↘ .
Orange: Answer found in three questions. Calvin would not have asked any more.
Green: Answer found in four questions. These numbers fit the answers Calvin was given.
Yellow: There is no such number. The choices are incompatible.
Red outline: Calvin would not have gone here, because he does not ask questions to which he already knows the answer.
Arrows on the right side: Mirror image (swapping yes and no).
We see that Calvin must have concluded that the number was 8 2 = 6 4 . Its mirror image is 1 3 2 = 1 6 9 .
While a very elegant solution, isn't it a bit of an overkill to calculate all the posibilities?
Log in to reply
I took only a minute to sketch out a diagram like this. Once I realized there were only 17 possibilities, I concluded that an exhaustive analysis could not take much more time than any other method.
Great way to present the solution! Sometimes, having a clear way of representing the information does most of the "thinking" for you :)
The important point to first note would be that Calvin does not ask questions to which he already knows the answer, meaning if the answer given to one of the questions is obvious enough to imply the answer to a later question (in the list of four), this later question would be deemed unnecessary and Calvin would NOT ask it.
Therefore, if all four questions had to be asked, we have to avoid a situation as illustrated above. This will help us determine the individual yes/no responses to the four questions. To illustrate what I exactly mean, let's do a walkthrough. For the first question, if Pi Han had answered no, Calvin would know that the number has to be three digit which renders the third question redundant as the answer to whether the number is two-digit would definitely be no too. However, if Pi Han had answered yes to the first question, the third question would be necessary as a number below 100 can be one or two digit.
Hence Pi Han's answer to the first question must be yes . So the number, according to Pi Han, is less than 100 (one or two digit).
For the second question, if Pi Han had answered no, Calvin would know that the number is odd which renders the last question unnecessary. Why? If the number is one-digit, there is no second digit in the number to speak of. If the number is two-digit, the second digit would actually be the units digit of the number and if the number is odd, there is no way the units digit can be 6 which is an even number. Either way, the answer to the last question would obviously be no.
Hence Pi Han's answer to the second question must be yes too, which implies an even number.
For the third question, if Pi Han had answered no, Calvin would know that it has to be a one digit number. Considering that it is an even number, the only perfect square that satisfies these conditions would be four, which renders the last question unnecessary too.
Hence Pi Han's answer to the third question must also be yes , which implies a two digit number.
Should Pi Han's answer to the final question be yes or no? Well, by now, Calvin would have narrowed down the possibilities to 16, 36 and 64. There are two possible perfect squares which end with digit 6 (the second digit from the left is the units digit for a two digit number) but only one which does not, so Pi Han's answer to the final question should be no for Calvin to conclusively determine the answer to be 64.
But considering that Pi Han's four answers were all wrong, we simply take the negation and we have no , no , no and yes as the actual answers to the four questions. This means the unknown number is three digit (not any less than 100), odd (not even) and has 6 as its middle digit (the second digit from the left is actually the middle digit for a three digit number). The only perfect square not more than 300 which satisfies all these conditions is 1 6 9 .
the right answer is 64 not 169.
Log in to reply
64 is what you get if you follow the conclusion of Calvin's questions:
But the problem states that all 4 answers to that conclusion were incorrect, so we have to negate each answer.
Log in to reply
and Dear Jonathan Quarrie , If we have answers from Pi Han as : ● NO ● NO ● NO ● YES then after reversing the answers we get : ● YES ● YES ● YES ● NO
which implies the correct answer as 64 also.
I agree with the answer 169 but it should be 64 also .
Log in to reply
@Pranshul Goyal – Hello friend. Pi Han cannot be answering with No, No, No, Yes, because Calvin is structuring subsequent questions based on each answer - if the first answer is No, the 3rd question is redundant. Which implies that Pi Han answered Yes for the 1st question.
Friends why not the answer is 64 also . I have proof for 169 & 64 as correct answers.
Log in to reply
"Calvin won't ask for information that he already have".
Problem Loading...
Note Loading...
Set Loading...
We will find out Pi Han's answers by logical reasoning. Let us assume that both Calvin and Pi Han are perfectly logical.
First, we know Pi Han's answer to (1) must be "Yes". Otherwise, Calvin would not have needed to ask (3), knowing that it could not have been 2-digit.
Now that we know it was less than 100, Pi Han's answer to (2) must also be "Yes". Otherwise, Calvin would not have needed to ask (4), knowing that an odd number could not have a last digit of 6.
Pi Han's answer to (3) must also be "Yes". Otherwise, Calvin would not have needed to ask (4), knowing that it was 1-digit.
Now we do some casework: the even 2-digit perfect squares are 16, 36, and 64. Therefore, Pi Han's answer to (4) must be "No". Otherwise, Calvin would not be able to come up with a unique answer.
Now we negate all. From the negations, we know that it was an odd perfect square greater than 100 and less than 300 with a second digit of 6.
There is only one number that satisfied all these conditions: 169.