I stumbled upon a mathematical/logical puzzle that I figured was impossible to solve. Here it is, straight from puzzles SE:
Two friends, Mark and Rose, are very famous logicians; they are so clever that they can deduce any logic connection possible in a matter of minutes even from the most vague situation.
Unfortunately, one day, the two friends are abducted by the Evil Logician, who is envious of their fame, and believes they don't deserve it. He imprisons them in his castle and decides to test their cleverness. They are kept in two different cells, which are located on opposite sides of the castle, so that they cannot communicate in any way. Mark's cell's window has twelve steel bars, while Rose's cell's window has eight.
The first day of their imprisonment, the Evil Logician tells first Mark and then Rose that he has decided to give them a riddle to solve. The rules are simple, and solving the riddle is the only hope the two friends have for their salvation:
In the castle there are no bars on any window, door or passage, except for the windows in the two logicians' cells, which are the only barred ones (this implies that each cell has at least one bar on its window). The Evil Logician will ask the same question to Mark every morning: "are there eighteen or twenty bars in my castle?" If Mark doesn't answer, the same question will then be asked to Rose the night of the same day. If either of them answers correctly, and is able to explain the logical reasoning behind their answer, the Evil Logician will immediately free both of them and never bother them again. If either of them answers wrong, the Evil Logician will throw away the keys of the cells and hold Mark and Rose prisoners for the rest of their lives. Both Mark and Rose know these rules. Can the two logicians redeem themselves? If so, what will the reasoning behind the correct answer be, and what's the minimum number of days it will take either of them to answer correctly?
Now my problem with this is, I do believe it cannot be solved, i.e. "logicians" arent going to escape anywhere since it's impossible to determine the total number of bars from the knowledge any single person has; and it's also impossible for them to share their knowledge in any way. The only information any of them can get is that the other one didnt answer the question when it was their turn, its impossible to draw any logical conclusion from that.
Now there's an accepted and 18+ upvoted answer that solves the problem. Incorrect, illogical answer in my opinion, but since the vast majority disagrees, I probably can't see something. Can the prisoners escape using only maths and logic and the info they have, i.e. no secret code agreed upon beforehand or anything like that? Where am I wrong? I am not pasting the accepted answer here since its very long, but you can check it following the link, if you wish. Or you may try and solve the puzzle yourselves before you check what others have answered. I am only interested if it can be done and if yes, where am I wrong in my reasoning.
Edit: there seems to be a misunderstanding. I am not asking whether there is a strategy that they can follow if both knew it in advance. I am asking if this can be solved by only using maths and logic. Lets say I am Rose in this situation. Day 1. Here's what I know:
-- I have 8 bars. I can see them.
-- Castle has either 18 or 20 total. Evil Logician says so.
-- Therefore Mark has either 10 or 12 total. Because only those numbers would add up with my 8 to 18 or 20 total bars in the castle.
-- Mark must realize, seeing his 10 OR 12, that I have either 10 or 8 (if he has 10); or 6 or 8 (if he has 12). Because only those numbers Would add up to one of the two possibly correct answers 18 or 20.
-- No matter if Mark has 10 or 12 he cannot answer how many I have. Therefore he's gonna stay silent.
So far so logical? Or was there a mistake in my chain of reasoning? If it was good so far...
There comes the kidnaper in the night 1, and asks me his question. Form that I learn that Mark didnt answer anything as I knew he wouldnt. What else can I logically conclude? That Mark had less than 18 bars? But of course, I already know it. He has either 10 or 12, both numbera are less than 18. What am I missing?
The correct answer to the Puzzling SE question is not hard to understand, but OP's assertion (that no one learns anything on the first day) also seems extremely plausible. I'd like to resolve that apparent contradiction by specifically addressing OP's answer:
The key assertion is that "Rose [received] no new information from [Mark's not answering on the first day]." Even if we're convinced (by the existence of a correct answer) that this is false, it's not immediately clear why it's false. What information, specifically, does Rose (or, even less intuitively, Mark) learn from Mark's non-answer, given that both logicians already knew what he would do?
Let's use $\square_M$ to denote a fact that Mark knows, $\square_R$ to denote a fact that Rose knows, $\square_{RM}$ to denote a fact that Rose knows that Mark knows, etc., and $N_M,N_R$ to denote the number of bars each person has. It's common knowledge that $N_M+N_R\in\{18,20\}$ and that $N_M,N_R\ge 1$; the rules of the puzzle are also considered to be common knowledge, as are the players' non-answers, once they're made. (Recursive definition of "common knowledge": a fact is common knowledge when everyone knows it is both true and common knowledge.) Now, Mark doesn't have $18$ or more bars; but if he did, he'd know that there were $20$ bars in the castle, and he'd give that answer on the first day. Here's the tricky bit. Rose knows that Mark doesn't have $18$ bars. Mark knows that she knows it. She knows that Mark knows that she knows it. Et cetera, but not et cetera forever: $$ \square_{R} N_M < 18, \\ \square_{MR} N_M < 18,\\ \square_{RMR} N_M < 18,\\ \square_{MRMR} N_M < 18,\\ \square_{RMRMR} N_M < 18, \\ \square_{MRMRMR} N_M < 18,\\ $$ but $$ \neg\square_{RMRMRMR} N_M < 18. $$ On the other hand, once it becomes common knowledge that Mark didn't answer on the first day, it's also common knowledge that $N_M < 18$. And so Rose does know something she didn't before: she knows that Mark knows that she knows that he knows that she knows that he knows that she knows that Mark has less than $18$ bars. And while this seems like a ridiculous little piece of information, because humans aren't very good at reasoning about multiple levels of hypothetical, it clearly is useful data; by assembling just these sorts of data, the logicians are able to eventually escape.
In case it's not completely obvious (j/k), why doesn't Rose initially know this fact?
And so it's actually the case (before Mark's non-answer, but not after) that $\neg \square_{RMRMRMR} N_M < 18$.
Indeed, with each successive non-answer, the two logicians are able to chip away a little more at this wall of hypotheticals, until eventually they tunnel through to freedom.