Total number of bars in a castle puzzle 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?
https://puzzling.stackexchange.com/questions/45664/are-there-eighteen-or-twenty-bars-in-my-castle/45710#45710
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? 
 A: 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:

Neither Mark nor Rose cannot figure the answer without info from the
  other one. I hope that much is obvious. Now, the only way for them to
  send a message to each other is by answering or not answering the
  question. Mark goes first, he knows Rose has either 8 or 6 bars. He
  does not know how many, so he does not answer.
Rose knows, that Mark didnt answer, and that Mark has either 10 or 12,
  and that Mark must have guessed Rose has 8||10 or 8||6 and in either
  case Mark wouldn't have answered. So Rose didnt receive absolutely no
  new information from Mark non answering, and cannot answer herself.
  Mark in turn didn't get anything new from Rose not answering. They
  cannot relay any information to each other than they already had
  before, hence each of them can only guess with 50 % chance. They
  cannot escape by using logic, and being genius logicians they do know
  it. The end. 

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?


*

*She knows that she has $8$ bars, so she knows that Mark could have either $10$ or $12$ bars.  For her to know for sure that $\square_{MRMRMR} N_M < 18$, it would have to be true in either possible case.  She considers the case where Mark has $12$ bars.  In that (perfectly plausible, from Rose's point of view) case:

*Mark knows that he has $12$ bars, so he knows that Rose could have either $6$ or $8$ bars.  For him to know for sure that $\square_{RMRMR} N_M < 18$, it would have to be true in either possible case.  He considers the case where Rose has $6$ bars.  In that (perfectly plausible, from this hypothetical Mark's point of view) case:

*Rose knows that she has $6$ bars, so she knows that Mark could have either $12$ or $14$ bars.  For her to know for sure that $\square_{MRMR} N_M < 18$, it would have to be true in either possible case.  She considers the case where Mark has $14$ bars.  In that (perfectly plausible, from this twice-hypothetical Rose's point of view) case:

*Mark knows that he has $14$ bars, so he knows that Rose could have either $4$ or $6$ bars.  For him to know for sure that $\square_{RMR} N_M < 18$, it would have to be true in either possible case.  He considers the case where Rose has $4$ bars.  In that (perfectly plausible, from this thrice-hypothetical Mark's point of view) case:

*Rose knows that she has $4$ bars, so she knows that Mark could have either $14$ or $16$ bars.  For her to know for sure that Mark knows that she knows that $N_M < 18$, it would have to be true in either possible case.  She (4x-hypothetical Rose) considers the case where Mark has $16$ bars.  In that case:

*Mark knows only that Rose has $2$ or $4$ bars.  For him to know for sure that Rose knows that $N_M < 18$, it would have to be true in either possible case.  But if Rose had only $2$ bars, she couldn't rule out his having $18$ bars.  So, Mark thinks, it's possible that Rose doesn't know that $N_M < 18$.  Mark can't know whether she knows it or not.  Hence $\neg \square_{MR} N_M < 18$...

*(5) ... so, 4x-hypothetical Rose would think, it's possible that $\neg \square_{MR} N_M < 18$.  Hence $\neg \square_{RMR} N_M < 18$...

*(4) ... so, thrice-hypothetical Mark would think, it's possible that $\neg \square_{RMR} N_M < 18$.  Hence $\neg \square_{MRMR} N_M < 18$...

*(3) ... so, twice-hypothetical Rose would think, it's possible that $\neg \square_{MRMR} N_M < 18$.  Hence $\neg \square_{RMRMR} N_M < 18$...

*(2) ... so, hypothetical Mark would think, it's possible that $\neg \square_{RMRMR} N_M < 18$.  Hence $\neg \square_{MRMRMR} N_M < 18$...

*(1) ... so, Rose correctly concludes, it's possible that $\neg \square_{MRMRMR} N_M < 18$.


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.
A: 
So Rose didnt receive absolutely no new information from Mark non answering, and cannot answer herself. Mark in turn didn't get anything new from Rose not answering.

Consider the case where Mark has 4 bars, and Rose has 6, and the question is 8 or 10 bars. 
Day 1


*

*Mark is asked. 


What does he know so far? He knows that Rose has between 1 and 9 bars. 
He knows that Rose knows that he has between 1 and 9 bars. Their information so far is symmetric. 
Notice that though he actually knows that Rose has 4 or 6 bars, both 4 and 6 are in the range 1 and 9. Thus it is fair to make the claim. 


*

*Before Rose is asked. 


She knows Mark has between 1 and 9 bars. 
She knows that Mark knows the same. 


*

*After Rose is asked.


She knows that Mark didn't answer. From this, she deduces that he cannot have 8 or 9 bars. Otherwise, he would have answered 10 and they would be free. 
She revises her estimate that Mark has between 1 and 7 bars. 
Day 2 


*

*Right before Mark is asked. 


Mark realizes that when he didn't answer, Rose deduced that he couldn't have more than 7 bars. If she only had 1 bar, she then would have guessed 8. But she didn't, so he knows that she can't have only 1 bar. 
Since he was not freed the night before, he knows that Rose also does not have enough information to answer. If she had 8 or 9 bars, she could have answered 10 with confidence. Thus he knows she has less than 7 bars. 


*

*Mark is asked. He similarly knows that Rose cannot have 8 or 9 bars, or else she would have answered yes. Furthermore, Mark knows that Rose can deduce he has between 1 and 7 bars. Thus, if she had only 1 or 2 bars, then the possibilities for the total number of bars (according to her) would have been between 2 and 9. So she could answer 8. Thus, Mark now knows that Rose has between 3 and 7 bars. 

*Rose can deduce everything Mark can (note we NEVER use the number of bars either of them has in our logic so far). So she knows that Mark knows that she has between 3 and 7 bars. If Mark had 6 or 7 bars, he knew that she has between 3 and 7 bars so the total number of bars would have been 9 or greater, and he could have answered 10. Thus, she knows that he has between 1 and 5 bars. She can also do the same analysis Mark did, to conclude that Mark cannot have 1 or 2 bars. So she now knows Mark has between 3 and 5 bars. 
She then concludes, knowing she has 6 bars, that there must be greater than 8 bars. Thus she answers 10. 
But your logic (if it were correct, would also have applied to this scenario). 
A: Take everything on the Puzzling site with a large grain of salt. With the information given, there is simply no way for the two hostages to know the answer. In particular, consider the wording of the Evil Logician's question:

"Are there eighteen or twenty bars in my castle?"

For all we know, the answer could simply be "No."
Some might argue that this is playing with semantics of the word "or", but let me point out that at no time does the Evil Logician state that there are either $12$ or $18$ bars. (Compare to: "There are either $12$ or $18$ bars in my castle. Now, which is it, $12$, or $18$?") It would be shocking if Mark and Rose, being the famous logicians they are, jumped to such a conclusion.
Surely the best answer is, "Possibly. We don't have enough information," after which the hostages must be freed.
