There’s another assumption I didn’t realize I was making: you don’t change future questions based on what answers you get. But here goes:
If every question is dependent only on the colors of the grenades, and you have 4 questions, then if you draw out a grid like this:
Then each square represents a set of four answers, one for each of questions Q1, Q2, Q3, and Q4. The column decides the answers to Q1 and Q2. The row decides the aswers to Q3 and Q4. I’m using “1” for “yes” and “2” for “no.” The columns and rows are numberd in grey code, which means that moving one square in any direction is equivalent to flipping one Y/N answer. Because there are 4 answers to flip, and 4 directions to move in (you can move left on the leftmost square to end up on the rightmost, same with top and bottom. Like the “Asteroids” video game), every answer-flip is represented by a move of one square in a particular direction.
So for each possible grenade color, answering the questions truthfully would specify a square in the grid. Answering one incorrectly will move the set of answers one square in one direction. So if when the grenade is really red, the true answers are 0101 (No to Q1, yes to Q2, no to Q3, yes to Q4), the sets of answers the person can give are the ones filled in below:
The light red one is if they don’t lie, and the dark red ones are if they ile once.
To make it so we can always determine the ball color, we have to arrange 3 of these shapes on the grid so that they don’t overlap. If they do overlap, then they could have answered that way if the ball was one of two or more different colors.
Because this grid wraps like the asteroids game, it doesn’t matter where you put the first “+”. Mentally placing a second plus makes it obvious that there is nowhere to put the last , no matter where you put it.
But, if they have to lie, then the answers they can give look like this:
And you can fit 4 of this shape on the grid:
So to determine the grenade color if 4 colors are possible in 4 questions, if in 4 questions they must lie, just pick the questions so that if the grenade is red, the correct answers are 0101, if blue, 1101, if green, 1010, if pink, 0010.
This means Q1 should be “Is the ball blue or green,” Q2 should be “Is it red or blue,” Q3: “Is it green or pink”, Q4: “is it red or blue” (Yes, the last three are basically the same.)
When you get your answers, look up a square in the grid, and whatever color it is, is the color of the ball.
Why wouldn’t you change your questions based on the responses you have already gotten? Also, you are assuming that the target has at most one grenade, an assumption which I think is valid.
I agree that asking logically equivalent questions or self-referential questions breaks the spirit of the rules, but asking questions which are subsets of previous questions is not.
Given that case 1 is not having a grenade, and case 2-4 are having grenades of each color, the questions could go like this:
Case 1 or 2? Case 3 or 4? Case 2 or 3?
000: Case 1? (yes 1, no 4) 001: Case 2? (yes 2, no 3) 010: Case 1,2,3? (yes 3, no 4) 011: Case 1,2,3? (yes 3, no 4) 100: Case 2,3,4? (yes 2, no 1) 101: Case 2,3,4? (yes 2, no 1) 110:Case 1? (yes 1, no 4) 111:Case 2? (yes 2, no 3)
This line uses what I consider a cheap trick of asking the same question twice in a row, because once “3 or 4” is known, “2 or 3?” and “1,2, or 3?” both simplify to “3?”
I agree that the assumption that you wouldn’t change your questions based on the responses is not a reasonable one, but I realized that I had made it after I came up with my argument, and decided to share it anyway in case people found it interesting.
If later questions are allowed to reference earlier answers by the interrogee, you could get all the benefit of changing your questions by multiplexing among possible later questions based on their answers to earlier questions, all within one question. For example: if your first question was “is the ball red”, and if they say yes your next is “is the ball blue”, and if they say no you say “is the ball green”, your second question would always be be “Is it true that you just said ‘yes’ and the ball is blue or that you just said ‘no’ and the ball is green?”
You can also deal with the ruleset where they could have a grenade of one of three colors, or they could have nothing with my method of dealing with 4 possible colors, by replacing all references to “pink” with “no grenade”.
Feel free. I don’t care about it any more, and as you point out, the commenters correct it.
There’s another assumption I didn’t realize I was making: you don’t change future questions based on what answers you get. But here goes: If every question is dependent only on the colors of the grenades, and you have 4 questions, then if you draw out a grid like this:
Then each square represents a set of four answers, one for each of questions Q1, Q2, Q3, and Q4. The column decides the answers to Q1 and Q2. The row decides the aswers to Q3 and Q4. I’m using “1” for “yes” and “2” for “no.” The columns and rows are numberd in grey code, which means that moving one square in any direction is equivalent to flipping one Y/N answer. Because there are 4 answers to flip, and 4 directions to move in (you can move left on the leftmost square to end up on the rightmost, same with top and bottom. Like the “Asteroids” video game), every answer-flip is represented by a move of one square in a particular direction.
So for each possible grenade color, answering the questions truthfully would specify a square in the grid. Answering one incorrectly will move the set of answers one square in one direction. So if when the grenade is really red, the true answers are 0101 (No to Q1, yes to Q2, no to Q3, yes to Q4), the sets of answers the person can give are the ones filled in below:
The light red one is if they don’t lie, and the dark red ones are if they ile once. To make it so we can always determine the ball color, we have to arrange 3 of these shapes on the grid so that they don’t overlap. If they do overlap, then they could have answered that way if the ball was one of two or more different colors.
Because this grid wraps like the asteroids game, it doesn’t matter where you put the first “+”. Mentally placing a second plus makes it obvious that there is nowhere to put the last , no matter where you put it.
But, if they have to lie, then the answers they can give look like this:
And you can fit 4 of this shape on the grid:
So to determine the grenade color if 4 colors are possible in 4 questions, if in 4 questions they must lie, just pick the questions so that if the grenade is red, the correct answers are 0101, if blue, 1101, if green, 1010, if pink, 0010. This means Q1 should be “Is the ball blue or green,” Q2 should be “Is it red or blue,” Q3: “Is it green or pink”, Q4: “is it red or blue” (Yes, the last three are basically the same.)
When you get your answers, look up a square in the grid, and whatever color it is, is the color of the ball.
Why wouldn’t you change your questions based on the responses you have already gotten? Also, you are assuming that the target has at most one grenade, an assumption which I think is valid.
I agree that asking logically equivalent questions or self-referential questions breaks the spirit of the rules, but asking questions which are subsets of previous questions is not.
Given that case 1 is not having a grenade, and case 2-4 are having grenades of each color, the questions could go like this:
Case 1 or 2? Case 3 or 4? Case 2 or 3?
000: Case 1? (yes 1, no 4)
001: Case 2? (yes 2, no 3)
010: Case 1,2,3? (yes 3, no 4)
011: Case 1,2,3? (yes 3, no 4)
100: Case 2,3,4? (yes 2, no 1)
101: Case 2,3,4? (yes 2, no 1)
110:Case 1? (yes 1, no 4)
111:Case 2? (yes 2, no 3)
This line uses what I consider a cheap trick of asking the same question twice in a row, because once “3 or 4” is known, “2 or 3?” and “1,2, or 3?” both simplify to “3?”
I agree that the assumption that you wouldn’t change your questions based on the responses is not a reasonable one, but I realized that I had made it after I came up with my argument, and decided to share it anyway in case people found it interesting.
If later questions are allowed to reference earlier answers by the interrogee, you could get all the benefit of changing your questions by multiplexing among possible later questions based on their answers to earlier questions, all within one question. For example: if your first question was “is the ball red”, and if they say yes your next is “is the ball blue”, and if they say no you say “is the ball green”, your second question would always be be “Is it true that you just said ‘yes’ and the ball is blue or that you just said ‘no’ and the ball is green?”
You can also deal with the ruleset where they could have a grenade of one of three colors, or they could have nothing with my method of dealing with 4 possible colors, by replacing all references to “pink” with “no grenade”.