In this part, we have some puzzle, or I don't know, some tale, and the tale is about the prisoner and the king. So the king calls the prisoner and tells look, here we have 15 white balls and 15 black balls. And these balls will be used to determine your fate. Even though the king can determine the fate of everybody. And what the prisoner can do. The prisoner is allowed to put the balls in the boxes in any proportion. So each box should be non-empty but he is able to put black and white balls as he wishes. And then king promise that he will choose one of the boxes randomly. And then take a random ball from this box. And if this ball is white, then the prisoner is set free, and if it's black, something bad happens. So imagine that prisoner wants to increase his chances to be set free. And he wants to be free and there is no cheating. The prisoner cannot just throw away all the black balls or the king cannot kill the prisoner even though the ball is white so everybody follows the protocol. But still the prisoner should maximize the probability of being set free. What should the prisoner do? And here is the answer. The answer is that you should have 1 white in one box. Prisoner should put just 1 white ball. And in the other box, I should put the rest of white balls, 14 white balls, and all the black balls, 15. So what does it give? So if the king took the box with only 1 white ball, then the prisoner is guaranteed to be free. But if the king selects another box then still the prisoner has some reasonable chance. It is just a bit smaller than 1 to 1, it's 14 to 15 because there are only 14 white and 15 black. So in total, it's a bit less than three-fourth but, I claim that this is optimal. And it's not really easy. It's somehow obvious if you think, intuitively obvious. But mathematical proof is not so trivial. And I will not explain it completely formally with all the formulas. But it's a really valid mathematical proof, just explained in an informal way. So you can think about it and you can try to retell it in a more formal way if you feel it's necessary. Okay, so now the proof. It should be prepared. Yeah, so actually the prisoner has somehow two- dimensional space of choices. So first he should decide though it's not just, we describe this choice this way. So first, he decides how many balls will be in the one box and how many balls will be the other box, ignoring the colors. So first, he decides just the number and then, so this is a splitting of 30 balls to two boxes. And second he decided how the colors are distributed, so how many black balls we have in the first box and in the second box, so this is the second decision. After the total number is fixed, the prisoner can modify the numbers but he should balance things so. The total number should be as prescribed. So, let's look at the second stage, when the proportion between boxes is fixed. And this is the most important informal, but which can be made formal, but informal remark. That the color of the ball is more important in the box when there are fewer balls. So, if I have small box, look imagine you have a small box and big box, no, both with small number of balls and big number of balls. So and then you can change the number of black balls and white balls, so you can make one black ball white in the small box but you have to pay and make one white ball black in the big box. But the increase in probability in the small box is more important because the denominator is smaller. So if the total number of balls is smaller, then each ball means more. And for a box with a large number, it means less. So we use a strange C notation just for fun. So this means that in small box, the number of white balls will increase by one and the number of black balls will decrease to keep the total number the same. And here to compensate in the bigger box with bigger number of balls, we should decrease the number of whites by one. And what I'm saying is that it's profitable. Because in the smaller box, each ball costs more, so to say. And so, we can do this, repeat this until we have all the balls in the small box are white now. And it's enough white balls because it's a smaller box, so it's at most 15. Okay, so we see the situation can be improved. Whatever we start with, we can improve the situation by adding, making balls in the small box white. But then, imagine we continue this until it's possible. When we finish with all white balls in the small box. But then it's easy to observe that we don't need that many, so one is enough. It's still probability one and still the other balls can be used to increase our chances for the other box. So we get exactly the same, the answer we claimed. So in the small box we have one white ball and all the rest, all the white balls remaining, and all the black balls are in the other box, just exactly what we said. There is a small technical detail, that when we say small and big box here, we assume that one implicitly forgot the case when they are equal. But then of course if they are equal, then this first stage doesn't change, doesn't make things better but also doesn't make them worse. So we can do it anyway and then we came improving, we came again to this optimum case. So this case can be obtained for any other, and so it's optimization ends here so it's optimal.