Here are interview questions that my friend, Arthur, shared with me (All credits to him 😊):
Say you’re given 3 closed boxes, one containing gold, the other a silver box, and the last is a box which contains a mixture of 50% gold and 50% silver.
It is a rule that all the boxes are labelled incorrectly. How many boxes must you open before you can deduce what’s inside the boxes?
If the first box you open contains gold, and is labelled silver, then the one labelled gold cannot be silver, because then it leaves behind the 50% label alongside the one that actually contains a mixture of gold and silver. Therefore, the one labelled gold has to be the 50% mixture. Apply this logic to other cases and you’ll see that a minimum of checking 1 box is required applies for all 3 cases (getting gold, silver, or 50% mixture as the first box).
Assume that there are 100 statements.
The first statement is that none of the statements are true.
The second is that there is a maximum of 1 statement that is true.
The third is that there are a maximum of 2 statements that are true.
The 100th statement is that there are a maximum of 99 statements that are true.
How many of these statements are true?
The first statement sounds like the liar’s paradox. If there are no true statements, but the statement is true, then we’ve gotten ourselves into a bind since it’s contradictory. Thankfully, in this case, the other statements could be true, so we can consider the statement to be false and move on to statement 2.
There are no true statements. However, if that statement is true, then it contradicts itself, so it is not true.
There are at most 1 true statements. Since we know that statement 1 is false, 100-1 statements could still be true. If statements 2-100 (99) could still be true, then statement 2 is not true since it is not an upper bound.
There are at most 2 true statements. Since we know that statement 2 is false, 100-2 statements could still be true. If statements 3-100 (98) could still be true, then statement 3 is not true since it is not an upper bound.
There are at most 50 true statements. Since we know that statement 50 is false, then 100-50 = 50 statements other statements could be true. If statements 51 to 100 = (50 total statements) could still be true, then statement 51 is true since there are at most 50 true statements.
There are at most 51 true statements. Since we know that there are 50 false statements prior to this (statements 1 to 50), and there is 1 true statement (statement 51), then 100-51= 49 statements other statements could still be true. If statements 52 to 100 = (49 total statements) could still be true, then statement 52 is true since it does not contradict that there are at most 51 true statements.
There are at most 99 true statements. Since we know that there are 50 false statements prior to this (statements 1 to 50), and there are 49 true statements (statements 51 to 99), then statement 100 = (1 statement) could still be true. If statement 100 could still be true, then statement 100 is true since an upper bound of 99 true statements does not contradict that there are at most 99 true statements.
Hence, statements 1-50 are false and statements 51-100 are true, giving a total of 50 true answers.
Arthur’s really short and sweet answer:
“assume that there are n statements, and statement k is true. Then we have for free that statements k+1, …. n are true
so n-k statements are true, but statement k is “k statements are true
so this forces n-k = k, i.e. k = 50”
Answer: 50th statement.